Nmap

Questions and comments specific to a particular plugin should go here.

Nmap

Postby Pako » Sat May 03, 2014 6:59 am

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
Attachments
__init__.py
Plugin Nmap - Version 1.0 (released 2014-09-15)
(101.38 KiB) Downloaded 252 times
__init__.py
Plugin Nmap - Version 0.7 (released 2014-08-03)
- bugfix (main config dialog resize)
(77.2 KiB) Downloaded 122 times
__init__.py
Plugin Nmap - Version 0.6
- added option to choose the length of the scanning period
- added an events Increased and Decreased (when the number of group members is changed)
(77.09 KiB) Downloaded 148 times
You know flattr ? You can Image
User avatar
Pako
Plugin Developer
 
Posts: 2245
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: Nmap

Postby HTPCanwender » Sat May 31, 2014 6:46 am

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
HTPCanwender
 
Posts: 32
Joined: Wed Feb 08, 2012 9:41 pm
Location: Germany

Re: Nmap

Postby Pako » Sat May 31, 2014 6:58 am

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
You know flattr ? You can Image
User avatar
Pako
Plugin Developer
 
Posts: 2245
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: Nmap

Postby HTPCanwender » Sat May 31, 2014 11:14 am

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
HTPCanwender
 
Posts: 32
Joined: Wed Feb 08, 2012 9:41 pm
Location: Germany

Re: Nmap

Postby Pako » Sat May 31, 2014 11:23 am

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
You know flattr ? You can Image
User avatar
Pako
Plugin Developer
 
Posts: 2245
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: Nmap

Postby Pako » Sat May 31, 2014 11:50 am

Can you please try the attached test version 0.4a ?

Pako
Attachments
__init__.py
Test version 0.4a
(75.64 KiB) Downloaded 133 times
You know flattr ? You can Image
User avatar
Pako
Plugin Developer
 
Posts: 2245
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: Nmap

Postby HTPCanwender » Sun Jun 01, 2014 6:32 am

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
HTPCanwender
 
Posts: 32
Joined: Wed Feb 08, 2012 9:41 pm
Location: Germany

Re: Nmap

Postby Pako » Sun Jun 01, 2014 6:51 am

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
You know flattr ? You can Image
User avatar
Pako
Plugin Developer
 
Posts: 2245
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: Nmap

Postby Pako » Sun Jun 01, 2014 7:22 am

Thank you for your cooperation and patience.
You can download the new version 0.5.

Pako
You know flattr ? You can Image
User avatar
Pako
Plugin Developer
 
Posts: 2245
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: Nmap

Postby HTPCanwender » Sun Jun 01, 2014 12:43 pm

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
HTPCanwender
 
Posts: 32
Joined: Wed Feb 08, 2012 9:41 pm
Location: Germany

Re: Nmap

Postby Pako » Sun Jun 01, 2014 1:33 pm

Please use the test version 0.5a and then attach the log here.

Pako
Attachments
__init__.py
Test version 0.5a
(75.81 KiB) Downloaded 122 times
You know flattr ? You can Image
User avatar
Pako
Plugin Developer
 
Posts: 2245
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: Nmap

Postby HTPCanwender » Sun Jun 01, 2014 6:11 pm

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
HTPCanwender
 
Posts: 32
Joined: Wed Feb 08, 2012 9:41 pm
Location: Germany

Re: Nmap

Postby Pako » Mon Jun 02, 2014 6:40 am

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
Attachments
__init__.py
Test version 0.5b
(75.7 KiB) Downloaded 122 times
You know flattr ? You can Image
User avatar
Pako
Plugin Developer
 
Posts: 2245
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: Nmap

Postby HTPCanwender » Mon Jun 02, 2014 9:43 am

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
HTPCanwender
 
Posts: 32
Joined: Wed Feb 08, 2012 9:41 pm
Location: Germany

Re: Nmap

Postby HTPCanwender » Mon Jun 02, 2014 9:58 am

May my german Windows Version cause the Problem? The Folder c:\Program Files (x86) is shown in the Explorer as c:\Programme (x86).
HTPCanwender
 
Posts: 32
Joined: Wed Feb 08, 2012 9:41 pm
Location: Germany

Next

Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 4 guests