ondryaso / pi-rc522

Raspberry Pi Python library for SPI RFID RC522 module
MIT License
412 stars 150 forks source link

deauth() doesn't reset the authentication data #1

Closed ghost closed 9 years ago

ghost commented 9 years ago
print "\nChanging Key"
util.write_trailer(1, (0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), (0xFF, 0x07, 0x80), 105, (0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF))
util.deauth()

util.auth(rdr.auth_a, [0xFF,0xFF,0xFF,0xFF,0xFF,0xFF])
util.do_auth(util.block_addr(1, 0))  # OUTPUT : Not calling card_auth - already authed
print "\nWriting modified bytes"   
rdr.write(4, [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])

I am changing the Trailer first and call the deauth(), but I called the do_auth, it said already authed.

I am wonder deauth() can give a total reset or not. So I can change the Data Block after I changed the Trailer Thanks!