Permalink
Browse files

more package changes - be sure to read INSTALL for small but importan…

…t details!
1 parent 6f32ce4 commit 271cf40b31dabb5aa8ac62188667a0ac53e29ea6 @AdamLaurie committed Oct 4, 2012
View
25 INSTALL
@@ -2,3 +2,28 @@ to install:
sudo python ./setup.py install
+this will create a python library called 'rfidiot'.
+
+*** note - if you are upgrading from a version that didn't use an install script,
+and you've written your own clients, you'll need to make the following changes:
+
+ replace all instances of 'RFIDIOTconfig' with 'rfidiot'
+
+ e.g.
+
+ import RFIDIOtconfig
+
+ becomes
+
+ import rfidiot
+
+ and
+
+ args= RFIDIOtconfig.args
+
+ becomes
+
+ args= rfidiot.args
+
+ etc.
+
View
@@ -21,20 +21,21 @@
#
-import RFIDIOtconfig
+import rfidiot
import random
import sys
import os
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
+ print "Couldn't open reader!"
os._exit(True)
-args= RFIDIOtconfig.args
-help= RFIDIOtconfig.help
+args= rfidiot.args
+help= rfidiot.help
-card.info('bruteforce v0.1h')
+card.info('bruteforce v0.1i')
card.select()
print 'Card ID: ' + card.uid
View
@@ -22,18 +22,19 @@
#
-import RFIDIOtconfig
+import rfidiot
import sys
import os
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
+ print "Couldn't open reader!"
os._exit(True)
-args= RFIDIOtconfig.args
+args= rfidiot.args
-card.info('cardselect v0.1l')
+card.info('cardselect v0.1m')
# force card type if specified
if len(args) == 1:
card.settagtype(args[0])
View
@@ -22,14 +22,15 @@
#
-import RFIDIOtconfig
+import rfidiot
import sys
import os
import string
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
+ print "Couldn't open reader!"
os._exit(True)
card.info('copytag v0.1d')
View
@@ -20,16 +20,17 @@
# GNU General Public License for more details.
#
-import RFIDIOtconfig
+import rfidiot
import sys
import os
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
+ print "Couldn't open reader!"
os._exit(False)
-args= RFIDIOtconfig.args
+args= rfidiot.args
print 'Setting ID to: ' + args[0]
print card.demotag(card.DT_SET_UID,card.ToBinary(args[0]))
View
@@ -21,16 +21,17 @@
#
-import RFIDIOtconfig
+import rfidiot
import sys
import os
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
+ print "Couldn't open reader!"
os._exit(True)
-card.info('eeprom v0.1c')
+card.info('eeprom v0.1e')
print 'Station:\t' + card.station()
print 'Protocol:\t' + card.PCON()
print 'Protocol2:\t' + card.PCON2()
View
@@ -21,20 +21,20 @@
#
-import RFIDIOtconfig
+import rfidiot
import sys
import os
import string
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
os._exit(True)
-args= RFIDIOtconfig.args
-help= RFIDIOtconfig.help
+args= rfidiot.args
+help= rfidiot.help
-card.info('fdxbnum v0.1e')
+card.info('fdxbnum v0.1f')
precoded= False
View
@@ -21,17 +21,18 @@
#
-import RFIDIOtconfig
+import rfidiot
import sys
import string
import os
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
+ print "Couldn't open reader!"
os._exit(True)
-card.info('formatmifare1k v0.1b')
+card.info('formatmifare1k v0.1c')
card.select()
print 'Card ID: ' + card.data
while True:
View
@@ -20,16 +20,17 @@
# GNU General Public License for more details.
#
-import RFIDIOtconfig
+import rfidiot
import sys
import os
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
+ print "Couldn't open reader!"
os._exit(True)
-card.info('froschtest v0.1c')
+card.info('froschtest v0.1d')
print
print 'Trying Hitag1: ',
if card.frosch(card.FR_HT1_Get_Snr,''):
View
@@ -25,21 +25,22 @@
import sys
import os
import string
-import RFIDIOtconfig
+import rfidiot
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
+ print "Couldn't open reader!"
os._exit(True)
-
-card.info('hidprox v0.1c')
+card.info('hidprox v0.1e')
if not card.readersubtype == card.READER_OMNIKEY:
- print 'Reader type not supported!'
+ print 'Reader type not supported!', card.ReaderSubType, card.READER_OMNIKEY
os._exit(True)
try:
+ card.select()
prox= card.pcsc_atr[:6]
type= card.HID_PROX_TYPES[prox]
print ' Card type:', type
View
@@ -22,19 +22,20 @@
#
-import RFIDIOtconfig
+import rfidiot
import sys
import os
import time
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
+ print "Couldn't open reader!"
os._exit(True)
-args= RFIDIOtconfig.args
+args= rfidiot.args
-card.info('hitag2brute v0.1b')
+card.info('hitag2brute v0.1c')
pwd= 0x00
View
@@ -21,20 +21,21 @@
#
-import RFIDIOtconfig
+import rfidiot
import sys
import os
import string
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
+ print "Couldn't open reader!"
os._exit(True)
-args= RFIDIOtconfig.args
-help= RFIDIOtconfig.help
+args= rfidiot.args
+help= rfidiot.help
-card.info('hitag2reset v0.1d')
+card.info('hitag2reset v0.1e')
# standard config block
#CFB='06' + card.HITAG2_TRANSPORT_TAG
View
@@ -25,15 +25,16 @@
import sys
import os
import string
-import RFIDIOtconfig
+import rfidiot
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
+ print "Couldn't open reader!"
os._exit(True)
-card.info('isotype v0.1l')
+card.info('isotype v0.1m')
typed= 0
if card.readertype == card.READER_ACG:
View
@@ -28,17 +28,18 @@
# 15/11/08 - ver 0.1a - first cut, seems to work. :)
# 13/01/09 - ver 0.1b - add RANDOM UID mode
-import RFIDIOtconfig
+import rfidiot
import sys
import os
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
+ print "Couldn't open reader!"
os._exit(True)
-args= RFIDIOtconfig.args
-Help= RFIDIOtconfig.help
+args= rfidiot.args
+Help= rfidiot.help
# fixed values required by JCOP applet
CLA= '00'
@@ -49,7 +50,7 @@
RANDOM= '03'
MIFARE_AID= 'DC4420060606'
-card.info('jcopmifare v0.1d')
+card.info('jcopmifare v0.1e')
if Help or len(args) < 2:
print '\nUsage:\n\n\t%s [OPTIONS] <READ|WRITE|RANDOM> <MIFARE_PWD> [SECTOR] [HEX DATA]' % sys.argv[0]
View
@@ -24,18 +24,18 @@
# GNU General Public License for more details.
#
-import RFIDIOtconfig
+import rfidiot
import sys
import os
import string
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
os._exit(True)
-args= RFIDIOtconfig.args
-Help= RFIDIOtconfig.help
+args= rfidiot.args
+Help= rfidiot.help
# fixed values required by JCOP applet
CLA= '80'
View
@@ -21,7 +21,7 @@
# GNU General Public License for more details.
#
-import RFIDIOtconfig
+import rfidiot
import sys
import os
import string
@@ -30,12 +30,13 @@
from pyasn1.codec.ber import decoder
try:
- card= RFIDIOtconfig.card
+ card= rfidiot.card
except:
+ print "Couldn't open reader!"
os._exit(True)
-args= RFIDIOtconfig.args
-Help= RFIDIOtconfig.help
+args= rfidiot.args
+Help= rfidiot.help
# fixed values required by JCOP applet
CLA= '80'
@@ -270,7 +271,7 @@ def decode_gp_registry_data(data, padding, filter):
return False
return True
-card.info('jcoptool v0.1c')
+card.info('jcoptool v0.1d')
if Help or len(args) < 1:
print '\nUsage:\n\n\t%s [OPTIONS] <COMMAND> [ARGS] [ENC Key] [MAC Key] [KEK Key]' % sys.argv[0]
print
Oops, something went wrong.

0 comments on commit 271cf40

Please sign in to comment.