Created
September 19, 2016 15:05
-
-
Save suminb/f41364e3104afcceedab7301f5d4ad94 to your computer and use it in GitHub Desktop.
Wifi Recon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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