java nmap集成_nmap为了开发方便 可以做简单的修改

因为nmap扫描是默认使用的是nse脚本,但是在开发的过程中需要修改后缀(主要是因为后缀为lua才能显示高亮,所以这里用一个取巧的办法)

nse_main.lua文件中我们找到如下代码

local t, path = cnse.fetchscript(rule);

if t == nil then -- perhaps omitted the extension?

t, path = cnse.fetchscript(rule..".nse");

end

大家可以看到其实我们载入nse脚本扫描的过程中系统如果识别不出来才在后面加上一个nse后缀

我们可以在这里取个巧

local t, path = cnse.fetchscript(rule);

if t == nil then -- perhaps omitted the extension?

t, path = cnse.fetchscript(rule..".nse");

end

if t == nil then -- perhaps omitted the extension with lua?

t, path = cnse.fetchscript(rule..".lua");

end

代码很简单找不到nse后缀继续找lua后缀的脚本载入

/--------------------

默认default情况下的修改我还在找

转载至链接:https://my.oschina.net/9199771/blog/1831950

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值