Skip to content

Commit

Permalink
Update publicScan.py
Browse files Browse the repository at this point in the history
  • Loading branch information
grayddq authored Oct 9, 2018
1 parent fae2b43 commit 043a6e8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/publicScan.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ def readResult(self):
if os.path.exists('tmp/tempResult'):
with open('tmp/tempResult') as f:
for line in f:
if not 'finished' in line and line:
jsline = json.loads(line.strip("\n").strip(',').strip())
if jsline['ports'][0]['status'] == 'open':
self.measscan_result.append([jsline['ip'], jsline['ports'][0]['port']])
if line:
if not 'finished' in line and len(line) > 5:
jsline = json.loads(line.strip("\n").strip(',').strip())
if jsline['ports'][0]['status'] == 'open':
self.measscan_result.append([jsline['ip'], jsline['ports'][0]['port']])
return True
else:
return False
Expand Down

0 comments on commit 043a6e8

Please sign in to comment.