mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
make throttle time for associate and deauth configurable
This commit is contained in:

committed by
Jeroen Oudshoorn

parent
2de631c409
commit
9ce379d2f4
@ -423,11 +423,14 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer):
|
||||
|
||||
return self._history[who] < self._config['personality']['max_interactions']
|
||||
|
||||
def associate(self, ap, throttle=0):
|
||||
def associate(self, ap, throttle=-1):
|
||||
if self.is_stale():
|
||||
logging.debug("recon is stale, skipping assoc(%s)", ap['mac'])
|
||||
return
|
||||
|
||||
if throttle == -1 and "throttle_a" in self._config['personality']:
|
||||
throttle = self._config['personality']['throttle_a']
|
||||
|
||||
if self._config['personality']['associate'] and self._should_interact(ap['mac']):
|
||||
self._view.on_assoc(ap)
|
||||
|
||||
@ -444,11 +447,14 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer):
|
||||
time.sleep(throttle)
|
||||
self._view.on_normal()
|
||||
|
||||
def deauth(self, ap, sta, throttle=0):
|
||||
def deauth(self, ap, sta, throttle=-1):
|
||||
if self.is_stale():
|
||||
logging.debug("recon is stale, skipping deauth(%s)", sta['mac'])
|
||||
return
|
||||
|
||||
if throttle == -1 and "throttle_d" in self._config['personality']:
|
||||
throttle = self._config['personality']['throttle_d']
|
||||
|
||||
if self._config['personality']['deauth'] and self._should_interact(sta['mac']):
|
||||
self._view.on_deauth(sta)
|
||||
|
||||
|
Reference in New Issue
Block a user