From 6bab1015a75c56b175b84e5918fc84e7969e6c3a Mon Sep 17 00:00:00 2001 From: witchdocsec <107813117+witchdocsec@users.noreply.github.com> Date: Tue, 24 Sep 2024 20:34:36 +0100 Subject: [PATCH] Update expload.py added double extension method and the ability to pass cookies and headers --- expload.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/expload.py b/expload.py index 9925371..3e22872 100644 --- a/expload.py +++ b/expload.py @@ -14,7 +14,7 @@ def grabsig(ext): def fileupload(): ext=args.ext name=args.name - filename=args.filename + filename=args.filename if not args.doubleextend else ".".join(args.filename.split(".")[0:-1])+f".{args.ext}."+args.filename.split(".")[-1] with open(args.payload,"r") as payload: content=payload.read().encode("utf-8") with tempfile.NamedTemporaryFile() as tmp: @@ -31,7 +31,7 @@ def fileupload(): with httpx.Client(http2=args.http2) as client: try: - r = client.post(args.url, files=files) + r = client.post(args.url, files=files, headers=args.headers) except httpx.ReadTimeout: print("Error: Response timed out but file may have been uploaded") @@ -45,7 +45,9 @@ def fileupload(): print("Error: Connection refused") exit() - print("file posted") + print("file posted") + if args.response: + print(r.text) if __name__ == "__main__": args=exploadlib.parse.parser()