S
Sard
I'm using the following to execute "nbtscan 192.168.0.1-255"
(http://www.inetcat.org/software/nbtscan.html)
String line;
Process aProcess = Runtime.getRuntime().exec(cmdline);
BufferedReader input = new BufferedReader(new
InputStreamReader(
aProcess.getInputStream()));
while ((line = input.readLine()) != null)
{
output.add(line);
}
input.close();
So I can pass the output. Unfortunately I get
java.io.IOException: CreateProcess: nbtscan.exe 192.168.0.1-255
error=53
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
at java.lang.Runtime.exec(Runtime.java:591)
at java.lang.Runtime.exec(Runtime.java:429)
at java.lang.Runtime.exec(Runtime.java:326)
I am able to execute many other processes and capture their output but
not this one.
I'm using nbtscan as the InetAddress class is very unreliable as
reporting which ip addresses are reachable and it fails to
getHostName() a lot of the time too. Any help or a better was to get a
list of hosts would be great.
(http://www.inetcat.org/software/nbtscan.html)
String line;
Process aProcess = Runtime.getRuntime().exec(cmdline);
BufferedReader input = new BufferedReader(new
InputStreamReader(
aProcess.getInputStream()));
while ((line = input.readLine()) != null)
{
output.add(line);
}
input.close();
So I can pass the output. Unfortunately I get
java.io.IOException: CreateProcess: nbtscan.exe 192.168.0.1-255
error=53
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
at java.lang.Runtime.exec(Runtime.java:591)
at java.lang.Runtime.exec(Runtime.java:429)
at java.lang.Runtime.exec(Runtime.java:326)
I am able to execute many other processes and capture their output but
not this one.
I'm using nbtscan as the InetAddress class is very unreliable as
reporting which ip addresses are reachable and it fails to
getHostName() a lot of the time too. Any help or a better was to get a
list of hosts would be great.