#!perl # lilserv.pl # By Matt, aka QX-Mat # qxlis@my-security.net # ok, my name is Matt, and this is a little bit of code I've done to crack open bolt # chat so I can use it with mIRC - more powerful mIRC :P # /me hates java # for the techies out there... add "10.0.0.x chat.bolt.com" to c:\windows\hosts # and run netcat on 10.0.0.x, "./nc -l -p 6777" just after its loaded the applet. # You need to do this to capture your user number. # don't forget to remove the local chat.bolt.com resolve! # TO USE: well... change $yournick to your nick on the site # and then change $youruser to your user number on bolt. # Next, point mIRC at a sever running this by doing, # /connect server 10000 # Sorry I can't help any more :( # http://my-security.net # irc.cyberarmy.com <-- see me there $yournick = "name"; $youruser = "12345; use IO::Socket; use Net::hostent; $PORT = 10000; # pick something not in use $server = IO::Socket::INET->new( Proto => 'tcp', LocalPort => $PORT, Listen => SOMAXCONN, Reuse => 1); die "Can't setup server" unless $server; print ">>> Server $0 accepting client\n"; while ($client = $server->accept()) { $client->autoflush(1); print $client "Connected to $0 - IRC client\n"; $remote = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "chat.bolt.com", PeerPort => 6667, ); unless ($remote) { die "cannot connect to remote daemon on $host" } $remote->autoflush(1); print "Connected to remote now\n"; print "Printing fake users\n"; print $remote "user $youruser localhost http://chat.bolt.com:8800/apps/chat2/java/chatclient :Java User\n"; print $remote "nick $yournick http://www.bolt.com/apps/chat2/chat_main.asp?channel=UnitedKingdom\n\n"; print "waiting for ping... "; while (<$remote>) { $remoteline = $_; print $client $remoteline; if (/^PING/) { print "Got ping, fishing\n"; ($pong) = /PING :(.*)/i; print "I think pong is $pong"; last; } } print "Printing pong\n"; print $remote "PONG :$pong\n"; print "Going to listen mode, forking\n"; die "can't fork: $!" unless defined($fork_sockets = fork()); if ($fork_sockets) { print "Remote listen fired up\n"; LISTEN: while (<$remote>) { $remoteline = $_; print "[Remote] $remoteline\n"; print $client $remoteline; } exit; } print "Client listen fired up\n"; while (<$client>) { $clientline = $_; next if (/^USER/); next if (/^NICK/); print "[client] $clientline\n"; print $remote $clientline; } goto LISTEN; }