Skip to content

Commit dbad052

Browse files
committed
verify exploit name input
1 parent 1895131 commit dbad052

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/cli/main.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def execute(cmd):
9191
colors.END)
9292
elif cmd.startswith('target'):
9393
target = ''.join(cmd.split()[1:])
94-
if not target.endswith('.txt'):
94+
if not target in os.listdir(SessionParameters.INIT_DIR + '\\data'):
9595
return
9696
print(colors.BLUE + '[i] Target changed to {}'.format(target))
9797
SessionParameters.IP_LIST = SessionParameters.INIT_DIR + \
@@ -395,11 +395,16 @@ def main():
395395
'[?] Use ip_list.txt as target list? [y/n] ' +
396396
colors.END)).strip()
397397
if answ.lower() == 'n':
398-
os.system("ls data")
398+
for item in os.listdir('data'):
399+
print(colors.BLUE,
400+
item,
401+
colors.END,
402+
end=' ')
403+
print('\n')
399404
SessionParameters.IP_LIST = SessionParameters.INIT_DIR + '\\data\\' + \
400405
input_check(
401406
'[=] Choose your target IP list, eg. ip_list.txt ',
402-
allow_blank=False)
407+
choices=os.listdir('data'))
403408
while True:
404409
try:
405410
cmd = input(

0 commit comments

Comments
 (0)