Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eIDuy/apdu-parser
Parse APDU hex bytes into descriptions.
https://github.com/eIDuy/apdu-parser
apdu apdu-command apdu-parser apdu-response parser
Last synced: 3 months ago
JSON representation
Parse APDU hex bytes into descriptions.
- Host: GitHub
- URL: https://github.com/eIDuy/apdu-parser
- Owner: eIDuy
- Created: 2016-08-25T14:36:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-24T12:05:12.000Z (over 6 years ago)
- Last Synced: 2024-08-03T01:38:31.726Z (6 months ago)
- Topics: apdu, apdu-command, apdu-parser, apdu-response, parser
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 26
- Watchers: 6
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```sh
python apdu_parser.py -iOptions:
-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
```
# ExamplesBasic usage:
```sh
python apdu_parser.py -i sample_files/default_log.txt
```Set output file:
```sh
python apdu_parser.py -i sample_files/default_log.txt -o outputs/default_log_output.txt
```Parse every line in input file as an APDU command:
```sh
python apdu_parser.py -i sample_files/commands_log.txt -c
```Parse every line in input file as an APDU response:
```sh
python apdu_parser.py -i sample_files/responses_log.txt -r
```Set custom command descriptions file:
```sh
python apdu_parser.py -i sample_files/default_log.txt -C sample_files/custom_command_descriptions.txt
```Set custom command responses file:
```sh
python apdu_parser.py -i sample_files/default_log.txt -R sample_files/custom_responses_descriptions.txt
```Show output results in different colors in terminal (works only on Linux / MacOS):
```sh
python apdu_parser.py -i sample_files/default_log.txt -T
```## Requirements
To properly run the apdu-parser, [Python](http://www.python.org/download/) **2.6.x** or **2.7.x** is required.