
Python library and tools for exploring RFID/NFC tags and readers: read, write, clone, and analyze supported ACG serial hardware for research and security testing.
/* RFIDIOt.py - RFID IO tools for python *
Copyright (c) 2006-2026 Adam Laurie [email protected]
*** This is the Python 3 version of RFIDIOt. ***
Run everything with python3. The original Python 2.7 code is preserved on the 'python2.7' branch and tagged 'v1.0-python2.7' - it will not run under python3, and this version will not run under python2.
With huge thanks to Pete Shipley (evilpete), who did the bulk of the Python 3 port and contributed a great deal to the python3 branch that became this release.
q: What is RFIDIOt? a: A collection of tools and libraries for exploring RFID/NFC technology, written in python.
q: Why RFIDIOt? a: I like silly puns. Also, I'm coming at this from an idiot's point of view: I know nothing about RFID tags, and even less about python. As such, I felt a complete idiot when I started. :)
q: How can I contribute? a: Send me patches, info, new tools, coffee, money, drugs and/or a Miles Davis song :)
q: What hardware is supported? a:
q: How do I install it? a: pip install -r requirements.txt # pycryptodome, pyscard, Pillow, ... (passiveauth uses openssl CLI) sudo python3 ./setup.py install System packages: install libnfc for libnfc readers; for PC/SC readers install the daemon and CCID driver and make sure the daemon is running, e.g. on Debian/ Ubuntu: sudo apt install pcscd libccid pcsc-tools Some tools have extra needs: mrpkey.py uses PIL/Pillow to display passport photos and openssl for certificate handling; jcoptool.py needs pyasn1.
q: Anything new in the Python 3 version? a: Besides the port itself:
ChAP.py ("Chip And PIN") is a contactless/contact EMV reader that works over both PC/SC and libnfc (pick the reader with the standard options - e.g. '-f 0' for libnfc, '-r 1' for a PC/SC contactless slot). It walks the card (PPSE -> AID -> GPO -> records), decodes the EMV BER-TLV (AIP, AFL, CVM list, CDOL/DDOL, Track 2 split into PAN / expiry / service code, cryptogram information, etc.) and reads the card's transaction log (amount / date / time / currency / ATC per entry). With '-c' it performs full offline data authentication - it recovers the CA -> Issuer -> ICC certificate chain (a bundled table of 26 scheme CA keys: Visa, Mastercard, Amex, CB, JCB, Discover, UnionPay, RuPay, each checked against its EMVCo CAPK checksum) and then verifies the card's signature by whichever method the card supports:
mrpkey.py reads ePassports and passiveauth.py performs Passive Authentication (data-group integrity + DS/CSCA trust) against a public CSCA master list, flagging a passport SAFE / TAMPERED / UNTRUSTED. rfidiot-cli.py also reads contactless EMV.
q: So what exactly is here? a: Please see http://www.rfidiot.org/documentation.html