mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Add already submitted check
This commit is contained in:
@ -44,10 +44,12 @@ def _upload_to_wpasec(path, timeout=30):
|
|||||||
payload = {'file': file_to_upload}
|
payload = {'file': file_to_upload}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
requests.post('https://wpa-sec.stanev.org/?submit',
|
result = requests.post('https://wpa-sec.stanev.org/?submit',
|
||||||
headers=headers,
|
headers=headers,
|
||||||
files=payload,
|
files=payload,
|
||||||
timeout=timeout)
|
timeout=timeout)
|
||||||
|
if ' already submitted' in result.text:
|
||||||
|
logging.warning(f"{path} was already submitted.")
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
logging.error(f"WPA_SEC: Got an exception while uploading {path} -> {e}")
|
logging.error(f"WPA_SEC: Got an exception while uploading {path} -> {e}")
|
||||||
raise e
|
raise e
|
||||||
|
Reference in New Issue
Block a user