Page 7 of 8
Re: Nmap
Posted: Sat Nov 11, 2017 10:03 am
by topix
I've made the changes needed. Basically it's as simple as moving some lines.
AddGrowableCol/
AddGrowableRow has to be called after the widgets were added to the sizer. So instead of
Code: Select all
Sizer = wx.GridBagSizer(5, 10)
Sizer.AddGrowableCol(1)
Sizer.AddGrowableRow(5, namedSizer.GetSize()[1])
Sizer.AddGrowableRow(6, groupSizer.GetSize()[1])
Sizer.Add(label_0, (0, 0), flag = wx.TOP|ACV)
Sizer.Add(namedSizer, (5, 0),(1,2), flag = wx.EXPAND|wx.TOP|ACV)
Sizer.Add(groupSizer, (6, 0),(1,2), flag = wx.EXPAND|wx.TOP|ACV)
it has to be
Code: Select all
Sizer = wx.GridBagSizer(5, 10)
Sizer.Add(label_0, (0, 0), flag = wx.TOP|ACV)
Sizer.Add(namedSizer, (5, 0),(1,2), flag = wx.EXPAND|wx.TOP|ACV)
Sizer.Add(groupSizer, (6, 0),(1,2), flag = wx.EXPAND|wx.TOP|ACV)
Sizer.AddGrowableCol(1)
Sizer.AddGrowableRow(5, namedSizer.GetSize()[1])
Sizer.AddGrowableRow(6, groupSizer.GetSize()[1])
Re: Nmap
Posted: Sat Nov 11, 2017 10:53 am
by Pako
topix wrote: Sat Nov 11, 2017 10:03 amI've made the changes needed.
Thank you for your support !
Pako
Re: Nmap
Posted: Mon Nov 13, 2017 1:07 am
by Tomkun
topix wrote: Sat Nov 11, 2017 10:03 am
I've made the changes needed.
Works perfectly, thank you.
Edit:
Spoke too soon. Now the configuration dialog opens, but I am getting more errors.
Code: Select all
Error starting plugin: Nmap
Traceback (most recent call last) (0.5.0-rc4):
File "H:\Home Theatre\EventGhost\eg\Classes\PluginInstanceInfo.py", line 192, in Start
self.instance.__start__(*self.args)
File "H:\Home Theatre\EventGhost\plugins\nMap\__init__.py", line 1652, in __start__
if self.evtFilter[4]:
IndexError: list index out of range
Re: Nmap
Posted: Mon Nov 13, 2017 6:22 pm
by topix
I didn't had nmap installed and didn't click on all buttons

but now it should do it's job. I installed nmap and did a short test with EG 0.4 and 0.5.
Re: Nmap
Posted: Tue Nov 14, 2017 12:10 am
by Tomkun
Thanks, but I'm still getting the exact same error with your new version.
Code: Select all
Error starting plugin: Nmap
Traceback (most recent call last) (0.5.0-rc4):
File "H:\Home Theatre\EventGhost\eg\Classes\PluginInstanceInfo.py", line 192, in Start
self.instance.__start__(*self.args)
File "H:\Home Theatre\EventGhost\plugins\nMap\__init__.py", line 1652, in __start__
if self.evtFilter[4]:
IndexError: list index out of range
Re: Nmap
Posted: Tue Nov 14, 2017 5:25 am
by topix
Hmm, strange. Can you remove the plugin from config tree, save config, restart EG and add the plugin again? If that doesn't help then replace lines 1652+1653 with this code:
Code: Select all
try:
if self.evtFilter[4]:
self.TriggerEvent(self.text.dataUn)
except IndexError:
pass
Re: Nmap
Posted: Wed Nov 15, 2017 12:05 am
by Tomkun
I removed and reinstalled the plugin and it now works correctly. Unfortunately I lost all my configured devices and had to delete all the actions I had created with nMap, but at least now it works.
Thank you very much!
Re: Nmap
Posted: Thu Jun 28, 2018 4:11 pm
by HTPCanwender
The Profile Manager does not open anymore. I get the following message:
17:53:53 Traceback (most recent call last) (WIP-2018.06.03-12.44.49):
17:53:53 File "wx\_core.pyc", line 16766, in <lambda>
17:53:53 File "C:\Program Files (x86)\EventGhost\plugins\Nmap\__init__.py", line 406, in ShowProfileDialog
17:53:53 max = 99,
17:53:53 File "C:\Program Files (x86)\EventGhost\eg\Classes\SpinIntCtrl.py", line 58, in __init__
17:53:53 **kwargs
17:53:53 File "C:\Program Files (x86)\EventGhost\eg\Classes\SpinNumCtrl.py", line 115, in __init__
17:53:53 raise MaxValueError(value, max_val)
17:53:53 MaxValueError: The set value 15 is higher then the maximum of 99
Is it a problem with the WIP Version of EG? I am using the Nmap plugin 1.02
Re: Nmap
Posted: Sat Jun 30, 2018 6:25 pm
by kgschlosser
I will take a look at the plugin code as well as the spinnumctrl in EG and see what is going on. we have been fighting issues with this control to find the best possible way to handle problems with it. the problems are in the core of wxPython and a bug report was submitted 10 years ago about this problem and it is still not foxed even in the latest beta builds they have. every time we think we are good to go with the fix. it breaks something else we didn't account for.
Re: Nmap
Posted: Sat Jun 30, 2018 6:38 pm
by kgschlosser
well this is a very very very strange issue
the lines of code that trigger that exception read as follows
Code: Select all
if value > max_val:
raise MaxValueError(value, max_val)
the set max value is 99 and the set value is 15. so according to this logic it should have never passed. Unless the data being passed is in fact not an integer but it is a string instead. which would be the fault of the plugin.
if you modify line 404 of the plugins __init__.py file from
to
be sure to preserve the spacking before the text.
see if that solves the issue.
Re: Nmap
Posted: Sun Jul 01, 2018 5:09 am
by HTPCanwender
After replacing the variable for the security factor in line 404
data[0][1],
with
int(data[0][1]),
i got a similar message for the scanning period
06:42:49 Traceback (most recent call last) (WIP-2018.06.03-12.44.49):
06:42:49 File "wx\_core.pyc", line 16766, in <lambda>
06:42:49 File "C:\Program Files (x86)\EventGhost\plugins\Nmap\__init__.py", line 415, in ShowProfileDialog
06:42:49 max = 600,
06:42:49 File "C:\Program Files (x86)\EventGhost\eg\Classes\SpinIntCtrl.py", line 58, in __init__
06:42:49 **kwargs
06:42:49 File "C:\Program Files (x86)\EventGhost\eg\Classes\SpinNumCtrl.py", line 115, in __init__
06:42:49 raise MaxValueError(value, max_val)
06:42:49 MaxValueError: The set value 30 is higher then the maximum of 600
So I replaced in line 413
data[0][2],
with
int(data[0][2]),
Now the profile manager is ok. I have attached the modyfied plugin as version 1.0.3
Re: Nmap
Posted: Sun Jul 01, 2018 9:13 pm
by kgschlosser
check that out!
Good deal. I thought i was going mental with this SpinNumCtrl. Then again one would think that the author would be passing the proper data type to the SpinNumCtrl. The error didn't show before because the person that wrote the control was doing type conversions in it (which shouldn't be done) in order to work around a bug.
The issue with the way they did it was it would only fix the bug when using the eg.SpinNumCtrl and not if a user directly accessed the underlying control in wxPython. The correct way was to monkey patch the underlying control so it would work as advertised if it was used directly or through the use of eg.SpinNumCtrl. when topic2k and I put this into place we were able to remove all of the code in eg.SpinNumCtrl that was associated with working around the problem. I guess we removed a type conversion that was in that work around that allowed this plugin to work.
Sorry for the inconvenience. and TY for repairing the plugin and posting an updated version of it.
Re: Nmap
Posted: Sun Dec 08, 2019 11:49 pm
by Tomkun
Would someone be kind enough to post a version that is working with the latest Eventghost and Windows 10? All the links are dead it seems.
Re: Nmap
Posted: Mon Dec 09, 2019 7:13 am
by kgschlosser
See if this will work for ya.
Re: Nmap
Posted: Wed Dec 11, 2019 8:51 am
by Tomkun
Thank you very much. I shall test it asap.