Update expload.py

main
witchdocsec 2024-09-20 11:21:30 +01:00 committed by GitHub
parent f55c52d43a
commit 4759a89f7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -18,7 +18,11 @@ def fileupload():
with open(args.payload,"r") as payload:
content=payload.read().encode("utf-8")
with tempfile.NamedTemporaryFile() as tmp:
sig,mime=grabsig(ext)
try:
sig,mime=grabsig(ext)
except TypeError:
print("Error: most likely this file type is not in the available signature list")
exit()
tmp.write(sig)
tmp.write(b"\n")
tmp.write(content)