summaryrefslogtreecommitdiff
path: root/tmap
diff options
context:
space:
mode:
Diffstat (limited to 'tmap')
-rwxr-xr-xtmap8
1 files changed, 6 insertions, 2 deletions
diff --git a/tmap b/tmap
index 36eeb72..e54c447 100755
--- a/tmap
+++ b/tmap
@@ -63,10 +63,14 @@ def main():
## Load specified ports into PORTS list
if "-" not in args.tgtPort:
- PORTS = list(map(int, args.tgtPort.split(",")))
+ try:
+ PORTS = list(map(int, args.tgtPort.split(",")))
+ except:
+ parser.print_help()
+ exit()
else:
PORTS = list(map(int, args.tgtPort.split("-")))
- if len(PORTS) != 2:
+ if len(PORTS) != 2 or PORTS[0]>PORTS[1]:
parser.print_help()
exit()
else: