Created
May 23, 2013 18:39
-
-
Save joelewis/5638389 to your computer and use it in GitHub Desktop.
A python script to launch a series of requests to tancet result servers, to fetch me my register number which I lost. It's gonna try all possible combinations of numbers matching my DOB, and writes to matches.txt if a match is found. Warning: This might be a form of brute force attack, combined with DOS attack, except that annauniv.edu is not de…
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
import urllib | |
import urllib2 | |
import bs4 | |
startreg = 11161667 | |
endreg = 11170000 | |
for i in range(startreg, endreg): | |
istr = str(i) | |
soup = bs4.BeautifulSoup(urllib2.urlopen(urllib2.Request('http://www.annauniv.edu/cgi-bin/786786786/cet1.pl',urllib.urlencode ({'regno' : i, 'dob' : '14-09-1991' }))).read()) | |
if(soup.find('span') != None): | |
print 'found it ' + istr | |
doc = open('matches.txt','a') | |
doc.write("\n"+ istr) | |
doc.close() | |
else: print 'not ' + istr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment