diff --git a/finalrecon.py b/finalrecon.py index b6333e1..f2f21f8 100644 --- a/finalrecon.py +++ b/finalrecon.py @@ -57,6 +57,7 @@ ext_help.add_argument('-e', help='File Extensions [ Example : txt, xml, php ]') ext_help.add_argument('-o', help='Export Format [ Default : txt ]') ext_help.add_argument('-cd', help='Change export directory [ Default : ~/.local/share/finalrecon ]') +ext_help.add_argument('-of', help='Change export folder name [ Default :fr__ ]') ext_help.add_argument('-k', help='Add API key [ Example : shodan@key ]') ext_help.set_defaults( dt=config.dir_enum_th, @@ -69,7 +70,8 @@ d=config.custom_dns, e=config.dir_enum_ext, o=config.export_fmt, - cd=config.usr_data + cd=config.usr_data, + of = None, ) try: @@ -103,6 +105,7 @@ show_banner = args.nb add_key = args.k output_dir = args.cd +folder_name = args.of import socket import datetime @@ -223,9 +226,13 @@ def save_key(key_string): if output != 'None': fpath = output_dir - dt_now = str(datetime.datetime.now().strftime('%d-%m-%Y_%H:%M:%S')) - fname = f'{fpath}fr_{hostname}_{dt_now}.{output}' - respath = f'{fpath}fr_{hostname}_{dt_now}' + if not folder_name: + dt_now = str(datetime.datetime.now().strftime('%d-%m-%Y_%H:%M:%S')) + fname = f'{fpath}fr_{hostname}_{dt_now}.{output}' + respath = f'{fpath}fr_{hostname}_{dt_now}' + else: + fname = f'{fpath}{folder_name}.{output}' + respath = f'{fpath}{folder_name}' if not os.path.exists(respath): os.makedirs(respath) out_settings = {