@@ -18,10 +18,11 @@ class Reaver(Attack, Dependency):
1818 dependency_name = 'reaver'
1919 dependency_url = 'https://github.com/t6x/reaver-wps-fork-t6x'
2020
21- def __init__ (self , target , pixie_dust = True ):
21+ def __init__ (self , target , pixie_dust = True , null_pin = False ):
2222 super (Reaver , self ).__init__ (target )
2323
2424 self .pixie_dust = pixie_dust
25+ self .null_pin = null_pin
2526
2627 self .progress = '0.00%'
2728 self .state = 'Initializing'
@@ -51,6 +52,9 @@ def __init__(self, target, pixie_dust=True):
5152 if pixie_dust :
5253 self .reaver_cmd .extend (['--pixie-dust' , '1' ])
5354
55+ if null_pin :
56+ self .reaver_cmd .extend (['-p' , '' ])
57+
5458 self .reaver_proc = None
5559
5660 @staticmethod
@@ -117,7 +121,7 @@ def _run(self):
117121
118122 # Check if locked
119123 if self .locked and not Configuration .wps_ignore_lock :
120- raise Exception ('{O}Access point is {R}Locked{W}' )
124+ raise Exception ('{O}Because access point is {R}Locked{W}' )
121125
122126 time .sleep (0.5 )
123127
@@ -134,7 +138,7 @@ def _run(self):
134138
135139
136140 def get_status (self ):
137- if self .pixie_dust :
141+ if self .pixie_dust or self . null_pin :
138142 main_status = ''
139143 else :
140144 # Include percentage
@@ -206,6 +210,9 @@ def parse_failure(self, stdout):
206210 if self .pixie_dust and self .running_time () > Configuration .wps_pixie_timeout :
207211 raise Exception ('Timeout after %d seconds' % Configuration .wps_pixie_timeout )
208212
213+ if self .null_pin and self .running_time () > Configuration .wps_pixie_timeout :
214+ raise Exception ('Timeout after %d seconds' % Configuration .wps_pixie_timeout )
215+
209216 # WPSFail count
210217 self .total_wpsfails = stdout .count ('WPS transaction failed' )
211218 if self .total_wpsfails >= Configuration .wps_fail_threshold :
@@ -297,12 +304,16 @@ def pattack(self, message, newline=False):
297304 time_left = Configuration .wps_pixie_timeout - self .running_time ()
298305 time_msg = '{O}%s{W}' % Timer .secs_to_str (time_left )
299306 attack_name = 'Pixie-Dust'
307+ elif self .null_pin :
308+ time_left = Configuration .wps_pixie_timeout - self .running_time ()
309+ time_msg = '{O}%s{W}' % Timer .secs_to_str (time_left )
310+ attack_name = 'NULL PIN'
300311 else :
301312 time_left = self .running_time ()
302313 time_msg = '{C}%s{W}' % Timer .secs_to_str (time_left )
303314 attack_name = 'PIN Attack'
304315
305- if self .total_attempts > 0 and not self .pixie_dust :
316+ if self .total_attempts > 0 and not self .pixie_dust and not self . null_pin :
306317 time_msg += ' {D}PINs:{W}{C}%d{W}' % self .total_attempts
307318
308319 Color .clear_entire_line ()
0 commit comments