Site icon moneyslow.com

nmap扫描ip地址并使用http-title参数输出网页标题title十六进制进行转换

zsh: bad CPU type in executable: nmap

zsh: bad CPU type in executable: nmap

所以nmap给出了参数http-title,可以用下面的命令:

nmap --script=http-title -sV -p 80 --script=http-title 132.221.34.16
nmap --script=http-title -sV -p 80 --script=http-title -iL ip.txt
nmap --script=http-title -sV -p 80 --script=http-title --script-args="http.useragent='Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0'" 132.221.34.16

但是坑爹的是网页如果是中文标题,就直接给出十六进制的编码输出了:

PORT   STATE SERVICE VERSION
80/tcp open  http    nginx
| http-title: \xE6\xA3\xA7\xE2\xA1\x20\xE5\xB9\xA3\xE2\x3F\x8E
|_Requested resource was http://132.221.34.16/login.jsp

官方并没有好的解决方案,有人问了这个问题:https://github.com/nmap/nmap/issues/1415

当然可以用print来对十六进制进行转换,就是稍微麻烦一点:

print '\xE6\xA3\xA7\xE2\xA1\x20\xE5\xB9\xA3\xE2\x3F\x8E'

关于进制转换,可以看文章:

其他nmap基础命令好文:

https://www.cyberciti.biz/networking/nmap-command-examples-tutorials

Exit mobile version