Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # how to use : python antimatripheantispamcolor.py link username email
- # e.g : python http://localhost/matriphe tes tes@gmail.com
- import urllib
- import urllib2
- import cookielib
- import re
- import sys
- colors = {
- '#ff0000' : ('red',0),
- '#008000' : ('green',1),
- '#0060b6' : ('blue',2),
- '#ffd700' : ('yellow',3),
- '#000000' : ('black',4),
- '#ffffff' : ('white',5),
- '#ff69b4' : ('pink',6),
- '#ffa500' : ('orange',7),
- '#800080' : ('purple',8),
- '#7f7f7f' : ('grey',9),
- }
- cj = cookielib.CookieJar()
- opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
- temp = opener.open('%s/wp-login.php?action=register' %sys.argv[1])
- resp = temp.read()
- search_color = re.findall(r'background-color:(.*); border-color: rgb', resp)
- post_date = urllib.urlencode({'user_login':sys.argv[2], 'user_email':sys.argv[3], 'color_name':colors[search_color[0]][0], 'color_id':colors[search_color[0]][1], 'redirect_to':'', 'wp-submit':'Register'})
- final = opener.open('%s/wp-login.php?action=register' %sys.argv[1], post_date)
- final_resp = final.read()
- if re.search(r"Registration complete. Please check your e-mail.", final_resp):
- print "register complete, please check your email"
- else:
- print "error register"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement