Input validation, show # targets attacked when completed
This commit is contained in:
1 parent
e6c02bd98b
commit
c23e228d3c
2 files changed
+7
-3
No files matched your search
+4
-2
@@ -169,11 +169,13 @@ class Scanner(object):
|
||||
if '-' in choice:
|
||||
# User selected a range
|
||||
(lower,upper) = [int(x) - 1 for x in choice.split('-')]
|
||||
for i in xrange(lower, upper):
|
||||
for i in xrange(lower, min(len(self.targets), upper)):
|
||||
chosen_targets.append(self.targets[i])
|
||||
else:
|
||||
elif choice.isdigit():
|
||||
choice = int(choice) - 1
|
||||
chosen_targets.append(self.targets[choice])
|
||||
else:
|
||||
pass
|
||||
return chosen_targets
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user