mIRC Homepage
Posted By: bunar IP backtrace - 02/06/04 04:05 PM
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?
Posted By: neznani Re: IP backtrace - 02/06/04 04:45 PM
replace echo -a with echo @window
Posted By: bunar Re: IP backtrace - 02/06/04 05:33 PM
with some weird reason it echoes it again but this time in front of all info it writes:

@window info1
@window info2
@window info3
...
Posted By: starbucks_mafia Re: IP backtrace - 02/06/04 05:37 PM
Don't forget to open the window before you try to echo to it.
Posted By: bunar Re: IP backtrace - 02/06/04 05:39 PM
oke, nvm i fixed it with some other cmd's



tnx
Posted By: magic Re: IP backtrace - 04/06/04 04:57 PM
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
Posted By: bunar Re: IP backtrace - 04/06/04 05:05 PM
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
Posted By: Collective Re: IP backtrace - 04/06/04 05:49 PM
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.
Posted By: bunar Re: IP backtrace - 04/06/04 05:57 PM
okay, then cybersecurity stays :P

my apologies since on QN 90% EU ppl come, havent got chance to trace an US ppls
Posted By: magic Re: IP backtrace - 04/06/04 06:34 PM
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
© mIRC Discussion Forums