mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Version 2.3.8
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
@ -5,7 +5,6 @@ Wants=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
PermissionsStartOnly=true
|
|
||||||
ExecStart=/usr/bin/bettercap-launcher
|
ExecStart=/usr/bin/bettercap-launcher
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=30
|
RestartSec=30
|
||||||
|
@ -7,7 +7,6 @@ After=pwngrid-peer.service
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
WorkingDirectory=/tmp
|
WorkingDirectory=/tmp
|
||||||
PermissionsStartOnly=true
|
|
||||||
ExecStart=/usr/bin/pwnagotchi-launcher
|
ExecStart=/usr/bin/pwnagotchi-launcher
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=30
|
RestartSec=30
|
||||||
|
@ -6,7 +6,6 @@ After=bettercap.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
PermissionsStartOnly=true
|
|
||||||
ExecStart=/usr/local/bin/pwngrid -keys /etc/pwnagotchi -peers /root/peers -address 127.0.0.1:8666 -client-token /root/.api-enrollment.json -wait -log /var/log/pwngrid-peer.log -iface wlan0mon
|
ExecStart=/usr/local/bin/pwngrid -keys /etc/pwnagotchi -peers /root/peers -address 127.0.0.1:8666 -client-token /root/.api-enrollment.json -wait -log /var/log/pwngrid-peer.log -iface wlan0mon
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=30
|
RestartSec=30
|
||||||
|
@ -40,12 +40,9 @@ class Client(object):
|
|||||||
|
|
||||||
async def start_websocket(self, consumer):
|
async def start_websocket(self, consumer):
|
||||||
s = "%s/events" % self.websocket
|
s = "%s/events" % self.websocket
|
||||||
async with websockets.connect(s, ping_interval=60, ping_timeout=90) as ws:
|
|
||||||
# After the websocket connection is opened, loop waiting for messages
|
|
||||||
# Moved the websocket connection before the loop to avoid runaway websocket
|
|
||||||
# connections that were exhausting all possible TCP ports (ephemeral port exhaustion)
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
|
async with websockets.connect(s, ping_interval=60, ping_timeout=90) as ws:
|
||||||
async for msg in ws:
|
async for msg in ws:
|
||||||
try:
|
try:
|
||||||
await consumer(msg)
|
await consumer(msg)
|
||||||
|
Reference in New Issue
Block a user