Skip to content

Commit adf8525

Browse files
committed
refactor(host_scanner): simplify default filename logic in get_common_inputs function now default is "results.txt" for all input
1 parent 2aa1c32 commit adf8525

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

bugscanx/modules/scanners/host_scanner.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ def get_cidr_ranges_from_input(cidr_input):
99

1010

1111
def get_common_inputs(input_source):
12-
if isinstance(input_source, str) and '/' in input_source:
13-
first_cidr = input_source.split(',')[0].strip()
14-
default_filename = f"result_{first_cidr.replace('/', '-')}.txt"
15-
else:
16-
default_filename = f"result_{os.path.basename(str(input_source))}"
12+
default_filename = "results.txt"
1713
output = get_input(
1814
"Enter output filename",
1915
default=default_filename,

0 commit comments

Comments
 (0)