/* RFIDIOt.py - RFID IO tools for python
 *
 * Adam Laurie <adam@algroup.co.uk>
 * http://rfidiot.org/
 *
 * This code is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This code is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

Copyright (c) 2006,2007 Adam Laurie <adam@algroup.co.uk>
http://www.thebunker.net
http://trifinite.org/trifinite_group_adam.html

q: What is RFIDIOt?
a: A collection of tools and libraries for exploring RFID 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 loose women.

q: What hardware is supported?
a: So far this works with the ACG serial readers. I use the CF Card model, 
but it should also work with the USB version by changing the serial port to 
/dev/ttyUSB0. You can find more details here:

  http://www.acg.de

q: So what exactly is here?
a: 

RFIDIOt.py  		The main RFIDIOt code. Read it for comments on how
                        it is structured.

RFIDIOtconfig.py	Local configuration options. Edit this file to set
			hardware type, baudrate, device name etc.

utilities:

Most utilities will print a help page given a '-h' argument.

bruteforce.py 	 	Brute force a login to sector 0 on a standard MIFARE 
			card. This is done using random 48 bit keys, so you 
			have more chance of winning the lottery three times 
			in a row, but what the hell? YOU NEVER KNOW!!! :)

cardselect.py 		Select a TAG and display it's ID.

copytag.py		Copy all data blocks to a matching blank.

eeprom.py 		Display reader EEPROM settings (ACG).

fdxbnum.py		Calculate ISO 11784/5 (FDX-B) 'animal tag' compliant ID
			data, and optionally write it to a Q5 or Hitag2 tag.

froschtest.py		Test routines for Frosch hardware.

hitag2reset.py		Reset a Hitag2 to it's default state (recover from FDX-B or
			Unique emulation mode). This is currently only supported
			on Frosch hardware.

isotype.py		Determine TAG type of 13.56 MHz devices.

lfxtype.py		Determine TAG type of 125 / 134.2 kHz devices.

loginall.py 		Login to every sector using the factory installed 
			transport keys (Mifare).

mifare.pdf		Slides from a talk that give some useful info on 
			MIFARE block layout.

mrpkey.py		Authenticate and read data from MRP (ICAO 9303 compliant
			Machine Readable Passport).

multiselect.py		Continuously select and display TAG IDs.

q5reset.py		Reset a Q5 to it's default state (recover from FDX-B or
			Unique emulation mode). This is currently only supported
			on ACG hardware.

readlfx.py		Read data from 125 / 134.2 kHz devices.

readmifare1k.py  	Read every data block on a standard 1K MIFARE card.

readtag.py		Read every data block on an arbitrary tag (no login etc.)

sod.py			Look for PKCS7 (Public Key) data in EF_SOD.BIN as read from MRP
			with mrpkey.py.

unique.py		Calculate Trovan 'Unique' / 'Mira' compliant ID data and
			optionally write it to a Q5 or Hitag2 tag.

writemifare1k.py	Write random data to every block on a 1K MIFARE card.
			This will destroy all current data on the card.
			WARNING:
			If you modify this code to write the 4th block in each sector
			you will irreperably lock out the card. This is because
			that block contains the access controls for the sector
			so if you write nonsene to it, that sector becomes
			unreadable.

I don't get a serial port!

try:

  mknod /dev/ttyUSB0 c 188 0


