Chatspace Proxy Detector

Go down

Chatspace Proxy Detector

Post  wann on Sat Feb 07, 2009 7:05 am

<p>This script will scan connecting users for open proxies. If a proxy is found, the script will K-line the user off of that server. Therefore, in order for the script to work, you may need IRCop priv.
<p>Keep in mind, this script may not be entirely effective. Firewalls, or certain servers being hosted on that system may interfere with the script, and end in the users connection being terminated from the server.
<p>Notes have been added into the code to help users port this script to any IRCD server.
<p><b>UPDATE:</b> Wrong chr in both $gettok functions. Error fixed, should now work if it didn't work before :)

bawah ni faham.jangan copy plak yang biru ni[/color]

Chatspace Proxy Detector by KuTsuM

NOTE: You may need IRCop priv in order for this script to work properly.

Notes have been added to the code to help users port this script for Unreal IRCD, or any other IRCD.

;The following trigger may need change for certain server platforms. UnrealIRCD should be ok as is.
on *:SNOTICE:*client connecting*: {
set %proxy. [ $+ [ $9 ] ] 1
whois $9
raw ^311:*: {
The following is the portion that designates the difference between Chatspace servers, and IRCD servers. The $2 represents the nickname of the user, and $4 represents the IP.

Raw 311 on Chatspace:
Mynick TheirNick TheirUserID * :Their Real Name

Please keep in mind, you may need IRCop priv in order for this script to work properly
if (%proxy. [ $+ [ $2 ] ]) {
unset %proxy . [ $+ [ $2 ] ]
set %proxya [ $+ [ $4 ] ] $2
dns $4
on ^*:DNS: {
;Set ports to scan in following, delimit by asterix
var %ports = 1080*80*3128*8080*3380,%x = 1

while ($gettok(%ports,%x,42)) {
if (%proxya [ $+ [ $dns(0).addr ] ]) {
var %w = $+(proxy,$r(1000,9999))
sockopen %w $gettok(%ports,%x,42)
sockmark %w $dns(0).ip $v1
else { break }
inc %x
on *:SOCKOPEN:proxy*: {
if ($sockerr) { halt }
;Set k-line message, can be edited to gline, gkline, etc
kline $gettok($sock($sockname).mark,2,32) Proxy Detected on port: $sock($sockname).port (If you disagree, send an email to:

sockclose $sockname

Number of posts : 213
Age : 33
Location : port dickson
Registration date : 2008-03-20

View user profile

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum