Core Python Programming . . .
Yu-Xi Lim
yuxi at ece.gatech.edu
Fri Jan 18 19:00:46 EST 2008
Mike Driscoll wrote:
>
> 6-11 Conversion.
> (a) Create a program that will convert from an integer to an
> Internet Protocol (IP) address in the four-octet format of WWW.XXX.YYY.ZZZ
> (b) Update your program to be able to do the vice verse of the
> above.
I think it's is asking to convert a 32-bit int to the dotted form.
It's a little known fact, but IP addresses are valid in non-dotted
long-int form. Spammers commonly use this trick to disguise their IP
addresses in emails from scanners.
More information about the Python-list
mailing list