This script convert an ip (or url) into a 32 bit adress.
#!/usr/bin/perl
###################################
# #
# IpObscurating.pl --> by giulia #
# #
###################################
# This script convert an ip (or url) into a 32 bit adress.
# To use a 32 bit adress on your server you have to modify
# /var/www/conf/httpd.conf in order to add a new virtual host.
#
# Example:
# <VirtualHost *ip-server*>
# ServerAdmin *your-mail*
# DocumentRoot /var/www/users/*your user*
# ServerName *32 bit adress*
# ErrorLog *logs/user-error_log*
# CustomLog *logs/user-access_log common*
# </VirtualHost>
#
# For more informations go to +mala's website (http://3564020356.org/)
# and solve his first riddle to be allowed to read his beautifull
# tutorial "What kind of address is this?".
$ip = $ARGV[0];
if(@ARGV == 1) {
if($ip =~ m /\.\D/) {
use Socket;
$ip=inet_ntoa((gethostbyname($ip))[4]);
}
@div = split(/\./, $ip);
$ip = ($div[0]*16777216)+($div[1]*65536)+($div[2]*256)+$div[3];
print "$ip";}
else {print "Usage: perl IO.pl <ip-host>";}