Created
April 26, 2020 11:53
-
-
Save amalmurali47/9d1fd86e8a6187b9ed6ac3a4e2b47295 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