This commit is contained in:
dadav committed 2019-12-07 09:30:05 +01:00
1 parent e04e053cee
commit 4fb7205281
2 files changed
+11 -3

No files matched your search

@@ -2,20 +2,27 @@ import os
import logging import logging
import re import re
import requests import requests
from threading import Lock
from pwnagotchi.utils import StatusFile from pwnagotchi.utils import StatusFile
import pwnagotchi.plugins as plugins import pwnagotchi.plugins as plugins
from json.decoder import JSONDecodeError
class OnlineHashCrack(plugins.Plugin): class OnlineHashCrack(plugins.Plugin):
__author__ = '[email protected]' __author__ = '[email protected]'
__version__ = '2.0.0' __version__ = '2.0.1'
__license__ = 'GPL3' __license__ = 'GPL3'
__description__ = 'This plugin automatically uploads handshakes to https://onlinehashcrack.com' __description__ = 'This plugin automatically uploads handshakes to https://onlinehashcrack.com'
def __init__(self): def __init__(self):
self.ready = False self.ready = False
try:
self.report = StatusFile('/root/.ohc_uploads', data_format='json')
except JSONDecodeError as json_err:
os.remove('/root/.ohc_uploads')
self.report = StatusFile('/root/.ohc_uploads', data_format='json') self.report = StatusFile('/root/.ohc_uploads', data_format='json')
self.skip = list() self.skip = list()
self.lock = Lock()
def on_loaded(self): def on_loaded(self):
""" """
@@ -68,6 +75,7 @@ class OnlineHashCrack(plugins.Plugin):
""" """
Called in manual mode when there's internet connectivity Called in manual mode when there's internet connectivity
""" """
with self.lock:
if self.ready: if self.ready:
display = agent.view() display = agent.view()
config = agent.config() config = agent.config()
+2 -2
View File
@@ -1,8 +1,8 @@
import os import os
import logging import logging
import threading
import requests import requests
from datetime import datetime from datetime import datetime
from threading import Lock
from pwnagotchi.utils import StatusFile from pwnagotchi.utils import StatusFile
from pwnagotchi import plugins from pwnagotchi import plugins
from json.decoder import JSONDecodeError from json.decoder import JSONDecodeError
@@ -16,7 +16,7 @@ class WpaSec(plugins.Plugin):
def __init__(self): def __init__(self):
self.ready = False self.ready = False
self.lock = threading.Lock() self.lock = Lock()
try: try:
self.report = StatusFile('/root/.wpa_sec_uploads', data_format='json') self.report = StatusFile('/root/.wpa_sec_uploads', data_format='json')
except JSONDecodeError as json_err: except JSONDecodeError as json_err: