mbkarmakar2004
06-23-2007, 02:54 PM
When I run the following program in my web browser in linux....
----------------------------------------------------------------
#!/usr/bin/perl -w
#use uni-ifconfig.pl;
# The unified ifconfig command.
# Works the same way on FreeBSD, OpenBSD, Solaris, Linux, OS X, WinNT (from Win2K).
# Note: due of Net::Ifconfig::Wrapper limitations 'inet' and 'down' commands
# are not working on WinNT. +/-alias are working, of course.
use CGI;
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
use Net::Ifconfig::Wrapper;
use warnings;
$cgi=new CGI();
warningsToBrowser(1);
print $cgi->header();
my $Usage = << 'EndOfText';
uni-ifconfig.pl
uni-ifconfig.pl -a
uni-ifconfig.pl eth0
uni-ifconfig.pl eth0 down
EndOfText
my $Info = Net::Ifconfig::Wrapper::Ifconfig('up', 'eth0', '192.168.148.115', '255.255.255.0') or die $@;
#my $Info1 = Net::Ifconfig::Wrapper::Ifconfig('down', 'eth0', '192.168.148.112', '255.255.255.0') or die $@;
#my $Info3 = Net::Ifconfig::Wrapper::Ifconfig('up', 'eth0', '192.168.148.112', '255.255.255.0') or die $@;
-----------------------------------------------------------------
I am getting the following error:--
Software error:
Command '/sbin/ifconfig -a 2>&1', exit code '256'No usable address families found.
socket: Permission denied
Can anyone say my fault in the program or anywhere???
or can i do those functions (ifconfig eth0 192.168.148.1 up or iwconfig eth1 essid sddmin mode managed) in any other way??
modules i have installed in my computer
1. Net-Ifconfig-Wrapper-0.09.tar
2.Net-Interface-0.08.tar
3.Wifi-0.01a.tar
----------------------------------------------------------------
#!/usr/bin/perl -w
#use uni-ifconfig.pl;
# The unified ifconfig command.
# Works the same way on FreeBSD, OpenBSD, Solaris, Linux, OS X, WinNT (from Win2K).
# Note: due of Net::Ifconfig::Wrapper limitations 'inet' and 'down' commands
# are not working on WinNT. +/-alias are working, of course.
use CGI;
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
use Net::Ifconfig::Wrapper;
use warnings;
$cgi=new CGI();
warningsToBrowser(1);
print $cgi->header();
my $Usage = << 'EndOfText';
uni-ifconfig.pl
uni-ifconfig.pl -a
uni-ifconfig.pl eth0
uni-ifconfig.pl eth0 down
EndOfText
my $Info = Net::Ifconfig::Wrapper::Ifconfig('up', 'eth0', '192.168.148.115', '255.255.255.0') or die $@;
#my $Info1 = Net::Ifconfig::Wrapper::Ifconfig('down', 'eth0', '192.168.148.112', '255.255.255.0') or die $@;
#my $Info3 = Net::Ifconfig::Wrapper::Ifconfig('up', 'eth0', '192.168.148.112', '255.255.255.0') or die $@;
-----------------------------------------------------------------
I am getting the following error:--
Software error:
Command '/sbin/ifconfig -a 2>&1', exit code '256'No usable address families found.
socket: Permission denied
Can anyone say my fault in the program or anywhere???
or can i do those functions (ifconfig eth0 192.168.148.1 up or iwconfig eth1 essid sddmin mode managed) in any other way??
modules i have installed in my computer
1. Net-Ifconfig-Wrapper-0.09.tar
2.Net-Interface-0.08.tar
3.Wifi-0.01a.tar