明御安全网关(IPS)批量导入黑名单IP

这个版本的系统不支持批量导入黑名单IP列表进入地址池,简单抓了个包分析一下
在这里插入图片描述
提交的原始报文:

POST /webui/?g=obj_address_edit&name=拉黑IP HTTP/1.1
Host: 10.10.1.2
Proxy-Connection: keep-alive
Content-Length: 667
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://10.10.1.2
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://10.10.1.2/webui/?g=obj_address_edit&name=aaaaaaaaaa
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: USGSESSID=aaaaaaaaaaaaaaaaaaaa

name=拉黑IP&new_name=拉黑IP&description=拉黑IP&addr_type=主机地址&conf_netaddr=&conf_range_sip=&conf_range_eip=&conf_host=&conf_domain=&ipaddr_items=[{"type":"host","address":"1.1.1.1"},{"type":"host","address":"2.2.2.2"}]&ipaddr_items_hidden=[{"type":"host","address":"1.1.1.1"},{"type":"host","address":"2.2.2.2"}]&conf_exclude_hidden=&exclude=&submit_post=obj_address_editsave

根据报文,按其格式,生成IP列表的数据,替换过去即可

#要批量拉黑的ip保存进同目录下的1.txt,一行一个IP
with open('1.txt',encoding='utf-8') as file:
	content=file.readlines()#按行读取

for line in content:
	line_new=line.replace('\n','')#将换行符替换为空
	info='{"type":"host","address":"'+line_new+'"}'
	print (info)
	
#输出后,使用sublime text替换\n为','  并通过burp发包批量添加

在这里插入图片描述
整理一下格式化的IP列表,组合一下报文,即可发包给服务器了,回显success就添加成功了在这里插入图片描述
当然也可以将发包集成进脚本里,懒得弄了,批量拉黑IP的操作频率不高。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值