Created
April 24, 2020 16:00
-
-
Save amalmurali47/3d55d2aeb5aa69adbcc54df1733ea929 to your computer and use it in GitHub Desktop.
Check which characters are converted by the web server
This file contains hidden or 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
import re | |
import string | |
import requests | |
def check(c): | |
t = requests.get(f'https://challenge.intigriti.io/{c}').text | |
return re.match(r'404 - \'File "(.*?)" was.*\'', t).group(1) | |
chars = string.punctuation + string.ascii_letters | |
chars = re.sub(r'[#/%]', '', chars) | |
result = dict(zip(chars, re.findall(r'_..|.', check(chars)))) | |
stripped = [c for c, m in result.items() if c != m] | |
print(stripped) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment