Skip to content

Commit c6c27f8

Browse files
author
ekultek
committed
created full batch functionality for the admin panel finder, will display the default if batch is requested
1 parent 150ebef commit c6c27f8

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

lib/attacks/admin_panel_finder/__init__.py

+13-7
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,26 @@ def check_for_externals(url, data_sep="-" * 30, **kwargs):
5252
if len(interesting) > 0:
5353
lib.core.settings.create_tree(full_url, list(interesting))
5454
else:
55+
question_msg = "nothing interesting found in robots.txt would you like to display the entire page"
5556
if not batch:
5657
to_display = lib.core.settings.prompt(
57-
"nothing interesting found in robots.txt would you like to display the entire page", opts="yN"
58+
question_msg, opts="yN"
5859
)
59-
if to_display.lower().startswith("y"):
60-
print(
61-
"{}\n{}\n{}".format(
62-
data_sep, data, data_sep
63-
)
60+
else:
61+
to_display = lib.core.settings.prompt(
62+
question_msg, opts="yN", default="n"
63+
)
64+
65+
if to_display.lower().startswith("y"):
66+
print(
67+
"{}\n{}\n{}".format(
68+
data_sep, data, data_sep
6469
)
70+
)
6571
lib.core.settings.logger.info(lib.core.settings.set_color(
6672
"robots.txt page will be saved into a file...", level=25
6773
))
68-
return lib.core.settings.write_to_log_file(data, lib.core.settings.ROBOTS_PAGE_PATH, "robots-{}.log".format(url))
74+
return lib.core.settings.write_to_log_file(data, lib.core.settings.ROBOTS_PAGE_PATH, "{}-robots_text.log".format(url))
6975
elif sitemap:
7076
lib.core.settings.logger.info(lib.core.settings.set_color(
7177
"found a sitemap, saving to file...", level=25

0 commit comments

Comments
 (0)