Page 1 of 8
Nmap
Posted: Sat May 03, 2014 6:59 am
by Pako
I now present to you another toy

(plugin).
It is something like the
Ping plugin.
Plugin generates events if a device on local network changes its status (away, present).
Devices can be organized into groups. The plugin then generates events also based on the status of these groups (empty, incomplete, complete).
Here I have to say that I've never used the
Ping plugin, but I read the relevant
topic.
I hope you will play with the new plugin and it will find its users.
Plugin is based on
Nmap. Actually, it's
Nmap frontend.
It follows that install
Nmap is a prerequisite for the functioning of this plugin.
Nmap scans the network and the plugin handles the scanning results. Scanning is done periodically every 30 seconds.
As a unique identifier for each device on the network does not use IP address, but
MAC address.
It is very convenient, but it may mean a little complication when setting up the plugin.
Reliability of scanning is not 100%. The fault lies not on the side of
Nmap, but on the part of some devices
(especially smartphones), which use various saving modes. Hence, the device is considered to be disconnected at the moment
when it is not found during several successive scans. This number can be adjusted using the
Security factor parameter.
This means that at the default setting of 8 is a disconnection detected after 8 * 30 seconds, i.e. after four minutes.
WARNING!
Scanning is performed on OSI layer two, so devices that are separated using a router operating at layer 3 are not visible!
Pako
Re: Nmap
Posted: Sat May 31, 2014 6:46 am
by HTPCanwender
Hi Pako,
I did not manage to get your plugin working. I installed Nmap and it returns all IP and MAC adresses in my Network when I use the Zenmap GUI.
But your plugin reports nothing. It does not find any host.
The "get device status" command sets the eg.result to "None".
The "get IP address" command sets the eg.result to "MAC address xxx not present"
How does your plugin get the data from Nmap?
Yours
Re: Nmap
Posted: Sat May 31, 2014 6:58 am
by Pako
HTPCanwender wrote:I did not manage to get your plugin working. I installed Nmap and it returns all IP and MAC adresses in my Network when I use the Zenmap GUI.
But your plugin reports nothing. It does not find any host.
How do you set the parameter
IP address range ?
Note:
EventGhost plugin uses the command line
nmap -sn -n -PE -PO <IP address range> to start scanning.
You can try to insert the same line into text box
Command: in program Zenmap.
What is the result?
Pako
Re: Nmap
Posted: Sat May 31, 2014 11:14 am
by HTPCanwender
The command
nmap -sn -n -PE -PO 192.168.1.0/24
gives the result
Starting Nmap 6.46 (
http://nmap.org ) at 2014-05-31 12:49 Mitteleuropäische Sommerzeit
Nmap scan report for 192.168.1.1
Host is up (0.00s latency).
MAC Address: 00:1F:3F:4D:67:95 (AVM GmbH)
Nmap scan report for 192.168.1.20
Host is up (0.010s latency).
MAC Address: 00:80:92:4E:AB:8D (Silex Technology)
Nmap scan report for 192.168.1.103
Host is up (0.045s latency).
MAC Address: 24:77:03:8A:45:88 (Intel Corporate)
Nmap scan report for 192.168.1.50
Host is up.
Nmap done: 256 IP addresses (4 hosts up) scanned in 2.79 seconds
The Show Info command from the list of the named devices reports the Status "Away" for every device.
The Output text contains the german umlaut "ä". Could this be the reason?
Yours
Re: Nmap
Posted: Sat May 31, 2014 11:23 am
by Pako
Pako wrote:The Output text contains the german umlaut "ä". Could this be the reason?
Yes, it is very likely.
I will try to fix it.
Pako
Re: Nmap
Posted: Sat May 31, 2014 11:50 am
by Pako
Can you please try the attached test version 0.4a ?
Pako
Re: Nmap
Posted: Sun Jun 01, 2014 6:32 am
by HTPCanwender
Hi Pako,
now I get an error message every 30 seconds:
08:30:12 ---> Willkommen beim EventGhost <---
08:30:14 Autostart
08:30:14 Observation "Versanet" starts
08:30:14 Nmap.DataUnavailable
08:30:14 Main.OnInit
08:30:14 data = Der Befehl "\"C:\Program Files (x86)\Nmap\nmap.exe\"" ist entweder falsch geschrieben oder
08:30:14 konnte nicht gefunden werden.
08:30:14
08:30:14 Nmap.DataAvailable
08:30:15 data = Der Befehl "\"C:\Program Files (x86)\Nmap\nmap.exe\"" ist entweder falsch geschrieben oder
08:30:15 konnte nicht gefunden werden.
08:30:15
08:30:45 data = Der Befehl "\"C:\Program Files (x86)\Nmap\nmap.exe\"" ist entweder falsch geschrieben oder
08:30:45 konnte nicht gefunden werden.
08:30:45
Re: Nmap
Posted: Sun Jun 01, 2014 6:51 am
by Pako
HTPCanwender wrote:now I get an error message every 30 seconds:
Oh, I already see where the problem is.
Please be patient, I'll fix it soon.
Pako
Re: Nmap
Posted: Sun Jun 01, 2014 7:22 am
by Pako
Thank you for your cooperation and patience.
You can download the new version 0.5.
Pako
Re: Nmap
Posted: Sun Jun 01, 2014 12:43 pm
by HTPCanwender
Hi Pako,
I still get no result from the plugin. The status of all devices is still "Away".
14:35:22 Get MAC address
14:35:22 IP address "192.168.1.20" not present
14:35:43 Get IP address
14:35:43 MAC address "00:80:92:4E:AB:8D" not present
Re: Nmap
Posted: Sun Jun 01, 2014 1:33 pm
by Pako
Please use the test version 0.5a and then attach the log here.
Pako
Re: Nmap
Posted: Sun Jun 01, 2014 6:11 pm
by HTPCanwender
Hi Pako,
here is the log.
20:04:53 ---> Willkommen beim EventGhost <---
20:04:54 Autostart
20:04:54 repr(cmd) = [u'""C:\\Program Files (x86)\\Nmap\\nmap.exe""', u'-sn', u'-PE', u'-PO', u'-n', u'192.168.1.0/24']
20:04:55 Nmap.DataUnavailable
20:04:55 Main.OnInit
20:04:57 repr(data) = u'Der Netzwerkpfad wurde nicht gefunden.\r\n'
20:04:57 Nmap.DataAvailable
20:05:15 repr(cmd) = [u'""C:\\Program Files (x86)\\Nmap\\nmap.exe""', u'-sn', u'-PE', u'-PO', u'-n', u'192.168.1.0/24']
20:05:15 repr(data) = u'Der Netzwerkpfad wurde nicht gefunden.\r\n'
20:05:45 repr(cmd) = [u'""C:\\Program Files (x86)\\Nmap\\nmap.exe""', u'-sn', u'-PE', u'-PO', u'-n', u'192.168.1.0/24']
20:05:47 repr(data) = u'Der Netzwerkpfad wurde nicht gefunden.\r\n'
The path where Nmap is installed is
C:\Program Files (x86)\Nmap
Re: Nmap
Posted: Mon Jun 02, 2014 6:40 am
by Pako
I'm sorry, but it's difficult for me, when for me it works ...
Please run the test version 0.5b, then attach the log again.
Thanks, Pako
Re: Nmap
Posted: Mon Jun 02, 2014 9:43 am
by HTPCanwender
Here is the result:
11:41:49 ---> Willkommen beim EventGhost <---
11:41:50 Autostart
11:41:50 Nmap.DataUnavailable
11:41:50 Main.OnInit
11:41:50 repr(self.myExe) = u'"C:\\Program Files (x86)\\Nmap\\nmap.exe"'
11:41:50 repr(data) = u'Der Befehl "\\"C:\\Program Files (x86)\\Nmap\\nmap.exe\\"" ist entweder falsch geschrieben oder\r\nkonnte nicht gefunden werden.\r\n'
11:41:50 Nmap.DataAvailable
Re: Nmap
Posted: Mon Jun 02, 2014 9:58 am
by HTPCanwender
May my german Windows Version cause the Problem? The Folder c:\Program Files (x86) is shown in the Explorer as c:\Programme (x86).