Skip to content

Commit 9f040cf

Browse files
committed
break out of loop on empty line so newlines at the end of the file don't
crash out
1 parent 58b6d41 commit 9f040cf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

httpscreenshot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ def parseGnmap(inFile, autodetect):
131131
'''
132132
targets = {}
133133
for hostLine in inFile:
134+
if hostLine.strip() == '':
135+
break
134136
currentTarget = []
135137
#Pull out the IP address (or hostnames) and HTTP service ports
136138
fields = hostLine.split(' ')

0 commit comments

Comments
 (0)