new on_internet_available event
This commit is contained in:
parent
ba3a7bb65e
commit
26fe8ca059
docs
sdcard/rootfs/root/pwnagotchi/scripts
19
docs/about.md
Normal file
19
docs/about.md
Normal file
@ -0,0 +1,19 @@
|
||||
## About the Project
|
||||
|
||||
[Pwnagotchi](https://twitter.com/pwnagotchi) is an "AI" that learns from the WiFi environment and instruments
|
||||
[bettercap](https://www.bettercap.org/) in order to maximize the WPA key material that's being captured either passively
|
||||
or by performing deauthentication and association attakcs. This material is collected as pcap files containing any form
|
||||
of handshake supported by [hashcat](https://hashcat.net/hashcat/), including [PMKIDs](https://www.evilsocket.net/2019/02/13/Pwning-WiFi-networks-with-bettercap-and-the-PMKID-client-less-attack/),
|
||||
full and half WPA handshakes.
|
||||
|
||||

|
||||
|
||||
Instead of playing [Super Mario or Atari games](https://becominghuman.ai/getting-mario-back-into-the-gym-setting-up-super-mario-bros-in-openais-gym-8e39a96c1e41?gi=c4b66c3d5ced), pwnagotchi will tune over time [its own parameters](https://github.com/evilsocket/pwnagotchi/blob/master/sdcard/rootfs/root/pwnagotchi/config.yml#L54), effectively learning to get better at pwning WiFi things. **Keep in mind:** unlike the usual RL simulations, pwnagotchi learns over time (where a single epoch can last from a few seconds to minutes, depending on how many access points and client stations are visible), do not expect it to perform amazingly well at the beginning, as it'll be exploring several combinations of parameters ... but listen to it when it's bored, bring it with you and have it observe new networks and capture new handshakes and you'll see :)
|
||||
|
||||
Multiple units can talk to each other, advertising their own presence using a parasite protocol I've built on top of the existing dot11 standard, by broadcasting custom information elements. Over time, two or more units learn to cooperate if they detect each other's presence, by dividing the available channels among them.
|
||||
|
||||

|
||||
|
||||
Depending on the status of the unit, several states and states transitions are configurable and represented on the display as different moods, expressions and sentences.
|
||||
|
||||
If instead you just want to use your own parameters and save battery and CPU cycles, you can disable the AI in `config.yml` and enjoy an automated deauther, WPA handshake sniffer and portable bettercap + webui dedicated hardware.
|
0
docs/configure.md
Normal file
0
docs/configure.md
Normal file
0
docs/connect.md
Normal file
0
docs/connect.md
Normal file
5
docs/index.md
Normal file
5
docs/index.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Documentation
|
||||
|
||||
- [About the Project](https://github.com/evilsocket/pwnagotchi/blob/master/docs/about.md)
|
||||
- [How to Install](https://github.com/evilsocket/pwnagotchi/blob/master/docs/install.md)
|
||||
- [Configuration](https://github.com/evilsocket/pwnagotchi/blob/master/docs/configure.md)
|
0
docs/install.md
Normal file
0
docs/install.md
Normal file
0
docs/plugins.md
Normal file
0
docs/plugins.md
Normal file
@ -101,30 +101,33 @@ if args.do_manual:
|
||||
display.on_manual_mode(log)
|
||||
time.sleep(1)
|
||||
|
||||
if config['twitter']['enabled'] and log.is_new() and Agent.is_connected() and log.handshakes > 0:
|
||||
import tweepy
|
||||
if Agent.is_connected():
|
||||
plugins.on('internet_available', config, log)
|
||||
|
||||
logging.info("detected a new session and internet connectivity!")
|
||||
if config['twitter']['enabled'] and log.is_new() and log.handshakes > 0:
|
||||
import tweepy
|
||||
|
||||
picture = '/dev/shm/pwnagotchi.png'
|
||||
logging.info("detected a new session and internet connectivity!")
|
||||
|
||||
display.update(force=True)
|
||||
display.image().save(picture, 'png')
|
||||
display.set('status', 'Tweeting...')
|
||||
display.update(force=True)
|
||||
picture = '/dev/shm/pwnagotchi.png'
|
||||
|
||||
try:
|
||||
auth = tweepy.OAuthHandler(config['twitter']['consumer_key'], config['twitter']['consumer_secret'])
|
||||
auth.set_access_token(config['twitter']['access_token_key'], config['twitter']['access_token_secret'])
|
||||
api = tweepy.API(auth)
|
||||
display.update(force=True)
|
||||
display.image().save(picture, 'png')
|
||||
display.set('status', 'Tweeting...')
|
||||
display.update(force=True)
|
||||
|
||||
tweet = Voice(lang=config['main']['lang']).on_log_tweet(log)
|
||||
api.update_with_media(filename=picture, status=tweet)
|
||||
log.save_session_id()
|
||||
try:
|
||||
auth = tweepy.OAuthHandler(config['twitter']['consumer_key'], config['twitter']['consumer_secret'])
|
||||
auth.set_access_token(config['twitter']['access_token_key'], config['twitter']['access_token_secret'])
|
||||
api = tweepy.API(auth)
|
||||
|
||||
logging.info("tweeted: %s" % tweet)
|
||||
except Exception as e:
|
||||
logging.exception("error while tweeting")
|
||||
tweet = Voice(lang=config['main']['lang']).on_log_tweet(log)
|
||||
api.update_with_media(filename=picture, status=tweet)
|
||||
log.save_session_id()
|
||||
|
||||
logging.info("tweeted: %s" % tweet)
|
||||
except Exception as e:
|
||||
logging.exception("error while tweeting")
|
||||
|
||||
quit()
|
||||
|
||||
|
@ -17,6 +17,11 @@ def on_loaded():
|
||||
logging.warning("WARNING: plugin %s should be disabled!" % __name__)
|
||||
|
||||
|
||||
# called in manual mode when there's internet connectivity
|
||||
def on_internet_available(config, log):
|
||||
pass
|
||||
|
||||
|
||||
# called to setup the ui elements
|
||||
def on_ui_setup(ui):
|
||||
# add custom UI elements
|
||||
|
Loading…
x
Reference in New Issue
Block a user