介绍
- python版脚本是用来驱动
secScan
程序的,所以把 secScript.py 当作程序API的使用示例方法。 - 由于Golang语言的普及率和开发门槛较高,所以开放Python示例程序以用于设计更多自定义的功能。
- python版脚本默认输出的是JSON格式。
现有的方法及功能如下
- icp():获取ICP备案信息的方法
- ip():获取IP属地信息的方法
- dns():获取域名的A记录的方法
- analyze_url():获取URL分析结果的方法
- exploit():漏洞检测的方法
方法介绍
icp()
- 返回值:dict | None
- 传入值:
- keyword: str
返回值
{
'list': [
{
'natureName': '企业',
'unitName': '北京百度网讯科技有限公司',
'mainLicence': '京ICP证030173号',
'serviceLicence': '京ICP证030173号-1',
'updateRecordTime': '2019-05-16',
'domain': 'baidu.com'
}
],
'size': 1
}
ip()
- 返回值:dict | None
- 传入值:
- ipv4: str
返回值
{
'ip': '209.141.52.86',
'Country': '美国',
'Province': 'Nevada',
'City': 'LAS VEGAS',
'County': '',
'Operator': 'FranTech Solutions',
'lineType': ''
}
dns()
- 返回值:dict | None
- 传入值:
- domain: str
返回值
{
'domain': 'baidu.com',
'ip': [
'110.242.68.66',
'39.156.66.10'
],
'dnsServer': '114.114.114.114',
'timer': '2024-12-20 16:09:56'
}
analyze_url()
- 返回值:dict | None
- 传入值:
- uri: str
- cms: str
返回值
{
'title': '百度一下,你就知道',
'CMS': None,
'status': 200,
'timer': 4.092433,
'server': 'bfe',
'charset': 'utf-8',
'length': 2411,
'anlian': None,
'domains': None,
'ips': None,
'sCode': '<!DOCTYPE html>\r\n<!--STATUS OK--><html> <head><meta http-equiv=content-type content=text/html;charset=utf-8><meta http-equiv=X-UA-Compatible content=IE=Edge><meta content=always name=referrer><link rel=stylesheet type=text/css href=https://ss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/bdorz/baidu.min.css><title>百度一下,你就知道</title></head> <body link=#0000cc> <div id=wrapper> <div id=head> <div class=head_wrapper> <div class=s_form> <div class=s_form_wrapper> <div id=lg> <img hidefocus=true src=//www.baidu.com/img/bd_logo1.png width=270 height=129> </div> <form id=form name=f action=//www.baidu.com/s class=fm> <input type=hidden name=bdorz_come value=1> <input type=hidden name=ie value=utf-8> <input type=hidden name=f value=8> <input type=hidden name=rsv_bp value=1> <input type=hidden name=rsv_idx value=1> <input type=hidden name=tn value=baidu><span class="bg s_ipt_wr"><input id=kw name=wd class=s_ipt value maxlength=255 autocomplete=off autofocus=autofocus></span><span class="bg s_btn_wr"><input type=submit id=su value=百度一下 class="bg s_btn" autofocus></span> </form> </div> </div> <div id=u1> <a href=http://news.baidu.com name=tj_trnews class=mnav>新闻</a> <a href=https://www.hao123.com name=tj_trhao123 class=mnav>hao123</a> <a href=http://map.baidu.com name=tj_trmap class=mnav>地图</a> <a href=http://v.baidu.com name=tj_trvideo class=mnav>视频</a> <a href=http://tieba.baidu.com name=tj_trtieba class=mnav>贴吧</a> <noscript> <a href=http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u=http%3A%2F%2Fwww.baidu.com%2f%3fbdorz_come%3d1 name=tj_login class=lb>登录</a> </noscript> <script>document.write(\'<a href="http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u=\'+ encodeURIComponent(window.location.href+ (window.location.search === "" ? "?" : "&")+ "bdorz_come=1")+ \'" name="tj_login" class="lb">登录</a>\');\r\n </script> <a href=//www.baidu.com/more/ name=tj_briicon class=bri style="display: block;">更多产品</a> </div> </div> </div> <div id=ftCon> <div id=ftConw> <p id=lh> <a href=http://home.baidu.com>关于百度</a> <a href=http://ir.baidu.com>About Baidu</a> </p> <p id=cp>©2017\xa0Baidu\xa0<a href=http://www.baidu.com/duty/>使用百度前必读</a>\xa0 <a href=http://jianyi.baidu.com/ class=cp-feedback>意见反馈</a>\xa0京ICP证030173号\xa0 <img src=//www.baidu.com/img/gs.gif> </p> </div> </div> </div> </body> </html>\r\n',
'vul': None,
'header': 'HTTP/1.1 200 OK\n\nContent-Type: text/html\nServer: bfe\nDate: Fri, 20 Dec 2024 08:10:17 GMT',
'link': 'https://www.baidu.com',
'urls': [
'https://ss1.bdstatic.com/',
'http://news.baidu.com',
'https://www.hao123.com',
'http://map.baidu.com',
'http://v.baidu.com',
'http://tieba.baidu.com',
'http://www.baidu.com/',
'http://home.baidu.com',
'http://ir.baidu.com',
'http://jianyi.baidu.com/'
],
'redirect': '',
'keywords': '',
'description': '',
'emails': None,
'GithubAccessToken': {
'Github': None
},
'idCard': None
}
exploit()
- 返回值:dict | None
- 传入值:
- _poc: str
- _url: str
返回值
{
'key': '',
'isVul': False,
'product': '福建科立迅通信指挥调度平台',
'vName': '福建科立迅通信指挥调度平台 down_file.php SQL注入',
'vType': 'SQL注入',
'vId': [
'CVE-2024-2620'
],
'level': '高危',
'vDesc': '福建科立迅通信指挥调度平台down_file.php 接口处SQL注入漏洞,恶意攻击者可能利用该漏洞获取服务器敏感信息,最后造成服务器失陷。',
'link': 'https://blog.csdn.net/qq_40550150/article/details/137012649',
'version': '',
'note': '',
'search': {
'FOFA': 'body="app/structure/departments.php" || app="指挥调度管理平台"'
},
'fix': [
'建议联系软件厂商进行处理。'
],
'request': None,
'timer': '2024-12-20 16:13:24'
}
poc_info()
- 返回值:dict | None
- 传入值:
- typer: str [list、json]
返回值 list
{
'*': [
'C:\\Users\\b0bef\\Documents\\Birdy\\script\\secScript\\vul\\NetDrivers\\通杀\\安全设备(防火墙、网关、安全审计系统)RCE.yaml'
],
'AJ-Report': [
'C:\\Users\\b0bef\\Documents\\Birdy\\script\\secScript\\vul\\WebApplication\\AJ-Report\\AJ-Report validationRules远程命令执行.yaml'
],
'Alibaba Druid': [
'C:\\Users\\b0bef\\Documents\\Birdy\\script\\secScript\\vul\\ServicesApplication\\Alibaba Druid\\Alibaba Druid 未授权访问.yaml'
]
}
json
{
'list': {
'cms': {
'AspCMS': [
'AspCMS commentList.asp SQL注入'
],
'CMS Made Simple (CMSMS)': [
'CMS Made Simple (CMSMS) 前台SQL注入漏洞'
],
'DedeCMS': [
'DedeCMS makehtml_archives_action.php文件SQL注入'
],
'Joomla': [
'Joomla未授权访问漏洞CVE-2023-23752'
],
'RuoYi': [
'若依管理系统后台resource任意文件下载'
],
'WordPress': [
'WordPress Automatic Plugin任意文件下载'
],
'YzmCMS': [
'YzmCMS pay_callback.html远程命令执行'
],
'铭飞CMS': [
'铭飞CMS list接口SQL注入'
]
}
}
}