I wish get my script to lookup my local network adress but all I get is 127.0.0.1
I know it's something like 192.168......
I tried this in perl
use Socket;
$packed_ip = gethostbyname( "localhost" );
if (defined $packed_ip) {
print inet_ntoa($packed_ip);
}
I could use another language like python or java
I know it's something like 192.168......
I tried this in perl
use Socket;
$packed_ip = gethostbyname( "localhost" );
if (defined $packed_ip) {
print inet_ntoa($packed_ip);
}
I could use another language like python or java
