Skip to content

Commit

Permalink
parse.py: Handle dumps from fm11rf08 script
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg committed Nov 26, 2024
1 parent 6607200 commit 9d61e76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
IMPORTANT_BLOCKS = [0] + COMPARISON_BLOCKS

BYTES_PER_BLOCK = 16
BLOCKS_PER_TAG = 64
TOTAL_BYTES = BLOCKS_PER_TAG * BYTES_PER_BLOCK
BLOCKS_PER_TAG = [64, 72] # 64 = 1KB, 72 = Output from Proxmark fm11rf08 script
TOTAL_BYTES = [blocks * BYTES_PER_BLOCK for blocks in BLOCKS_PER_TAG]

# Byte conversions
def bytes_to_string(data):
Expand Down Expand Up @@ -109,8 +109,8 @@ def extend(self, other):

class Tag():
def __init__(self, filename, data):
# Check to make sure the data is 1KB
if len(data) != TOTAL_BYTES:
# Check to make sure the data is 1KB or a known alternative
if len(data) not in TOTAL_BYTES:
raise TagLengthMismatchError(len(data))

# Store the raw data
Expand Down

0 comments on commit 9d61e76

Please sign in to comment.