From c6c27f8b26f18b532f74f7384ab5f667b9ab9f22 Mon Sep 17 00:00:00 2001 From: ekultek Date: Fri, 10 Nov 2017 10:58:11 -0600 Subject: [PATCH] created full batch functionality for the admin panel finder, will display the default if batch is requested --- lib/attacks/admin_panel_finder/__init__.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/attacks/admin_panel_finder/__init__.py b/lib/attacks/admin_panel_finder/__init__.py index 1611834..a87b0d2 100644 --- a/lib/attacks/admin_panel_finder/__init__.py +++ b/lib/attacks/admin_panel_finder/__init__.py @@ -52,20 +52,26 @@ def check_for_externals(url, data_sep="-" * 30, **kwargs): if len(interesting) > 0: lib.core.settings.create_tree(full_url, list(interesting)) else: + question_msg = "nothing interesting found in robots.txt would you like to display the entire page" if not batch: to_display = lib.core.settings.prompt( - "nothing interesting found in robots.txt would you like to display the entire page", opts="yN" + question_msg, opts="yN" ) - if to_display.lower().startswith("y"): - print( - "{}\n{}\n{}".format( - data_sep, data, data_sep - ) + else: + to_display = lib.core.settings.prompt( + question_msg, opts="yN", default="n" + ) + + if to_display.lower().startswith("y"): + print( + "{}\n{}\n{}".format( + data_sep, data, data_sep ) + ) lib.core.settings.logger.info(lib.core.settings.set_color( "robots.txt page will be saved into a file...", level=25 )) - return lib.core.settings.write_to_log_file(data, lib.core.settings.ROBOTS_PAGE_PATH, "robots-{}.log".format(url)) + return lib.core.settings.write_to_log_file(data, lib.core.settings.ROBOTS_PAGE_PATH, "{}-robots_text.log".format(url)) elif sitemap: lib.core.settings.logger.info(lib.core.settings.set_color( "found a sitemap, saving to file...", level=25