nmap 缺少module 'citrixxml'以及citrixxml.lua的修补
2015-08-06 11:39
801 查看
当使用nmap的--script功能时,可以参考nmap脚本使用总结,但是在ubuntu12.04 LTS下使用默认下载安装的nmap(版本为5.21)时,
当运行nmap --script all 172.16.24.12,会提示缺少citrixxml模块,提示如下
NSE: failed to initialize the script engine:
/usr/share/nmap/nse_main.lua:276: /usr/share/nmap/scripts/citrix-brute-xml.nse:35: module 'citrixxml' not found
解决方法:去nmap官网下载citrixxml.lua,方法如下:
sudo wget -O /usr/share/nmap/nselib/citrixxml.lua http://nmap.org/svn/nselib/citrixxml.lua
若提示没有认证,只需在wget后加上--no-check-certificate选项
但是下载完成之后,再去执行nmap --script all 172.16.24.12,会提示如下错误
NSE: failed to initialize the script engine:
/usr/share/nmap/nse_main.lua:276: error loading module 'citrixxml' from file '/usr/share/nmap/nselib/citrixxml.lua':
/usr/share/nmap/nselib/citrixxml.lua:87: unfinished string near '"<?xml version="1.0" encoding="ISO-8859-1"?>z'
我的解决方法就是: 利用lua的拼接字符串的方法,具体修改见附件
然后还可能会出现:
NSE: failed to initialize the script engine:
/usr/share/nmap/nse_main.lua:276: /usr/share/nmap/nselib/citrixxml.lua:25: attempt to call field 'module' (a nil value)或者
NSE: failed to initialize the script engine:
/usr/share/nmap/nse_main.lua:276: /usr/share/nmap/nselib/strict.lua:64: variable '_ENV' is not declared
修改方法参见:citrixxml.lua的bug修复
若看不懂的话,去查看附件好了,其中已经修改好
这些工作做完,就可以使用--script功能了,至于什么情况下使用什么样的script,直接去找对应的脚本即可,在/usr/share/nmap/scripts/下。
修改好的citrixxml.lua附件地址为:fixed_citrixxml.lua
当运行nmap --script all 172.16.24.12,会提示缺少citrixxml模块,提示如下
NSE: failed to initialize the script engine:
/usr/share/nmap/nse_main.lua:276: /usr/share/nmap/scripts/citrix-brute-xml.nse:35: module 'citrixxml' not found
解决方法:去nmap官网下载citrixxml.lua,方法如下:
sudo wget -O /usr/share/nmap/nselib/citrixxml.lua http://nmap.org/svn/nselib/citrixxml.lua
若提示没有认证,只需在wget后加上--no-check-certificate选项
但是下载完成之后,再去执行nmap --script all 172.16.24.12,会提示如下错误
NSE: failed to initialize the script engine:
/usr/share/nmap/nse_main.lua:276: error loading module 'citrixxml' from file '/usr/share/nmap/nselib/citrixxml.lua':
/usr/share/nmap/nselib/citrixxml.lua:87: unfinished string near '"<?xml version="1.0" encoding="ISO-8859-1"?>z'
我的解决方法就是: 利用lua的拼接字符串的方法,具体修改见附件
然后还可能会出现:
NSE: failed to initialize the script engine:
/usr/share/nmap/nse_main.lua:276: /usr/share/nmap/nselib/citrixxml.lua:25: attempt to call field 'module' (a nil value)或者
NSE: failed to initialize the script engine:
/usr/share/nmap/nse_main.lua:276: /usr/share/nmap/nselib/strict.lua:64: variable '_ENV' is not declared
修改方法参见:citrixxml.lua的bug修复
若看不懂的话,去查看附件好了,其中已经修改好
这些工作做完,就可以使用--script功能了,至于什么情况下使用什么样的script,直接去找对应的脚本即可,在/usr/share/nmap/scripts/下。
修改好的citrixxml.lua附件地址为:fixed_citrixxml.lua
相关文章推荐
- PLT:说说Evaluation strategy
- lua 三元运算符的使用
- Lua实现类的封装
- Lua中,泛型for循环遍历table时,ipairs和pairs的区别
- Lua学习笔记(二):基本语法
- UIM:Ballot evaluation
- Lua笔记6-闭包1
- Lua脚本之语法基础快速入门
- Lua笔记1-类型与值
- 【Lua】【4】Lua之——高级函数和控制结构
- 【Lua】【3】Lua之使用表
- 【Lua】【2】Lua基本的函数和控制结构
- 【Lua】【1】Lua游戏脚本语言入门之杂码
- Lua简明入门实践(从"基"搞起)_(四)Lua标准库与文件
- 【Lua】【1】Lua游戏脚本语言入门(转载)
- 【Lua】【1】探讨Lua基础知识
- Lua简明入门实践(从"基"搞起)_(三)Metatables和面向对象
- Lua文件操作和串行化
- Lua文件操作和串行化
- Lua的字符串分割函数