【发布时间】:2015-07-06 07:36:18
【问题描述】:
我正在尝试使用nmap 确定特定 IP 地址的操作系统。到目前为止,这是我的代码:
import java.io.*;
public class NmapFlags {
public static void main(String[] args) throws Exception {
try {
String[] cmdarray = { "nmap", "-O", "66.110.59.130" };//
// example trying to find the OS or device detials of this Ip address//
Process process = Runtime.getRuntime().exec(cmdarray);
BufferedReader r = new BufferedReader(new InputStreamReader(
process.getInputStream()));
String s;
while ((s = r.readLine()) != null) {
System.out.println(s);
}
r.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
运行此代码后,我得到的是:
All 1000 scanned ports on 66.110.59.130 are filtered
All 1000 scanned ports on 66.110.59.130 are filtered
Too many fingerprints match this host to give specific OS details
Too many fingerprints match this host to give specific OS details
OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
OS detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 246.06 seconds
Nmap done: 1 IP address (1 host up) scanned in 246.06 seconds**
还有其他nmap 标志可以用来检测设备类型吗?我试过 -A 选项。我需要在跟踪路由的每一跳找到设备详细信息。
【问题讨论】:
-
这不是java 问题,这是
nmap问题。你应该问Super User
标签: nmap