PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: davnis on 25 May, 2005, 22:52:53

Title: Block Socks5 , unfortunately not 100%. help ?
Post by: davnis on 25 May, 2005, 22:52:53
Hy everybody,

I ask several weeks ago for a script that block soks5 connections. UW help me. This script work good, but one tester discover a way to fake the connection type, so, to go inside the hub using a socks5 connection.

How he did it ? He told me that use Strong dc9. Set the socks connection but this dc++ client allow another settings pasive/active even you use an socks5. So the settings was passive with proxy and he enter into the hub.

This users type can be an bother things, because people can enter evne they are blocked because of avertising, swear etc.

Can be made something with block pasive users or client detector .. or find the bug of this script. If is any bug.

Any help i think will make a lot of hub owners or admins, very happy. Thank a lot again

Here is the code :

-- Mode Check : By NightLitch
-- Fixed the nil error
-- Checking if MyInfo is correct, becouse it can be missed in some Build Versions...
-- 2lua5 by uv (4chars) ;0)

BotName = "noproxy"

function NewUserConnected(curUser)
   if curUser.sMyInfoString then
      s,e,Mode = string.find(curUser.sMyInfoString,"M:(%u*),")
      if Mode == nil then
         curUser:SendData(BotName,"Your MyInfoString is messed up or lost...")
         curUser:Disconnect()
      elseif  Mode == "S" then  
         curUser:SendData(BotName,"Your Client Mode ( "..Mode.." ) is not allowed here...")
         curUser:Disconnect()
      end
   else
      curUser:SendData(BotName,"Your MyInfoString is messed up or lost...")
      curUser:Disconnect()
   end
end
Title:
Post by: ??????Hawk?????? on 25 May, 2005, 23:11:11
hi m8  

change the   S  to a  5  in this line  

elseif Mode == "S" then

Edit

Youll also have to change the Find  to   %S
Title:
Post by: Dessamator on 25 May, 2005, 23:12:43
a simple way to solve it,is to  block strongdc, or try hawks idea, it will probably work better, since many dc's can mimic strongdc's features !
Title:
Post by: ??????Hawk?????? on 25 May, 2005, 23:17:48
QuoteOriginally posted by Dessamator
a simple way to solve it,is to  block strongdc, :)


Whats that got to do with using Socks 5  connection  ???  hehehehehe

the option is in all the clients ive seen.

BTW  blockin that wont stop sock5  ..  it will just block the ppl that choose to set it up in their DC..

and most likely the ppl using sock 5 to annoy you  Wont advertise the fact by displaying it in their Tag.   :P  :P
Title:
Post by: davnis on 25 May, 2005, 23:21:04
thank you, but any constructive solve of this ?

can be solve this ? and how ?

I don't know how to programm this Lua :(

can be this script mixed with client deny ? So, let's say will allow only original dc++ users and odc++ for example ..

I don't know ... thank you anyway .. still waiting for some real help
Title:
Post by: Dessamator on 25 May, 2005, 23:21:41
QuoteOriginally posted by ?˜”??•Hawk•??”˜?
QuoteOriginally posted by Dessamator
a simple way to solve it,is to  block strongdc, :)


Whats that got to do with using Socks 5  connection  ???  hehehehehe

the option is in all the clients ive seen.

BTW  blockin that wont stop sock5  ..  it will just block the ppl that choose to set it up in their DC..

and most likely the ppl using sock 5 to annoy you  Wont advertise the fact by displaying it in their Tag.   :P  :P
indeed !
Title:
Post by: ??????Hawk?????? on 25 May, 2005, 23:48:52
-- Mode Check : By NightLitch
-- Fixed the nil error
-- Checking if MyInfo is correct, becouse it can be missed in some Build Versions...
-- 2lua5 by uv (4chars) ;0)

BotName = "noproxy"

function NewUserConnected(curUser)
if curUser.sMyInfoString then
s,e,Mode = string.find(curUser.sMyInfoString,"M:(%S).*")
if Mode == nil then
curUser:SendData(BotName,"Your MyInfoString is messed up or lost...")
curUser:Disconnect()
elseif Mode == "S" or Mode == "5" then
curUser:SendData(BotName,"Your Client Mode ( "..Mode.." ) is not allowed here...")
curUser:Disconnect()
end
else
curUser:SendData(BotName,"Your MyInfoString is messed up or lost...")
curUser:Disconnect()
end
end
Title:
Post by: davnis on 26 May, 2005, 00:34:30
I love you but dosen't work 100% ...
i put pasive or active with socks5 and I enter ..
you cannot enter if you se default in hub properties

:(
Title:
Post by: davnis on 26 May, 2005, 14:39:04
I love you but dosen't work 100% ...
i put pasive or active with socks5 and I enter ..
you cannot enter if you set default in hub properties, but pasive or active with sokcs5 can enter .. :(

:(
Title:
Post by: 6Marilyn6Manson6 on 26 May, 2005, 14:49:43
QuoteOriginally posted by ??????Hawk??????
-- Mode Check : By NightLitch
-- Fixed the nil error
-- Checking if MyInfo is correct, becouse it can be missed in some Build Versions...
-- 2lua5 by uv (4chars) ;0)

BotName = "noproxy"

function NewUserConnected(curUser)
if curUser.sMyInfoString then
s,e,Mode = string.find(curUser.sMyInfoString,"M:(%S).*")
if Mode == nil then
curUser:SendData(BotName,"Your MyInfoString is messed up or lost...")
curUser:Disconnect()
elseif Mode == "S" or Mode == "5" then
curUser:SendData(BotName,"Your Client Mode ( "..Mode.." ) is not allowed here...")
curUser:Disconnect()
end
else
curUser:SendData(BotName,"Your MyInfoString is messed up or lost...")
curUser:Disconnect()
end
end

This script disconnect only user with  M:5  in tag not really user with socks5..... if I use socks5 for example:

202.63.170.114:1080
202-63-170-114.broadband.isp.exatt.net India

and use faketag... for example:

<++ V:0.674,M:A,H:0/16/47.S:3>
i'm not disconnect.... :)
Title:
Post by: ??????Hawk?????? on 26 May, 2005, 17:31:03
QuoteOriginally posted by davnis
I love you but dosen't work 100% ...
i put pasive or active with socks5 and I enter ..
you cannot enter if you set default in hub properties, but pasive or active with sokcs5 can enter .. :(

:(


Sheesh  did you not read my Earlier Posts ..  

ill make it simple  ...  " YOU CANNOT BLOCK SOCK5 "


you can only stop the ones that use their dc settings in socks Mode.

so for 100% block on socks5   Press the power button on your computer and Turn it OFF :P  :P  :P

??????Hawk??????
Title:
Post by: davnis on 27 May, 2005, 01:55:43
??????Hawk??????

I HATE YOU !

 :D  :D  :D  :D  :D
Title:
Post by: Rahxie on 28 May, 2005, 23:52:44
yep, it's impossible to block socks5, just edit the dc++ source or any clients source and you have socks5 showing as active or passive :)
Title:
Post by: 6Marilyn6Manson6 on 29 May, 2005, 00:54:00
QuoteOriginally posted by Rahxie
yep, it's impossible to block socks5, just edit the dc++ source or any clients source and you have socks5 showing as active or passive :)


Oy you can use FakeTag :P