persistent connection

Hello all, attention bad english ahead! ;-) I'm writing a tool which queries the RIPE DB to find out the location of some IP adresses. When I query the database with a string like "84.149.135.10/16\r\n", i get a correct response and the tcp/ip connection will be closed by RIPE. But because I've to query some more IPs, i would like to let the connection open. As i read in the RIPE DB manual there is the "-k" flag which should tell the DB letting the connection open until I send an empty query. In telnet it works fine, but not in my tool. In my tool i'm sending a string like "-k 84.149.135.10/16\r\n" (in telnet i wrote "-k 84.149.135.10/16" + <return>). The DB output looks like this:
% This is the RIPE Whois query server #1. % The objects are in RPSL format. % % Note: the default output of the RIPE Whois server % is changed. Your tools may need to be adjusted. See % http://www.ripe.net/db/news/abuse-proposal-20050331.html % for more details. % % Rights restricted by copyright. % See http://www.ripe.net/db/copyright.html
% Note: This output has been filtered. % To receive output for a database update, use the "-B" flag.
% Information related to '84.136.0.0 - 84.191.255.255'
inetnum: 84.136.0.0 - 84.191.255.255 netname: DTAG-DIAL20 descr: Deutsche Telekom AG country: DE admin-c: DTIP tech-c: DTST status: ASSIGNED PA remarks: ****************************************************************** remarks: * Abuse Contact: http://www.t-com.de/ip-abuse in case of Spam, * remarks: * Hack Attacks, Illegal Activity, Violation, Scans, Probes, etc. * remarks: ****************************************************************** mnt-by: DTAG-NIC source: RIPE # Filtered
person: DTAG Global IP-Addressing address: Deutsche Telekom AG address: D-90492 Nuernberg address: Germany phone: +49 180 5334332 fax-no: +49 180 5334252 e-mail: ripe.dtip@telekom.de nic-hdl: DTIP mnt-by: DTAG-NIC source: RIPE # Filtered
person: Security Team address: Deutsche Telekom AG address: Germany phone: +49 180 5334332 fax-no: +49 180 5334252 e-mail: abuse@t-ipnet.de nic-hdl: DTST mnt-by: DTAG-NIC source: RIPE # Filtered
% Information related to '84.128.0.0/10AS3320'
route: 84.128.0.0/10 descr: Deutsche Telekom AG, Internet service provider origin: AS3320 member-of: AS3320:RS-PA-TELEKOM mnt-by: DTAG-RR source: RIPE # Filtered
% This is the RIPE Whois query server #1. % The objects are in RPSL format. % % Note: the default output of the RIPE Whois server % is changed. Your tools may need to be adjusted. See % http://www.ripe.net/db/news/abuse-proposal-20050331.html % for more details. % % Rights restricted by copyright. % See http://www.ripe.net/db/copyright.html
%ERROR:106: no search key specified % % No search key specified
Thx and greetings ~Sepp

On Tue, Dec 05, 2006 at 04:48:28PM +0100, Sepp wrote: Dear Sepp, It looks like your tool sends some broken query at some point, hence the error 'No search key specified'. Try printing out the complete debugging output of what your tool sends to the whois server, and let us know. From which IP address are your querying? We might check our log files to see which queries exactly did our server receive from your IP. Katie Petrusha RIPE NCC
Hello all, attention bad english ahead! ;-)
I'm writing a tool which queries the RIPE DB to find out the location of some IP adresses. When I query the database with a string like "84.149.135.10/16\r\n", i get a correct response and the tcp/ip connection will be closed by RIPE. But because I've to query some more IPs, i would like to let the connection open. As i read in the RIPE DB manual there is the "-k" flag which should tell the DB letting the connection open until I send an empty query. In telnet it works fine, but not in my tool. In my tool i'm sending a string like "-k 84.149.135.10/16\r\n" (in telnet i wrote "-k 84.149.135.10/16" + <return>). The DB output looks like this:
% This is the RIPE Whois query server #1. % The objects are in RPSL format. % % Note: the default output of the RIPE Whois server % is changed. Your tools may need to be adjusted. See % http://www.ripe.net/db/news/abuse-proposal-20050331.html % for more details. % % Rights restricted by copyright. % See http://www.ripe.net/db/copyright.html
% Note: This output has been filtered. % To receive output for a database update, use the "-B" flag.
% Information related to '84.136.0.0 - 84.191.255.255'
inetnum: 84.136.0.0 - 84.191.255.255 netname: DTAG-DIAL20 descr: Deutsche Telekom AG country: DE admin-c: DTIP tech-c: DTST status: ASSIGNED PA remarks: ****************************************************************** remarks: * Abuse Contact: http://www.t-com.de/ip-abuse in case of Spam, * remarks: * Hack Attacks, Illegal Activity, Violation, Scans, Probes, etc. * remarks: ****************************************************************** mnt-by: DTAG-NIC source: RIPE # Filtered
person: DTAG Global IP-Addressing address: Deutsche Telekom AG address: D-90492 Nuernberg address: Germany phone: +49 180 5334332 fax-no: +49 180 5334252 e-mail: ripe.dtip@telekom.de nic-hdl: DTIP mnt-by: DTAG-NIC source: RIPE # Filtered
person: Security Team address: Deutsche Telekom AG address: Germany phone: +49 180 5334332 fax-no: +49 180 5334252 e-mail: abuse@t-ipnet.de nic-hdl: DTST mnt-by: DTAG-NIC source: RIPE # Filtered
% Information related to '84.128.0.0/10AS3320'
route: 84.128.0.0/10 descr: Deutsche Telekom AG, Internet service provider origin: AS3320 member-of: AS3320:RS-PA-TELEKOM mnt-by: DTAG-RR source: RIPE # Filtered
% This is the RIPE Whois query server #1. % The objects are in RPSL format. % % Note: the default output of the RIPE Whois server % is changed. Your tools may need to be adjusted. See % http://www.ripe.net/db/news/abuse-proposal-20050331.html % for more details. % % Rights restricted by copyright. % See http://www.ripe.net/db/copyright.html
%ERROR:106: no search key specified % % No search key specified
Thx and greetings ~Sepp
-- Katie Petrusha RIPE NCC

Hello Katie, thank you for your help. At 10:58 CET (Dec. 05) I had the IP 84.149.167.143 and sent following query: "-k 84.149.167.143\n". I also tried to send "-k 84.149.167.143\r\n" and "-k 84.149.167.143" before. After each query the connection has been closed. I used following c# code:
... try { /* Connecting to server (will crash if address/name is incorrect) */ myClient = new TcpClient("whois.ripe.net", 43); /* Store the NetworkStream */ myStream = myClient.GetStream(); /* new Text Stream Reader */ reader = new StreamReader(myStream); /* new Text Stream Writer*/ writer = new StreamWriter(myStream);
} catch (Exception e) { Exception e2 = new Exception("could not connect to server\n" + e.Message); throw e2; }
...
//send query to RIPE DB writer.WriteLine("-k 84.149.167.143\n"); writer.Flush(); //read RIPE DB query response string response = ""; while (!reader.EndOfStream) { response += reader.ReadLine() + "\n"; }
Greetings Sepp
On Tue, Dec 05, 2006 at 04:48:28PM +0100, Sepp wrote:
Dear Sepp,
It looks like your tool sends some broken query at some point, hence the error 'No search key specified'. Try printing out the complete debugging output of what your tool sends to the whois server, and let us know.
From which IP address are your querying? We might check our log files to see which queries exactly did our server receive from your IP.
Katie Petrusha RIPE NCC
Hello all, attention bad english ahead! ;-)
I'm writing a tool which queries the RIPE DB to find out the location of some IP adresses. When I query the database with a string like "84.149.135.10/16\r\n", i get a correct response and the tcp/ip connection will be closed by RIPE. But because I've to query some more IPs, i would like to let the connection open. As i read in the RIPE DB manual there is the "-k" flag which should tell the DB letting the connection open until I send an empty query. In telnet it works fine, but not in my tool. In my tool i'm sending a string like "-k 84.149.135.10/16\r\n" (in telnet i wrote "-k 84.149.135.10/16" + <return>). The DB output looks like this:
% This is the RIPE Whois query server #1. % The objects are in RPSL format. % % Note: the default output of the RIPE Whois server % is changed. Your tools may need to be adjusted. See % http://www.ripe.net/db/news/abuse-proposal-20050331.html % for more details. % % Rights restricted by copyright. % See http://www.ripe.net/db/copyright.html
% Note: This output has been filtered. % To receive output for a database update, use the "-B" flag.
% Information related to '84.136.0.0 - 84.191.255.255'
inetnum: 84.136.0.0 - 84.191.255.255 netname: DTAG-DIAL20 descr: Deutsche Telekom AG country: DE admin-c: DTIP tech-c: DTST status: ASSIGNED PA remarks: ****************************************************************** remarks: * Abuse Contact: http://www.t-com.de/ip-abuse in case of Spam, * remarks: * Hack Attacks, Illegal Activity, Violation, Scans, Probes, etc. * remarks: ****************************************************************** mnt-by: DTAG-NIC source: RIPE # Filtered
person: DTAG Global IP-Addressing address: Deutsche Telekom AG address: D-90492 Nuernberg address: Germany phone: +49 180 5334332 fax-no: +49 180 5334252 e-mail: ripe.dtip@telekom.de nic-hdl: DTIP mnt-by: DTAG-NIC source: RIPE # Filtered
person: Security Team address: Deutsche Telekom AG address: Germany phone: +49 180 5334332 fax-no: +49 180 5334252 e-mail: abuse@t-ipnet.de nic-hdl: DTST mnt-by: DTAG-NIC source: RIPE # Filtered
% Information related to '84.128.0.0/10AS3320'
route: 84.128.0.0/10 descr: Deutsche Telekom AG, Internet service provider origin: AS3320 member-of: AS3320:RS-PA-TELEKOM mnt-by: DTAG-RR source: RIPE # Filtered
% This is the RIPE Whois query server #1. % The objects are in RPSL format. % % Note: the default output of the RIPE Whois server % is changed. Your tools may need to be adjusted. See % http://www.ripe.net/db/news/abuse-proposal-20050331.html % for more details. % % Rights restricted by copyright. % See http://www.ripe.net/db/copyright.html
%ERROR:106: no search key specified % % No search key specified
Thx and greetings ~Sepp
participants (2)
-
Katie Petrusha
-
Sepp