Skip to content

Commit f48ba6e

Browse files
committed
1 parent 12f6818 commit f48ba6e

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

src/utils/crawler.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,13 @@ def do_process(url):
167167
The main crawler.
168168
"""
169169
def crawler(url):
170-
if menu.options.crawldepth > 0:
171-
menu.options.DEFAULT_CRAWLDEPTH_LEVEL = menu.options.crawldepth
172170
if not menu.options.sitemap_url:
173-
if menu.options.DEFAULT_CRAWLDEPTH_LEVEL > 2:
174-
err_msg = "Depth level '" + str(menu.options.DEFAULT_CRAWLDEPTH_LEVEL) + "' is not a valid."
171+
if menu.options.crawldepth > 2:
172+
err_msg = "Depth level '" + str(menu.options.crawldepth) + "' is not a valid."
175173
print(settings.print_error_msg(err_msg))
176174
raise SystemExit()
177175
info_msg = "Starting crawler and searching for "
178-
info_msg += "links with depth " + str(menu.options.DEFAULT_CRAWLDEPTH_LEVEL) + "."
176+
info_msg += "links with depth " + str(menu.options.crawldepth) + "."
179177
print(settings.print_info_msg(info_msg))
180178
else:
181179
while True:
@@ -207,7 +205,7 @@ def crawler(url):
207205
print(settings.print_error_msg(err_msg))
208206
pass
209207
else:
210-
menu.options.DEFAULT_CRAWLDEPTH_LEVEL = message
208+
menu.options.crawldepth = message
211209
break
212210

213211
while True:
@@ -250,7 +248,7 @@ def crawler(url):
250248

251249
if not sitemap_check:
252250
output_href = do_process(url)
253-
if menu.options.DEFAULT_CRAWLDEPTH_LEVEL > 1:
251+
if menu.options.crawldepth > 1:
254252
for url in output_href:
255253
output_href = do_process(url)
256254
if SKIPPED_URLS == 0:

src/utils/menu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def banner():
162162
default=0,
163163
dest="crawldepth",
164164
type="int",
165-
help="Crawl the website starting from the target URL (1-2, Default: " + str(settings.DEFAULT_CRAWLDEPTH_LEVEL) + ").")
165+
help="Crawl the website starting from the target URL (1-2, Default: 0).")
166166

167167
target.add_option("-x",
168168
dest="sitemap_url",

src/utils/settings.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def sys_argv_errors():
216216
DESCRIPTION = "The command injection exploiter"
217217
AUTHOR = "Anastasios Stasinopoulos"
218218
VERSION_NUM = "3.3"
219-
REVISION = "35"
219+
REVISION = "36"
220220
STABLE_RELEASE = False
221221
if STABLE_RELEASE:
222222
VERSION = "v" + VERSION_NUM + "-stable"
@@ -939,9 +939,6 @@ def sys_argv_errors():
939939
# Target URL reload
940940
URL_RELOAD = False
941941

942-
# Crawl the website starting from the target URL.
943-
DEFAULT_CRAWLDEPTH_LEVEL = 0
944-
945942
# Command history
946943
CLI_HISTORY = ""
947944

0 commit comments

Comments
 (0)