WhitewidowScanner / whitewidow

SQL Vulnerability Scanner
972 stars 235 forks source link

sqlmap python settings #44

Closed tlsnine closed 7 years ago

tlsnine commented 7 years ago

Issue:

New installs of Arch Linux uses python 3.5 as the default. (and is my preference)

Since sqlmap requires python 2.7 (2.6), a quick edit of the "whitewidow.rb" file is needed to get things working properly for those running a newer version of python as their default.

Dirty Solution:

Line 128-ish system("python #{SQLMAP_PATH} -m #{SQL_VULN_SITES_LOG} #{commands}") needs to be changed to -> system("python2.7 #{SQLMAP_PATH} -m #{SQL_VULN_SITES_LOG} #{commands}")

I'm sure this could also be accomplished by setting the python virtualenv to 2.7, but that seems like overkill in this case.

Whitewidow version number: 1.9.7.15

Ruby version number: n/a

Labels

Ekultek commented 7 years ago

Why not just download 2.7.x and make it default and use python35 for 3.5.x and above? They're your environment variables you can do whatever you want with them. I could however check what version of python the user is running and catch the env from there I guess

tlsnine commented 7 years ago

I've got python2.7 installed as well, but most of what I do is using ver 3.5. Generally I assign/use a python virtualenv when I want to make a project run under 2.7. I don't think a major (or any) change to this ruby script needs to be undertaken, just wanted to give a quick heads-up that some users might have this issue and changing that one line is a quick way for them to get it sorted out. More like a how-to than a request for change :)

Ekultek commented 7 years ago

Yeah I got you man, but now you got me thinking of all the cool shit I can do to change the env variables and such lol. I'll figure it out, leave this open for a little bit

tlsnine commented 7 years ago

Ok then. Glad I could help :P I've got a few more little ideas that I'll play around with on my side too and run em by you when they're fleshed out...

Ekultek commented 7 years ago

Always up for good ideas to implement, let me know what you come up with. What I'd really like to see right now is time based Boolean tests

Ekultek commented 7 years ago

Here's what's going to happen, I'm going to reconfigure the sqlmap launch into it's own class and make it so that it will find your env for python, if you have more then one python installed it will launch from python 2.7.x