CGI:IRC Hex Converter

Feb 17, 2004 05:08 CGI:IRC Hex Converter
As of Nemokrad's post, you know that there is now a CGI client available for use to access irc.winbolo.com. When a user joins the channel, it reports their real IP address in hex characters as that client's user name. The following script will convert their IP address, do a DNS lookup on it, and display it in your active window in mIRC.

1) Copy everything below in the code section.
2) Paste it in your remotes section and save it.
3) To use, click a user then right click and choose "CGI-IRC"

[code:1:9d4129cc6d]
alias cgicon {
if ($chan(#).ial == $false) {
echo $color(info) -a -
echo $color(whois) -a $timestamp *** Please try again
echo $color(info) -a -
/who #
return
}
set %cgi.nick $snick(#,1)
var %hex = $mid($address(%cgi.nick,1),4,8)
var %dec
var %count 1
while (%count < 9) {
if ((($asc($mid(%hex,%count,1)) < 48) || ($asc($mid(%hex,%count,1)) > 57)) && (($asc($mid(%hex,%count,1)) < 97) || ($asc($mid(%hex,%count,1)) > 103))) {
echo $color(info) -a -
echo $color(whois) -a $timestamp *** User not on CGI:IRC
echo $color(info) -a -
return
}
inc %count
}
while ($len(%hex) != 0) {
var %temp = $base($mid(%hex,1,2),16,10) $+ .
%dec = %dec $+ %temp
%hex = $right(%hex,$calc($len(%hex) - 2))
}
%dec = $left(%dec,-1)
set %cgi.ip %dec
/dns %dec
}

on *:DNS: {
if (%cgi.nick == $null) { return }
elseif ($dns(0) == 0) {
echo $color(info) -a -
echo $color(whois) -a $timestamp *** %cgi.ip < > %cgi.nick < > Unable to Resolve
echo $color(info) -a -
}
else {
echo $color(info) -a -
echo $color(whois) -a $timestamp *** $dns(1).ip < > %cgi.nick < > $dns(1).addr
echo $color(info) -a -
}
unset %cgi.nick
unset %cgi.ip
}

menu nicklist {
CGI-IRC:/cgicon $snick(#,1)
}
[/code:1:9d4129cc6d]
Last edited: Mar 01, 2004 00:30 (edited 5 times)
Feb 17, 2004 05:16
Sticks is fucking smart and shit.
Feb 17, 2004 05:20
So basically if you think you can troll and be annoying with CGI:IRC, think again. You can just as easily be banned with the CGI client as with your normal client. Just a fair warning of deterance for anybody who didn't glean it from my above post.
Feb 17, 2004 07:31
its broken .... won't work for me :(
Feb 17, 2004 10:18
Min wrote:
its broken .... won't work for me :(



You have to use the Knuth shell if you try to run the above on Lisbon LinUx (12.4 or later) and remember to set the Snarge level to -g or higher.
On windows, the above does not work on Windows 95 unless you download 19 patches (just follow the completely self
explanatory instructions) from the following sites:

http://www.smegorama.com/~nesbit/goblets-2.3.gz
http://www.petes-place.bedroom.com/~dads-computer/droog_virus.exe
http://www.anarchowares.org/downloadme_atyourownrisk.gz.zap.tar.zzz

the latter can only be unsmedged using the zzz-to-tar utility which everyone has. Sorry for reposting the obvious.

Desmo
Feb 18, 2004 03:20
I made a couple changes so please copy and respaste the code snippet above and it should work fine now depending on what version of mIRC you have. I'm currently running v6.03 and have no problems with it. However, a person using v5.6 had trouble running the script.

EDIT: Latest error has been fixed! When a user with an unresolvable IP was targeted with my script, it would only output their nickname. It now outputs their IP, nick, and "Unable to resolve" on one line. I believe that makes the current release v0.3 or something.