Lots of reworking, write support for MiFare Ultralights and various

other changes.
This commit is contained in:
2009-02-01 15:13:56 +00:00
parent 75c35102a4
commit 874ef3591e
5 changed files with 52 additions and 596 deletions

21
test.py
View File

@@ -1,13 +1,24 @@
#!/usr/bin/python
import logging, sys
from pytikitag import reader, tikitag
from smartcard.util import toHexString, toASCIIString
m = tikitag.TikiTag()
log = logging.getLogger('pytikitag.mifareul')
h = logging.StreamHandler(sys.stdout)
log.addHandler(h)
r = reader.TikiReader()
print r.firmware_version()
m = tikitag.TikiTag(r)
print m.get_uid()
d = m.read_tag()
print "%s bytes" % len(d)
print toHexString(d)
#d = m.read_tag()
#print "%s bytes" % len(d)
#print toHexString(d)
print m.write_block(0xf, [0xde, 0xad, 0xbe, 0xee])
print toHexString(m.read_block(0xf))