Skip to content

Instantly share code, notes, and snippets.

@suminb
Created September 19, 2016 15:05
Show Gist options
  • Select an option

  • Save suminb/f41364e3104afcceedab7301f5d4ad94 to your computer and use it in GitHub Desktop.

Select an option

Save suminb/f41364e3104afcceedab7301f5d4ad94 to your computer and use it in GitHub Desktop.
Wifi Recon
import sys
def parse_column(line):
cols = line.split('\t')
col_count = len(cols)
if col_count == 13:
return cols
elif col_count == 12:
return [None] + cols
else:
raise ValueError('Invalid column count {}'.format(col_count))
def parse(fin):
"""
:param fin: File input stream
"""
for line in fin:
print(parse_column(line))
if __name__ == '__main__':
parse(sys.stdin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment