SamJoan / droopescan

A plugin-based scanner that aids security researchers in identifying issues with several CMSs, mainly Drupal & Silverstripe.
GNU Affero General Public License v3.0
1.27k stars 249 forks source link

droopescan does not run on Windows #33

Closed mSharif10 closed 5 years ago

mSharif10 commented 5 years ago

I got this error when I try to install droopescan with pip or i use python setup.py install

raise ValueError, "path '%s' cannot be absolute" % pathname ValueError: path '/etc/bash_completion.d/' cannot be absolutePlease include:

SamJoan commented 5 years ago

hi @mAshraf9

Thanks for your bug report! Can you please please tell me what OS you are running on? Based on the error, it would suggest that you are running Windows, which I would like to support but will likely not have the time to implement support for. I would accept a PR for it as well.

If you are running Linux, please run the following command so I can get more information:

pip -vU install droopescan

Also please paste your OS information such as what distribution and version number.

mSharif10 commented 5 years ago

OS: Windows 10 python : 2.7 or 3.x both tested. Here is the trace: ...\droopescan\droopescan-master>python setup.py install running install running build running build_py running egg_info writing requirements to droopescan.egg-info\requires.txt writing droopescan.egg-info\PKG-INFO writing top-level names to droopescan.egg-info\top_level.txt writing dependency_links to droopescan.egg-info\dependency_links.txt reading manifest file 'droopescan.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'droopescan.egg-info\SOURCES.txt' running build_scripts running install_lib running install_data Traceback (most recent call last): File "setup.py", line 52, in cmdclass={'install': PostInstall} File "C:\Python27\lib\distutils\core.py", line 151, in setup dist.run_commands() File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands self.run_command(cmd) File "C:\Python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "setup.py", line 21, in run install.run(self) File "C:\Python27\lib\site-packages\setuptools\command\install.py", line 65, in run orig.install.run(self) File "C:\Python27\lib\distutils\command\install.py", line 575, in run self.run_command(cmd_name) File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command self.distribution.run_command(command) File "C:\Python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "C:\Python27\lib\distutils\command\install_data.py", line 58, in run dir = convert_path(f[0]) File "C:\Python27\lib\distutils\util.py", line 124, in convert_path raise ValueError, "path '%s' cannot be absolute" % pathname ValueError: path '/etc/bash_completion.d/' cannot be absolute

thanks @droope

SamJoan commented 5 years ago

hi @mAshraf9 ,

At the moment running droopescan in Windows is not supported. I would personally install Kali in a VM and run it there.

I would like to investigate more on whether it can be easily ported. I suspect this particular issue can be resolved by commenting line 52 in setup.py with no side effects, but I am unsure on how the rest of droopescan is going to behave.

If you can try that and let me know I can put a workaround that checks the currently running OS and only runs that section of the code on Linux

mSharif10 commented 5 years ago

Hi @droope commenting out that line worked and also installing droopescan from python package sites worked without errors. but i tried to use the tool and didn't worked! Here is what I did:

.... Installing collected packages: droopescan Found existing installation: droopescan 1.41.1 Uninstalling droopescan-1.41.1: Successfully uninstalled droopescan-1.41.1 Running setup.py install for droopescan ... done Successfully installed droopescan-1.41.1

C:\Users\mAshraf9>droopescan scan --help 'droopescan' is not recognized as an internal or external command, operable program or batch file.

thanks again @droope

SamJoan commented 5 years ago

Sorry about the super late reply. I've been pretty busy lately.

I suspect that happens because the the droopescan binary is not in your path. If droopescan ever works in windows, it would be by running python droopescan.py [args]. The location of droopescan would be where you installed it I think.

To solve this we would have to add a .bat file to the setup, which I'm not opposed to if you're keen to do it.

mykey commented 5 years ago

Just a suggestion that might help somebody out. Droopescan works great on (the very minimal) Kali in Windows Subsystem for Linux.

SamJoan commented 5 years ago

That's great to hear! I wonder if that would work for @mAshraf9, you can install Kali WSL from the windows app store. I expect it also runs well in Windows WSL.

@mAshraf9 if this resolves the issue for you I'll close it.

Thansks, Pedro

SamJoan commented 5 years ago

Closing this one, let me know if you need any more info.