From 07c4476963caec454f293a9affbdde204c81e05a Mon Sep 17 00:00:00 2001 From: Filip Znachor Date: Sat, 7 Sep 2024 12:01:42 +0200 Subject: [PATCH] Added -B flag for RIPE --- src/WhoisClient.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/WhoisClient.php b/src/WhoisClient.php index 3253bcc..7e2bc41 100644 --- a/src/WhoisClient.php +++ b/src/WhoisClient.php @@ -5,6 +5,8 @@ use MallardDuck\Whois\Client; class WhoisClient { + const B_FLAG_SERVERS = ["whois.ripe.net"]; + public static function query(string $q): ?ProviderInterface { $server = self::getServer($q); $provider = null; @@ -27,6 +29,7 @@ class WhoisClient { } private static function queryServer(string $q, string $server): WhoisParser { + if (in_array($server, self::B_FLAG_SERVERS)) $q = "$q -B"; $client = new Client($server); $response = $client->makeRequest($q); return WhoisParser::fromString($response);