diff options
| author | Yuval Adam <_@yuv.al> | 2018-10-12 09:52:17 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2018-10-12 09:52:17 +0200 |
| commit | db43af19de9a7e4d50cf943a84118eb779489b9b (patch) | |
| tree | 71b45340289d5f00ae940b341e73a420b5262d64 /whois.py | |
| parent | 3b7428f21fb5e5adb3720644c66d9926f06bfea1 (diff) | |
Don't bork on unknown fields
Diffstat (limited to 'whois.py')
| -rw-r--r-- | whois.py | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -4,6 +4,7 @@ def extract_field(field, response): for line in response: if line.startswith(field): return line.split(' ')[-1].strip() + return 'Unknown' def whois(ip): cp = run(['whois', ip], capture_output=True) |
