This repository contains a Python script for extracting and processing NFC card data using a smart card reader. The script interacts with NFC cards, parses TLV data, and generates outputs in JSON format.
- Connects to NFC card readers.
- Extracts AIDs and application data from NFC cards.
- Processes AFL and generates ARQC.
- Parses TLV data and extracts specific tags.
- Saves extracted data to JSON files.
- Interactive CLI built with Rich featuring animations and selection menus.
- Python 3.7 or higher
pyscardlibrary for smart card communication- A compatible NFC card reader
-
Clone the repository:
git clone https://github.com/gusdnide/leitor_contactless.git cd leitor_script -
Install dependencies:
pip install -r requirements.txt
- Connect your NFC card reader to your computer.
- Run the script:
python extrair_nfc.py- Follow the on-screen instructions in the interactive CLI to select applications and dump data.
Runtime options such as output directory and default country/currency codes are stored in config.json. The file is created automatically on first run:
{
"currency_code": "0076",
"country_code": "0076",
"output_dir": "dumps"
}Edit this file to adjust settings for your environment.
The script saves the extracted data in the dumps directory as JSON files. Each file is named based on the card's track2 data and AID.
This project is licensed under the MIT License. See the LICENSE file for details.
This script is for educational purposes only. Ensure you have permission to access and process NFC card data.