Skip to content

Hadron/apdu-parser

 
 

Repository files navigation

apdu-parser

APDU-parser lets you parse your APDU commands' and APDU responses' hex bytes into their descriptions. Project includes default APDU commands and APDU responses default lists with descriptions.

Usage

python apdu_parser.py -i <input_file>

Options:
  -h, --help  show this help message and exit
  
  -i INPUT_FILE, --input=INPUT_FILE specify input file
  
  -o OUTPUT_FILE, --output=OUTPUT_FILE  specify output file
  
  -c, --commands  specify if input file contains only APDU commands
  
  -r, --responses specify if input file contains only APDU responses
  
  -C COMMAND_DESCRIPTIONS, --command-descriptions=COMMAND_DESCRIPTIONS  specify custom command descriptions file
  
  -R RESPONSE_DESCRIPTIONS, --response-descriptions=RESPONSE_DESCRIPTIONS specify custom response descriptions file
  
  -T, --colors	show terminal output in different colors

Examples

Basic usage:

python apdu_parser.py -i sample_files/default_log.txt

Setting output file:

python apdu_parser.py -i sample_files/default_log.txt -o outputs/default_log_output.txt

Parsing every input file entry as APDU command:

python apdu_parser.py -i sample_files/commands_log.txt -c

Parsing every input file entry as APDU response:

python apdu_parser.py -i sample_files/responses_log.txt -r

Setting custom command descriptions file:

python apdu_parser.py -i sample_files/default_log.txt -C sample_files/custom_command_descriptions.txt

Setting custom command responses file:

python apdu_parser.py -i sample_files/default_log.txt -R sample_files/custom_responses_descriptions.txt

Show output results in differents colors in terminal (just works in Linux / Mac):

python apdu_parser.py -i sample_files/default_log.txt -T

Requirements

To properly run the apdu-parser, Python 2.6.x or 2.7.x is required.

About

Parse APDU hex bytes into descriptions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%