Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mariomadproductions committed May 27, 2022
0 parents commit d327f75
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions nxdumptool_card_id_set_to_strings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env python3
import argparse
from pathlib import Path

def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('file')
return parser.parse_args()

def main():
args = get_args()
input_file_path = Path(args.file)

if input_file_path.stat().st_size != 12:
raise ValueError('Wrong file size')

with open(input_file_path, 'rb') as file:
print('Card ID 1: ' + file.read(4).hex().upper())
print('Card ID 2: ' + file.read(4).hex().upper())
print('Card ID 3: ' + file.read(4).hex().upper())

if __name__ == '__main__':
main()

0 comments on commit d327f75

Please sign in to comment.