Created
June 20, 2019 17:09
-
-
Save par6n/5a63b185dcb422dd53efa4d8fe125ab3 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
import sys | |
from urlparse import urlparse | |
while sys.stdin: | |
try: | |
strLine = sys.stdin.readline().strip() ## It is very important to use strip! | |
uriComponents = urlparse( strLine ) | |
if uriComponents.query == "token=correct": | |
print uriComponents.path | |
else: | |
print "/files/403.html" | |
sys.stdout.flush() | |
except: | |
print "NULL" | |
sys.stdout.flush() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment