Finding Errors in setup.py for The Middler
I was very excited to see The Middler was included with RC2. I went to run setup.py and immediately encountered errors:
Code:
running build
running build_py
error: package directory 'middlerlib' does not exist
At first I thought maybe bt had forgot to include a package with this but I combed the net for a minute and didn't find anything. I took a chance that maybe the middlerlib was really the folder in the directory called "libmiddler". Opened up setup.py and changed it to this:
Code:
packages = ['libmiddler','libmiddler.plugins','middler.plugins.support']
Ran "python setup.py build" again and things seem to work up to the middler.plugins.support:
Code:
# python setup.py build
running build
running build_py
creating build/lib/libmiddler/plugins
copying libmiddler/plugins/plugin_metasploit.py -> build/lib/libmiddler/plugins
copying libmiddler/plugins/__init__.py -> build/lib/libmiddler/plugins
copying libmiddler/plugins/plugin_debug.py -> build/lib/libmiddler/plugins
copying libmiddler/plugins/plugin_iframe_injection.py -> build/lib/libmiddler/plugins
copying libmiddler/plugins/plugin_30x_redirect.py -> build/lib/libmiddler/plugins
error: package directory 'middler/plugins/support' does not exist
I tried a few things but can't seem to get this last part to work. Any help much appreciated.
Re: Finding Errors in setup.py for The Middler
Thanks for letting us know. I have moved this to the bug section. I will try and look into this a bit later on today.
In the meantime can anyone else confirm this? Thanks.
Respuesta: Re: Finding Errors in setup.py for The Middler
Hello,
Yes. Encounter same errors.
Re: Finding Errors in setup.py for The Middler
Able to replicate results as well.
Re: Finding Errors in setup.py for The Middler
Ok I have found the problem with this package and am working on a fix. It will be in the repos soon.
In the interim please be patient. I will try to update this thread once I know that the new package is available.
Also please note that if you see a "setup" or other such similar (installer) file in a given package, we have already ran this and set things up for the user.
So there is generally no need to run them again. If anything it may cause problems. That is not the case with this tool, but I am putting it out there considering others tried to use it as shown above.
Re: Finding Errors in setup.py for The Middler
Re: Finding Errors in setup.py for The Middler
Well, after much waiting I saw I had to enable the BackTrack Devel Repository instead of using just the default. Unfortunately the new package I just downloaded of the Middler didn't work either. I did get a little further in my own work fixing it though. I'll keep posting it here if anyone cares. I've found the app will actually compile if you change line 5 of the setup.py file to this:
Code:
packages = ['libmiddler','libmiddler.plugins','libmiddler.plugins']
But when I go to run it I seem to get 2 errors in the python code itself:
Code:
# python ./middler.py
Traceback (most recent call last):
File "./middler.py", line 105, in <module>
ml.traffic_capture.start()
File "/pentest/spoofing/middler/libmiddler/traffic_capture.py", line 380, in start
redirectIPTablesNewStart()
File "/pentest/spoofing/middler/libmiddler/traffic_capture.py", line 189, in redirectIPTablesNewStart
from netfilter.rule import Rule,Match,Target
ImportError: No module named netfilter.rule