mirror of
https://github.com/rekryt/iplist.git
synced 2025-10-12 16:39:35 +03:00
feat: add a new CIDR6 search method
This commit is contained in:
@@ -30,14 +30,27 @@ class IP6Helper {
|
||||
|
||||
$search = shell_exec(
|
||||
implode(' | ', [
|
||||
'whois -a ' . $ip,
|
||||
'grep inet6num',
|
||||
'whois ' . $ip,
|
||||
'grep CIDR',
|
||||
'grep -v "/0"',
|
||||
'head -n 1',
|
||||
"awk '{print $2}'",
|
||||
"grep -oE '^([0-9a-fA-F]{1,4}:){1,7}(:|[0-9a-fA-F]{1,4})(:[0-9a-fA-F]{1,4}){0,6}/[0-9]+$'",
|
||||
])
|
||||
);
|
||||
|
||||
if (!$search) {
|
||||
$search = shell_exec(
|
||||
implode(' | ', [
|
||||
'whois -a ' . $ip,
|
||||
'grep inet6num',
|
||||
'grep -v "/0"',
|
||||
'head -n 1',
|
||||
"awk '{print $2}'",
|
||||
])
|
||||
);
|
||||
}
|
||||
|
||||
if (!$search) {
|
||||
$search = shell_exec(
|
||||
implode(' | ', [
|
||||
|
Reference in New Issue
Block a user