Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ optional arguments:
Custom DNS Callback Host.
--disable-http-redirects
Disable HTTP redirects. Note: HTTP redirects are useful as it allows the payloads to have higher chance of reaching vulnerable systems.
--bypass-proxy-for-target-urls
Bypass proxies to send request to target URLs. Use only for DNS callback provider.
```

## Scan a Single URL
Expand Down
10 changes: 7 additions & 3 deletions log4j-scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
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')
parser.add_argument("--bypass-proxy-for-target-urls",
dest="bypass_proxy_for_target_urls",
help="Bypass proxies to send request to target URLs. Use only for DNS callback provider.",
action='store_true')

args = parser.parse_args()

Expand Down Expand Up @@ -276,7 +280,7 @@ def scan_url(url, callback_host):
verify=False,
timeout=timeout,
allow_redirects=(not args.disable_redirects),
proxies=proxies)
proxies=proxies if not args.bypass_proxy_for_target_urls else None)
except Exception as e:
cprint(f"EXCEPTION: {e}")

Expand All @@ -291,7 +295,7 @@ def scan_url(url, callback_host):
verify=False,
timeout=timeout,
allow_redirects=(not args.disable_redirects),
proxies=proxies)
proxies=proxies if not args.bypass_proxy_for_target_urls else None)
except Exception as e:
cprint(f"EXCEPTION: {e}")

Expand All @@ -305,7 +309,7 @@ def scan_url(url, callback_host):
verify=False,
timeout=timeout,
allow_redirects=(not args.disable_redirects),
proxies=proxies)
proxies=proxies if not args.bypass_proxy_for_target_urls else None)
except Exception as e:
cprint(f"EXCEPTION: {e}")

Expand Down