Commit 2a6e68f6 authored by Barry Warsaw's avatar Barry Warsaw

Output original address

parent de0e8f76
#! /usr/bin/env python #! /bin/env python
"""Print the long name of an Internet domain. """Print the long name of an Internet domain.
...@@ -43,11 +43,11 @@ def resolve(rawaddr): ...@@ -43,11 +43,11 @@ def resolve(rawaddr):
return return
addr = parts[-1] addr = parts[-1]
if nameorg.has_key(addr): if nameorg.has_key(addr):
print addr, 'is from a USA', nameorg[addr], 'organization' print rawaddr, 'is from a USA', nameorg[addr], 'organization'
elif country.has_key(addr): elif country.has_key(addr):
print addr, 'originated from', country[addr] print rawaddr, 'originated from', country[addr]
else: else:
print 'Where in the world is %s?' % addr print 'Where in the world is %s?' % rawaddr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment