Skip to content

Commit bdcc28b

Browse files
author
ekultek
committed
you are now successfully able to launch the sqlmap API automatically using the --auto flag (issue #58)
1 parent c7fedc0 commit bdcc28b

File tree

5 files changed

+26
-17
lines changed

5 files changed

+26
-17
lines changed

etc/checksum/md5sum.md5

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
be5c457a19611d8e7f22477ebf733e11 ./zeus.py
1+
9874a6fea201b6c9a9105c61256c0335 ./zeus.py
22
6ad5f22ec4a6f8324bfb1b01ab6d51ec ./etc/scripts/cleanup.sh
33
155c9482f690f1482f324a7ffd8b8098 ./etc/scripts/fix_pie.sh
44
0e435c641bc636ac0b3d54e032d9cf6a .etc/scripts/install_nmap.sh
5-
fa53722189548fe405014fd3a4b32cc5 .etc/scripts/launch_sqlmap.sh
5+
4b32db388e8acda35570c734d27c950c .etc/scripts/launch_sqlmap.sh
66
642a77905d8bb4e5533e0e9c2137c0fa ./etc/agents.txt
77
66b11aa388ea909de7b212341259a318 ./etc/auths/git_auth
88
8f686b05c5c5dfc02f0fcaa7ebc8677c ./etc/auths/whois_auth
@@ -32,7 +32,7 @@ c10fdf73c2b655e07d13ac8103bd321e ./lib/tamper_scripts/space2null_encode.py
3232
3b8c95a6a3b7cecce5118f2fb1ccc6b8 ./lib/tamper_scripts/appendnull_encode.py
3333
d41d8cd98f00b204e9800998ecf8427e ./lib/__init__.py
3434
d41d8cd98f00b204e9800998ecf8427e ./lib/attacks/__init__.py
35-
7aa70ffff764fc1d884adcc12f6825e1 ./lib/attacks/sqlmap_scan/__init__.py
35+
a48dc0484668393bece144e102273e99 ./lib/attacks/sqlmap_scan/__init__.py
3636
5e5bb575014ebe613db6bf671d008cf8 ./lib/attacks/sqlmap_scan/sqlmap_opts.py
3737
d41d8cd98f00b204e9800998ecf8427e ./lib/attacks/whois_lookup/__init__.py
3838
f27322b9716e1a2b0b0b0487f3149474 ./lib/attacks/whois_lookup/whois.py
@@ -43,7 +43,7 @@ f5e10264d98d8c59b3d5ae86051bbcf2 ./lib/attacks/nmap_scan/__init__.py
4343
c5ebb0c56c9ae3b9a72a14e3f05afa16 ./lib/attacks/intel_me/__init__.py
4444
1faa2b5dfad6eb538bbfe42942d2a9da ./lib/core/errors.py
4545
d41d8cd98f00b204e9800998ecf8427e ./lib/core/__init__.py
46-
98680e3f6a2618f9d2acdf89575afd17 ./lib/core/settings.py
46+
5e744093802861aa8548c29847fd3dbf ./lib/core/settings.py
4747
d41d8cd98f00b204e9800998ecf8427e ./var/google_search/__init__.py
4848
b8761604c5d4f88ae653526057491a5f ./var/google_search/search.py
4949
d41d8cd98f00b204e9800998ecf8427e ./var/__init__.py

etc/scripts/launch_sqlmap.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
USR_PATH=$2
44

5-
echo $USR_PATH
6-
7-
python "$USR_PATH/sqlmapapi.py -s"
5+
python "$USR_PATH/sqlmapapi.py" -s

lib/attacks/sqlmap_scan/__init__.py

+18-7
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,30 @@ def ___dict_args():
131131
found_path = find_sqlmap()
132132

133133
if auto_start:
134-
lib.core.settings.logger.error(lib.core.settings.set_color(
134+
'''lib.core.settings.logger.error(lib.core.settings.set_color(
135135
"auto start is not enabled yet, please start the API manually..."
136136
))
137137
lib.core.settings.prompt(
138138
"press enter when ready..."
139-
)
140-
'''lib.core.settings.logger.info(lib.core.settings.set_color(
139+
)'''
140+
lib.core.settings.logger.info(lib.core.settings.set_color(
141141
"attempting to launch sqlmap API..."
142142
))
143-
subprocess.call("sudo sh {} p {}".format(lib.core.settings.LAUNCH_SQLMAP_API_TOOL, found_path))
144-
lib.core.settings.logger.info(lib.core.settings.set_color(
145-
"sqlmap API is up and running, continuing process..."
146-
))'''
143+
subprocess.Popen(
144+
["sudo", "sh", "{}".format(lib.core.settings.LAUNCH_SQLMAP_API_TOOL), "p", "{}".format("".join(found_path))],
145+
stdout=subprocess.PIPE
146+
)
147+
if is_started:
148+
lib.core.settings.logger.info(lib.core.settings.set_color(
149+
"sqlmap API is up and running, continuing process..."
150+
))
151+
else:
152+
lib.core.settings.logger.error(lib.core.settings.set_color(
153+
"there was a problem starting sqlmap API...", level=40
154+
))
155+
lib.core.settings.prompt(
156+
"manually start the API and press enter when ready..."
157+
)
147158
else:
148159
if not is_started:
149160
lib.core.settings.prompt(

lib/core/settings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# clone link
3636
CLONE = "https://github.com/ekultek/zeus-scanner.git"
3737
# current version <major.minor.commit.patch ID>
38-
VERSION = "1.0.60"
38+
VERSION = "1.1"
3939
# colors to output depending on the version
4040
VERSION_TYPE_COLORS = {"dev": 33, "stable": 92, "other": 30}
4141
# version string formatting
@@ -73,7 +73,7 @@
7373
# path to the auto clean tool
7474
CLEANUP_TOOL_PATH = "{}/etc/scripts/cleanup.sh".format(os.getcwd())
7575
# path to tool to launch sqlmap API
76-
LAUNCH_SQLMAP_API_TOOL = "{}/etc/scripts/launch_sqlmap.sh".format(os.getcwd())
76+
LAUNCH_SQLMAP_API_TOOL = "{}/etc/scripts/launch_sqlmap_api.sh".format(os.getcwd())
7777
# path to nmap installer
7878
NMAP_INSTALLER_TOOL = "{}/etc/scripts/install_nmap.sh".format(os.getcwd())
7979
# paths to sqlmap and nmap

zeus.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
attacks.add_option("--thread", dest="threadPanels", action="store_true",
114114
help=optparse.SUPPRESS_HELP)
115115
attacks.add_option("--auto", dest="autoStartSqlmap", action="store_true",
116-
help=optparse.SUPPRESS_HELP)
116+
help="Automatically start the sqlmap API (or at least try to)")
117117

118118
# search engine options
119119
engines = optparse.OptionGroup(parser, "Search engine arguments",

0 commit comments

Comments
 (0)