Entry
Obfuscated IP-decoder
Jul 5th, 2000 09:59
Nathan Wallace, Hans Nowak, Snippet 15, Sven Havemann
"""
Packages: miscellaneous.obfuscated
"""
"""
I've found the following essentially single-line Python script useful in
decoding hexadecimal IP-Numbers (as given by /sbin/hostid on most unix
systems, I believe).
(For python newbies: The two lines at the bottom of the script should be
combined to one line)
"""
#!/usr/local/bin/python
from sys import *
if(len(argv)<2):
print "Usage: quadrupel fa04a404"
exit()
print "%d.%d.%d.%d" % tuple(map(lambda
x,y=argv[1]:eval("0x"+y[2*x:2*x+2]),(0,1,2,3)))