Skip to content

Instantly share code, notes, and snippets.

@amalmurali47
Created April 24, 2020 16:00
Show Gist options
  • Save amalmurali47/3d55d2aeb5aa69adbcc54df1733ea929 to your computer and use it in GitHub Desktop.
Save amalmurali47/3d55d2aeb5aa69adbcc54df1733ea929 to your computer and use it in GitHub Desktop.
Check which characters are converted by the web server
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