@@ -20,10 +20,16 @@ class Bully(Attack, Dependency):
2020 dependency_name = 'bully'
2121 dependency_url = 'https://github.com/kimocoder/bully'
2222
23- def __init__ (self , target2 , target3 , pixie_dust = True ):
24- super ().__init__ (target3 )
23+ def __init__ (self , target2 , target3 = None , pixie_dust = True ):
24+ # Backward compatibility: if only one target is passed
25+ if target3 is None :
26+ super ().__init__ (target2 )
27+ self .target = target2
28+ else :
29+ super ().__init__ (target3 )
30+ self .target = target2
31+
2532 self .pid = None
26- self .target = target2
2733 self .pixie_dust = pixie_dust
2834
2935 self .total_attempts = 0
@@ -42,21 +48,14 @@ def __init__(self, target2, target3, pixie_dust=True):
4248 self .cmd = []
4349
4450 if Process .exists ('stdbuf' ):
45- self .cmd .extend ([
46- 'stdbuf' , '-o0' # No buffer. See https://stackoverflow.com/a/40453613/7510292
47- ])
51+ self .cmd .extend (['stdbuf' , '-o0' ])
4852
53+ # Build Bully command
4954 self .cmd .extend ([
5055 'bully' ,
51- '--bssid' , target2 .bssid ,
52- '--channel' , target2 .channel ,
53- # '--detectlock', # Detect WPS lockouts unreported by AP
54-
55- # Restoring session from '/root/.bully/34210901927c.run'
56- # WARNING: WPS checksum was bruteforced in prior session, now autogenerated
57- # Use --force to ignore above warning(s) and continue anyway
56+ '--bssid' , self .target .bssid ,
57+ '--channel' , self .target .channel ,
5858 '--force' ,
59-
6059 '-v' , '4' ,
6160 Configuration .interface
6261 ])
@@ -66,6 +65,7 @@ def __init__(self, target2, target3, pixie_dust=True):
6665
6766 self .bully_proc = None
6867
68+
6969 def run (self ):
7070 with Airodump (channel = self .target .channel ,
7171 target_bssid = self .target .bssid ,
0 commit comments