File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2540,7 +2540,7 @@ def args_parser(self) -> ArgumentParserNoExit:
25402540
25412541 def on_exec (self , args : argparse .Namespace ):
25422542 self .cmd .ntag_reader ()
2543- # 读取dump文件
2543+ # Read dump file
25442544 dump_data = {}
25452545 if args .f .endswith ('.mfd' ):
25462546 with open (args .f , 'r' ) as f :
@@ -2560,7 +2560,6 @@ def on_exec(self, args: argparse.Namespace):
25602560 print (f"{ CR } Error: Unsupported file format{ C0 } " )
25612561 return
25622562
2563- # 扫描卡片
25642563 resp = self .cmd .hf_14a_scan ()
25652564 if resp is None :
25662565 print ("No tag found" )
@@ -2570,7 +2569,7 @@ def on_exec(self, args: argparse.Namespace):
25702569 uid = resp [0 ]["uid" ]
25712570 key = bytes .fromhex (args .k )
25722571
2573- # 根据卡片类型选择写入方式
2572+ # Write tag depending on generation
25742573 gen = args .g
25752574 if gen == 1 : # Gen1A
25762575 if not self .cmd .isGen1a ():
@@ -2620,13 +2619,13 @@ def on_exec(self, args: argparse.Namespace):
26202619 print (f"{ CR } Tag is not Gen3{ C0 } " )
26212620 return
26222621 print ("Found Gen3 Tag" )
2623- # 设置UID
2622+ # Set UI
26242623 resp1 = self .cmd .setGen3Uid (uid )
26252624 print (f"Set UID to { uid .hex ().upper ()} : { CG } Success{ C0 } " if resp1 else f"Set UID to { uid .hex ().upper ()} : { CR } Failed{ C0 } " )
2626- # 设置block0
2625+ # Set block0
26272626 resp2 = self .cmd .setGen3Block0 (bytes .fromhex (dump_data [0 ]))
26282627 print (f"Set block0: { CG } Success{ C0 } " if resp2 else f"Set block0: { CR } Failed{ C0 } " )
2629- # 写入其他block
2628+ # Write other blocks
26302629 for block , block_data in dump_data .items ():
26312630 if block == 0 :
26322631 continue
You can’t perform that action at this time.
0 commit comments