Linux cpanel2.daytoncreative.net 2.6.32-754.29.2.el6.x86_64 #1 SMP Tue May 12 17:39:04 UTC 2020 x86_64
Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4
Server IP : 70.62.220.67 & Your IP : 216.73.216.193
Domains :
Cant Read [ /etc/named.conf ]
User : michaelgreg
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
log /
perl-5.20.2 /
cpan /
libnet /
t /
Delete
Unzip
Name
Size
Permission
Date
Action
config.t
2.2
KB
-r--r--r--
2014-12-27 11:49
datasend.t
1.87
KB
-r--r--r--
2014-12-27 11:49
ftp.t
1.53
KB
-r--r--r--
2014-12-27 11:49
hostname.t
1.48
KB
-r--r--r--
2014-12-27 11:49
libnet_t.pl
597
B
-r--r--r--
2014-12-27 11:49
netrc.t
3.91
KB
-r--r--r--
2014-12-27 11:49
nntp.t
1.03
KB
-r--r--r--
2014-12-27 11:49
require.t
963
B
-r--r--r--
2014-12-27 11:49
smtp.t
643
B
-r--r--r--
2014-12-27 11:49
time.t
3.32
KB
-r--r--r--
2014-12-27 11:49
Save
Rename
#!./perl -w BEGIN { if ($ENV{PERL_CORE}) { chdir 't' if -d 't'; @INC = '../lib'; } if (!eval "require Socket") { print "1..0 # no Socket\n"; exit 0; } undef *{Socket::inet_aton}; undef *{Socket::inet_ntoa}; if (ord('A') == 193 && !eval "require Convert::EBCDIC") { print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; } $INC{'Socket.pm'} = 1; } package Socket; sub import { my $pkg = caller(); no strict 'refs'; *{ $pkg . '::inet_aton' } = \&inet_aton; *{ $pkg . '::inet_ntoa' } = \&inet_ntoa; } my $fail = 0; my %names; sub set_fail { $fail = shift; } sub inet_aton { return if $fail; my $num = unpack('N', pack('C*', split(/\./, $_[0]))); $names{$num} = $_[0]; return $num; } sub inet_ntoa { return if $fail; return $names{$_[0]}; } package main; (my $libnet_t = __FILE__) =~ s/config.t/libnet_t.pl/; require $libnet_t; print "1..10\n"; use Net::Config; ok( exists $INC{'Net/Config.pm'}, 'Net::Config should have been used' ); ok( keys %NetConfig, '%NetConfig should be imported' ); Socket::set_fail(1); undef $NetConfig{'ftp_firewall'}; is( Net::Config->requires_firewall(), 0, 'requires_firewall() should return 0 without ftp_firewall defined' ); $NetConfig{'ftp_firewall'} = 1; is( Net::Config->requires_firewall('a.host.not.there'), -1, '... should return -1 without a valid hostname' ); Socket::set_fail(0); delete $NetConfig{'local_netmask'}; is( Net::Config->requires_firewall('127.0.0.1'), 0, '... should return 0 without local_netmask defined' ); $NetConfig{'local_netmask'} = '127.0.0.1/24'; is( Net::Config->requires_firewall('127.0.0.1'), 0, '... should return false if host is within netmask' ); is( Net::Config->requires_firewall('192.168.10.0'), 1, '... should return true if host is outside netmask' ); # now try more netmasks $NetConfig{'local_netmask'} = [ '127.0.0.1/24', '10.0.0.0/8' ]; is( Net::Config->requires_firewall('10.10.255.254'), 0, '... should find success with mutiple local netmasks' ); is( Net::Config->requires_firewall('192.168.10.0'), 1, '... should handle failure with multiple local netmasks' ); is( \&Net::Config::is_external, \&Net::Config::requires_firewall, 'is_external() should be an alias for requires_firewall()' );