Saved,由于原有whoisAPI失效,改用WHOIS命令查询,速度更快,但是需要安装whois命令,RHEL下yum install whois即可

This commit is contained in:
2024-01-29 22:00:02 +08:00
parent 2a00928da5
commit 872eabc111
23 changed files with 274 additions and 41 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ return array(
'Respect\\Stringifier\\' => array($vendorDir . '/respect/stringifier/src'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Log\\' => array($vendorDir . '/psr/log/src'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src', $vendorDir . '/psr/http-factory/src'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
@@ -46,7 +46,7 @@ return array(
'MaxMind\\WebService\\' => array($vendorDir . '/maxmind/web-service-common/src/WebService'),
'MaxMind\\Exception\\' => array($vendorDir . '/maxmind/web-service-common/src/Exception'),
'MaxMind\\Db\\' => array($vendorDir . '/maxmind-db/reader/src/MaxMind/Db'),
'Laysense\\Dns\\' => array($vendorDir . '/laysense/dns/src'),
'Laysense\\Dns\\' => array($vendorDir . '/laysense/dns/src', $vendorDir . '/laysense/dns/src'),
'Illuminate\\Support\\' => array($vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/conditionable', $vendorDir . '/illuminate/macroable', $vendorDir . '/illuminate/support'),
'Illuminate\\Redis\\' => array($vendorDir . '/illuminate/redis'),
'Illuminate\\Pipeline\\' => array($vendorDir . '/illuminate/pipeline'),
+3 -2
View File
@@ -267,8 +267,8 @@ class ComposerStaticInitfdb689ed918f2ee4ecdf1e51d93bd946
),
'Psr\\Http\\Message\\' =>
array (
0 => __DIR__ . '/..' . '/psr/http-message/src',
1 => __DIR__ . '/..' . '/psr/http-factory/src',
0 => __DIR__ . '/..' . '/psr/http-factory/src',
1 => __DIR__ . '/..' . '/psr/http-message/src',
),
'Psr\\Http\\Client\\' =>
array (
@@ -301,6 +301,7 @@ class ComposerStaticInitfdb689ed918f2ee4ecdf1e51d93bd946
'Laysense\\Dns\\' =>
array (
0 => __DIR__ . '/..' . '/laysense/dns/src',
1 => __DIR__ . '/..' . '/laysense/dns/src',
),
'Illuminate\\Support\\' =>
array (
+24
View File
@@ -1198,6 +1198,30 @@
},
"install-path": "../illuminate/support"
},
{
"name": "laysense/dns",
"version": "0.0.4",
"version_normalized": "0.0.4.0",
"source": {
"type": "git",
"url": "https://git.laysense.com/enoch/Webman-Dns.git",
"reference": "e6c19f90a14d4b7ef69305b6441889bea545bbce"
},
"time": "2024-01-29T09:20:41+00:00",
"type": "library",
"installation-source": "source",
"autoload": {
"psr-4": {
"Laysense\\Dns\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Webman plugin laysense/dns. You can making a DNS Server with Webman now",
"install-path": "../laysense/dns"
},
{
"name": "maximebf/debugbar",
"version": "v1.18.1",
+11 -2
View File
@@ -3,7 +3,7 @@
'name' => 'laysense/highspeaker',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '84fc1030a769226c8382dbc9fd171ff45107eaba',
'reference' => '2a00928da5ff5423aef1d1833239266003781e49',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -154,10 +154,19 @@
'aliases' => array(),
'dev_requirement' => false,
),
'laysense/dns' => array(
'pretty_version' => '0.0.4',
'version' => '0.0.4.0',
'reference' => 'e6c19f90a14d4b7ef69305b6441889bea545bbce',
'type' => 'library',
'install_path' => __DIR__ . '/../laysense/dns',
'aliases' => array(),
'dev_requirement' => false,
),
'laysense/highspeaker' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '84fc1030a769226c8382dbc9fd171ff45107eaba',
'reference' => '2a00928da5ff5423aef1d1833239266003781e49',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Vendored Submodule
+1
Submodule vendor/laysense/dns added at e6c19f90a1
+53
View File
@@ -369,8 +369,11 @@ class Dns
*/
public static function decode($buffer)
{
/**
$data=bin2hex($buffer);
echo $data;
$id=substr($data,0,4);
$flag=substr($data,5,4);
$type=substr($data,-8,4);
switch($type){
case '0001':
@@ -410,8 +413,58 @@ class Dns
}
$realname=substr($realname,1,-1);
$query=substr($data,24);
***/
#$returndata="$type".'|||'."$realname";
$data=bin2hex($buffer);
$id=substr($data,0,4);
$flag=substr($data,4,4);
$questions=substr($data,8,4);
$answerRRs=substr($data,12,4);
$authorityRRs=substr($data,16,4);
$additionalRRs=substr($data,20,4);
$startbyte=24;
$dlen=substr($data,$startbyte,2);
$startbyte=26;
$i=1;
while($dlen!='00'){
$domain[$i]=hex2bin(substr($data,$startbyte,hexdec($dlen)*2));
$startbyte=$startbyte+(hexdec($dlen)*2);
$dlen=substr($data,$startbyte,2);
$startbyte=$startbyte+2;
$i++;
}
$realname=join(".",$domain);
$type=substr($data,$startbyte,4);
switch($type){
case '0001':
$type='A';
break;
case '0002':
$type='NS';
break;
case '000c':
$type='PTR';
break;
case '0006':
$type='SOA';
break;
case '001c':
$type='AAAA';
break;
case '0005':
$type='CNAME';
break;
case '0010':
$type='TEXT';
break;
case '000f':
$type='MX';
break;
}
$query=substr($data,24,$startbyte-16);
$returndata= json_encode(array('type' => $type, 'name' => "$realname", 'id'=>"$id", 'query'=>"$query"));
return $returndata;