Skip to content

Commit

Permalink
Added --disable-http-redirects option
Browse files Browse the repository at this point in the history
  • Loading branch information
mazen160 committed Dec 15, 2021
1 parent 7be0f1c commit 0502467
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions log4j-scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@
dest="custom_dns_callback_host",
help="Custom DNS Callback Host.",
action='store')
parser.add_argument("--disable-http-redirects",
dest="disable_redirects",
help="Disable HTTP redirects. Note: HTTP redirects are useful as it allows the payloads to have higher chance of reaching vulnerable systems.",
action='store_true')

args = parser.parse_args()

Expand Down Expand Up @@ -265,6 +269,7 @@ def scan_url(url, callback_host):
headers=get_fuzzing_headers(payload),
verify=False,
timeout=timeout,
redirects=(not args.disable_redirects),
proxies=proxies)
except Exception as e:
cprint(f"EXCEPTION: {e}")
Expand All @@ -279,6 +284,7 @@ def scan_url(url, callback_host):
data=get_fuzzing_post_data(payload),
verify=False,
timeout=timeout,
redirects=(not args.disable_redirects),
proxies=proxies)
except Exception as e:
cprint(f"EXCEPTION: {e}")
Expand All @@ -292,6 +298,7 @@ def scan_url(url, callback_host):
json=get_fuzzing_post_data(payload),
verify=False,
timeout=timeout,
redirects=(not args.disable_redirects),
proxies=proxies)
except Exception as e:
cprint(f"EXCEPTION: {e}")
Expand Down

0 comments on commit 0502467

Please sign in to comment.