@@ -66,7 +66,7 @@ def get_existing_pmkid_file(bssid):
6666 pmkid_pattern = os .path .join (Configuration .wpa_handshake_dir , 'pmkid_*.22000' )
6767 files_found = glob .glob (pmkid_pattern )
6868 log_debug ('AttackPMKID' , f'Found { len (files_found )} PMKID file(s) to check' )
69-
69+
7070 for pmkid_filename in files_found :
7171 if not os .path .isfile (pmkid_filename ):
7272 continue
@@ -141,15 +141,15 @@ def run_hashcat(self):
141141 return False
142142
143143 from ..util .process import Process
144-
144+
145145 # Check tool availability - prioritize hcxdumptool, fallback to native
146146 use_native_pmkid = False
147147 dependencies = [
148148 HcxDumpTool .dependency_name ,
149149 HcxPcapngTool .dependency_name
150150 ]
151151 missing_deps = [dep for dep in dependencies if not Process .exists (dep )]
152-
152+
153153 if missing_deps :
154154 # Check if native PMKID capture is available as fallback
155155 if NATIVE_PMKID_AVAILABLE :
@@ -528,22 +528,22 @@ def dumptool_thread(self):
528528 def capture_pmkid_native (self ):
529529 """
530530 Capture PMKID using native Scapy implementation.
531-
531+
532532 This is a fallback method when hcxdumptool is not available.
533533 Uses ScapyPMKID to capture PMKID by sending auth frames and
534534 listening for EAPOL Message 1 responses.
535-
535+
536536 Returns:
537537 Path to PMKID hash file (.22000) if captured, None otherwise
538538 """
539539 log_info ('AttackPMKID' , f'Starting native PMKID capture for { self .target .essid } ({ self .target .bssid } )' )
540-
540+
541541 if self .view :
542542 self .view .add_log ("Starting native PMKID capture (Scapy)..." )
543543 self .view .set_capture_tool ("Native (Scapy)" )
544-
544+
545545 Color .pattack ('PMKID' , self .target , 'CAPTURE' , 'Starting native capture...' )
546-
546+
547547 try :
548548 # Set interface to target channel
549549 from ..native .interface import NativeInterface
@@ -553,17 +553,17 @@ def capture_pmkid_native(self):
553553 log_debug ('AttackPMKID' , f'Set channel to { self .target .channel } ' )
554554 except Exception as e :
555555 log_warning ('AttackPMKID' , f'Could not set channel: { e } ' )
556-
556+
557557 # Capture PMKID with timeout
558558 timeout = Configuration .pmkid_timeout
559559 self .timer = Timer (timeout )
560-
560+
561561 # Track progress for TUI
562562 def on_pmkid_captured (result ):
563563 log_info ('AttackPMKID' , f'Native capture found PMKID: { result .pmkid [:16 ]} ...' )
564564 if self .view :
565565 self .view .add_log (f'PMKID captured!' )
566-
566+
567567 # Use ScapyPMKID capture
568568 result = ScapyPMKID .capture (
569569 interface = Configuration .interface ,
@@ -574,7 +574,7 @@ def on_pmkid_captured(result):
574574 channel = int (self .target .channel ) if self .target .channel else None ,
575575 callback = on_pmkid_captured
576576 )
577-
577+
578578 if result is None :
579579 log_warning ('AttackPMKID' , 'Native PMKID capture failed: no PMKID received' )
580580 if self .view :
@@ -583,22 +583,22 @@ def on_pmkid_captured(result):
583583 Color .pattack ('PMKID' , self .target , 'CAPTURE' , '{R}Failed{O} to capture PMKID (native)\n ' )
584584 Color .pl ('' )
585585 return None
586-
586+
587587 # Success - convert to hashcat format and save
588588 log_info ('AttackPMKID' , 'Native PMKID capture successful' )
589589 if self .view :
590590 self .view .update_pmkid_status (True , 1 )
591591 self .view .add_log ("Successfully captured PMKID (native)!" )
592-
592+
593593 Color .clear_entire_line ()
594594 Color .pattack ('PMKID' , self .target , 'CAPTURE' , '{G}Captured PMKID{W} (native)' )
595-
595+
596596 # Generate hashcat 22000 format
597597 pmkid_hash = result .to_hashcat_22000 ()
598-
598+
599599 # Save to file
600600 return self .save_pmkid (pmkid_hash )
601-
601+
602602 except Exception as e :
603603 log_error ('AttackPMKID' , f'Native PMKID capture error: { e } ' , e )
604604 if self .view :
0 commit comments