mIRC Home    About    Download    Register    News    Help

Print Thread
#171116 19/02/07 06:24 PM
Joined: Aug 2003
Posts: 66
B
bynw Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Aug 2003
Posts: 66
I got the following script off of Hawkeye.com, it was created by KuTsuM.

Code:

/*
 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 255.0.0.0 * :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
  haltdef
 }
}
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: unknown@unknown.com)

 sockclose $sockname
}



I am attempting to get it to work on a server where I have an oline. But it's not working ...

I think problem lies in the raw 311 section as our server's reply is different from the scripts author's.

we do have a raw 378 which would be in this format:
<- :server.name.net 378 MyNick TheirNick :is connecting from *@89.0.0.0 89.0.0.0

So I would think changing the code to:

Code:

raw ^378:*: {
  /*
  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 255.0.0.0 * :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 [ $+ [ $7 ] ] $2
    dns $7
    haltdef
  }
}



Would take care of the difference. But it still doesn't work. So I'm looking for any additional assistance.

Thanks in advance!

bynw #171117 19/02/07 06:32 PM
Joined: Jan 2007
Posts: 259
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
Try doing:
/debug @debug
Then /whois someone, and post the results of the whois query.
If you're running UnrealIRCd, I know that you get a server notice that has the IP in it, however this seems to already be in the script. Post any error messages you get as well.
Apart from that, there aren't any other suggestions I can give you.

I could come to your network and assist you if you wish.


Those who can, cannot. Those who cannot, can.
Kardafol #171119 19/02/07 06:42 PM
Joined: Aug 2003
Posts: 66
B
bynw Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Aug 2003
Posts: 66
Yes this is running on UnrealIRCd

Here is the output from the /debug @debug

-> chat.psionics.net WHOIS savar
<- :chat.psionics.net 311 Scanner Savar ~Savar Isle.of.Cats * :Nathan
<- :chat.psionics.net 379 Scanner Savar :is using modes +rxt
<- :chat.psionics.net 378 Scanner Savar :is connecting from *@c-69-180-180-40.hsd1.mn.comcast.net 69.180.180.40
<- :chat.psionics.net 307 Scanner Savar :is a registered nick
<- :chat.psionics.net 319 Scanner Savar :@#game-design +#TheNCR #Teara-Adan #TQDmodern #Serenity @#d20modern #shadowrun ~#OpenGaming #FUDGE #LoneStar +#myndworks &#Filibuster ~#Sphere
<- :chat.psionics.net 312 Scanner Savar chat.psionics.net :IRC for the Mynd
<- :chat.psionics.net 317 Scanner Savar 835 1171833118 :seconds idle, signon time
<- :chat.psionics.net 318 Scanner savar :End of /WHOIS list.

Just as I have previously posted there is the raw 378 result which gives the users IP address. Which I changed from the original script.

There are no error messages.

I know it's not working because I've tested it myself by connecting with a proxy connection. So I've come here for some debugging help. I have also contacted the author of the original script too so between both places I am hoping to get a resolution.

Last edited by bynw; 19/02/07 06:45 PM.
bynw #171120 19/02/07 06:54 PM
Joined: Jan 2007
Posts: 259
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
I do not see why it is not working, then. I assume it is a variable issue, but I may be wrong.
You could try rewriting the script, as I would consider that the easy way of doing it, since you would usually understand your own scripting better. I would do this (defragmenting C: is boring), but I don't have any server to test it on.


Those who can, cannot. Those who cannot, can.
Kardafol #171130 19/02/07 09:16 PM
Joined: Aug 2003
Posts: 66
B
bynw Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Aug 2003
Posts: 66
I think it is something with the variables myself as well. But for the life of me I don't know what. As for re-writing it myself .. I don't understand sockets ... so thats why I came here.


Link Copied to Clipboard