Server IP : 85.214.239.14 / Your IP : 3.133.120.64 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/3/cwd/lib/x86_64-linux-gnu/perl5/5.36/auto/NetAddr/IP/ |
Upload File : |
# NOTE: Derived from blib/lib/NetAddr/IP.pm. # Changes made here will be lost when autosplit is run again. # See AutoSplit.pm. package NetAddr::IP; #line 1485 "blib/lib/NetAddr/IP.pm (autosplit into blib/lib/auto/NetAddr/IP/re6.al)" sub re6($) { my @net = split('',sprintf("%04X%04X%04X%04X%04X%04X%04X%04X",unpack('n8',$_[0]->network->{addr}))); my @brd = split('',sprintf("%04X%04X%04X%04X%04X%04X%04X%04X",unpack('n8',$_[0]->broadcast->{addr}))); my @dig; foreach(0..$#net) { my $n = $net[$_]; my $b = $brd[$_]; my $m; if ($n.'' eq $b.'') { if ($n =~ /\d/) { push @dig, $n; } else { push @dig, '['.(lc $n).$n.']'; } } else { my $n = $net[$_]; my $b = $brd[$_]; if ($n.'' eq 0 && $b =~ /F/) { push @dig, 'x'; } elsif ($n =~ /\d/ && $b =~ /\d/) { push @dig, '['.$n.'-'.$b.']'; } elsif ($n =~ /[A-F]/ && $b =~ /[A-F]/) { $n .= '-'.$b; push @dig, '['.(lc $n).$n.']'; } elsif ($n =~ /\d/ && $b =~ /[A-F]/) { $m = ($n == 9) ? 9 : $n .'-9'; if ($b =~ /A/) { $m .= 'aA'; } else { $b = 'A-'. $b; $m .= (lc $b). $b; } push @dig, '['.$m.']'; } elsif ($n =~ /[A-F]/ && $b =~ /\d/) { if ($n =~ /A/) { $m = 'aA'; } else { $n .= '-F'; $m = (lc $n).$n; } if ($b == 9) { $m .= 9; } else { $m .= $b .'-9'; } push @dig, '['.$m.']'; } } } my @grp; do { my $grp = join('',splice(@dig,0,4)); if ($grp =~ /^(0+)/) { my $l = length($1); if ($l == 4) { $grp = '0{1,4}'; } else { $grp =~ s/^${1}/0\{0,$l\}/; } } if ($grp =~ /(x+)$/) { my $l = length($1); if ($l == 4) { $grp = '[0-9a-fA-F]{1,4}'; } else { $grp =~ s/x+/\[0\-9a\-fA\-F\]\{$l\}/; } } push @grp, $grp; } while @dig > 0; return '('. join(':',@grp) .')'; } # end of NetAddr::IP::re6 1;