mIRC Home    About    Download    Register    News    Help

Print Thread
#84975 02/06/04 04:05 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
using script downloaded from some site..

; IP WHOIS INFORMATION v0.2 by magic <magic@mirc.net>
; ---------------------------------------------------
; To use the addon load it in your copy of mirc: /load -rs whoisip.mrc
; and to use the addon type /whoisip IP/HOST/NICKNAME in any window and
; the result should echo into yoru active window.
; You are free to use this code any way you want aslong you give me credit for it.
; A special thanks to tidy_trax for his recomendations and $regex help.

alias whoisip {
sockclose whois
if ($regex($1,/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/)) {
sockopen whois whois.cyberabuse.org 43
set %whois.ip $1-
}
if (!$regex($1,/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/)) {
.enable #DNS
.dns $1-
}
}

#DNS off
on *:DNS:{
if ($dns(0).ip) {
set %whois.ip $dns(0).ip
sockopen whois whois.cyberabuse.org 43
}
else {
echo -ac Info Invalid ip, host or nickname.
}
.disable #DNS
halt
}
#DNS end

on *:sockopen:whois: {
if ($sockerr) {
echo -a Unable to connect to whois server.
sockclose whois
}
else {
sockwrite -nt whois %whois.ip
}
}

on *:sockread:whois: {
sockread %data
if %data {
if (%data == % http://www.cyberabuse.org/whois/) {
sockclose $sockname
echo -a 
echo -a Data from the CyberAbuse Whois Server
echo -a Copyright 2003-2004, Philippe Bourcier
echo -a http://www.cyberabuse.org/whois/
}
if (% $+ * !iswm %data) {
echo -a %data
}
}
}




***********************
anyways it works good, BUT i am interested how to put all returned info in @ window?
coz all this echo is going to any window and it is just too messy.....

any ideas?

#84976 02/06/04 04:45 PM
Joined: Sep 2003
Posts: 98
N
Babel fish
Offline
Babel fish
N
Joined: Sep 2003
Posts: 98
replace echo -a with echo @window


www.stwar.us.to
IRCnet - #stwar
#84977 02/06/04 05:33 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
with some weird reason it echoes it again but this time in front of all info it writes:

@window info1
@window info2
@window info3
...

Last edited by bunar; 02/06/04 05:34 PM.
#84978 02/06/04 05:37 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Don't forget to open the window before you try to echo to it.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#84979 02/06/04 05:39 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
oke, nvm i fixed it with some other cmd's



tnx

#84980 04/06/04 04:57 PM
Joined: Dec 2002
Posts: 52
M
Babel fish
Offline
Babel fish
M
Joined: Dec 2002
Posts: 52
I should really fix the typos in that snippet, and maybe submit my new version that have some more error checking and make use of the undernet /userip function instead of /dns

- magic

#84981 04/06/04 05:05 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
you should change source to RipeNCC www.ripe.net/whois

since cybersecurity dont always work no matter what ip you give, it cant resolve always while RipeNCC resolves any ip

Last edited by bunar; 04/06/04 05:06 PM.
#84982 04/06/04 05:49 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
That is incorrect.

RIPE covers Europe, the Middle East, Central Asia, and African countries located north of the equator.

If you enter an american IP (for example) it won't give you a very useful response, example.

See IANA | IP Address Services for an explanation.

#84983 04/06/04 05:57 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
okay, then cybersecurity stays :P

my apologies since on QN 90% EU ppl come, havent got chance to trace an US ppls

#84984 04/06/04 06:34 PM
Joined: Dec 2002
Posts: 52
M
Babel fish
Offline
Babel fish
M
Joined: Dec 2002
Posts: 52
It is cyberabuse.org wink
and reason I use them is:
1. a friend runs it
2. it query the correct whois server no matter what ip I put in.

I wrote it as a snippet, not a full addon.

cyberabuse.org has a program that allow you to run a db and query your local host instead of the remote whois server, this is something I would use if I decide to release this as an addon.

you can download it at: http://www.fr1.cyberabuse.org/whois/?page=downloads

and install it local, and then change the server my snippet query to your local ip :-)

- magic


Link Copied to Clipboard