PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: Typhoon on 13 January, 2004, 21:18:23

Title: socks5 deny-script
Post by: Typhoon on 13 January, 2004, 21:18:23
i am looking for a socks5 deny script.. does some have one or could some one make it .. ??

all help tips are welcome...


***Typhoon?

btw. weres ptaczek ??
Title:
Post by: [T-G-T]M@sto on 13 January, 2004, 21:48:14
QuoteOriginally posted by Typhoon?
i am looking for a socks5 deny script.. does some have one or could some one make it .. ??

all help tips are welcome...


***Typhoon?

btw. weres ptaczek ??
I know why you want that script and i search it too, but someone have told me that all Linux users need socks5 and if i use a script they can not enter - is that right ?
Title:
Post by: plop on 14 January, 2004, 04:46:23
QuoteOriginally posted by [T-G-T]M@sto
I know why you want that script and i search it too, but someone have told me that all Linux users need socks5 and if i use a script they can not enter - is that right ?
do you mind if i let some1 make this script who wants 2 learn 2 script lua?
kepp/intel or any1 else here's how 2 do it.
search the MyInfoString for M:S and disconnect them if found.

no linux users don't need socks5 @ all, if they say they do need it there just 2 lazy 2 add it 2 there iptables/firewall.
you can send them all 2 the website from the golden angel.
all manuals 2 fix the firewall 2 support dc in active mode are on it, for linux and bsd.
wheter they use dcgui on the linux/bsd rig or any other windows client behind a linux/bsd firewall, they all can use normal passive and active mode.

plop
Title:
Post by: Typhoon on 14 January, 2004, 20:56:20
i noticed something about the M:S its not an S all the time.. i just jumped some hubs with s5 ip and there were just M:P like ordinary Passive mode..

but if someone could make i and probably others would apreciate it..
Title:
Post by: NightLitch on 14 January, 2004, 21:53:46
Couldn't stay away just needed to create it... :-)

here you go:

-- Mode Check : By NightLitch

BotName = "ModeChecker"

function NewUserConnected(curUser)
s,e, Mode = strfind(curUser.sMyInfoString,"M:(%u*),")
if  Mode == "S" then  
curUser:SendData(BotName,"Your Client Mode ( "..Mode.." ) is not Allowed here, Please change to ( A ) or ( P ).")
curUser:Disconnect()
end
end

Hope it works...
Title:
Post by: Intel on 14 January, 2004, 22:14:06
couldu guys explain me how sock5 works ?
Title:
Post by: [T-G-T]M@sto on 14 January, 2004, 22:29:19
QuoteOriginally posted by Intel
couldu guys explain me how sock5 works ?
Not me - then i have to kick you  8)
Title:
Post by: [NL]trucker on 14 January, 2004, 22:31:57
thnks nightlitch

testing it now :-)

EDIT:

got this fault

Syntax error: bad argument #1 to `strfind' (string expected, got nil)
stack traceback:
   1:  function `strfind' [C]
   2:  function `NewUserConnected' at line 6 [file `D:\==PTOTAX==\scripts\modus-check.lua']
Title:
Post by: plop on 14 January, 2004, 23:18:12
QuoteOriginally posted by Intel
couldu guys explain me how sock5 works ?
in real short, it's a proxy server witch has the option not only 2 cache things but also make persistent connections between the local network and internet/wan.
later things like ics and nat took over.

plop
Title:
Post by: NightLitch on 14 January, 2004, 23:25:03
ahh forgot the nil handle... fix coming right up...
Title:
Post by: NightLitch on 14 January, 2004, 23:27:16
Here you go:

-- Mode Check : By NightLitch
-- Fixed the nil error

BotName = "ModeChecker"

function NewUserConnected(curUser)
s,e, Mode = strfind(curUser.sMyInfoString,"M:(%u*),")
if Mode == nil then
curUser:SendData(BotName,"You are hidding your TAG..")
curUser:Disconnect()
elseif  Mode == "S" then  
curUser:SendData(BotName,"Your Client Mode ( "..Mode.." ) is not Allowed here, Please change to ( A ) or ( P ).")
curUser:Disconnect()
end
end
Title:
Post by: [NL]trucker on 15 January, 2004, 12:52:04
thnx nightlitch

works perfect i just tested it with a hub master and he couldn,t get in :-))


GRRRRRRRRRRRR

after i had it tested by a user with odc and dc and dc stealth he passed through all three times and i got
this error

Syntax error: bad argument #1 to `strfind' (string expected, got nil)
stack traceback:
   1:  function `strfind' [C]
   2:  function `NewUserConnected' at line 7 [file `D:\==PTOTAX==\scripts\modus-check.lua']

so i think this script is no good at all cause if fake clients
can pass throug what use is this script?

anyways untill proofing wrong

A BIG THNX TO NIGHTLITCH
for his efforts.



-- Mode Check : By NightLitch
-- Fixed the nil error

BotName = "ModeChecker"

function NewUserConnected(curUser)
   s,e, Mode = strfind(curUser.sMyInfoString,"M:(%u*),")
   if Mode == nil then
      curUser:SendData(BotName,"You are hidding your TAG..")
      curUser:Disconnect()
   elseif  Mode == "S" then  
      curUser:SendData(BotName,"Your Client Mode ( "..Mode.." ) is not Allowed here, Please change to ( A ) or ( P ).")
      curUser:Disconnect()
   end
end

this is the script in scriptdir.
Title:
Post by: NightLitch on 15 January, 2004, 18:02:07
gonna fix it m8
Title:
Post by: NightLitch on 15 January, 2004, 18:24:17
well I couldn't find a problem with above script either but
have made a little modification that checks if MyInfoString
is OK. What hubsoft are you using trucker ???

-- Mode Check : By NightLitch
-- Fixed the nil error
-- Checking if MyInfo is correct, becouse it can be missed in some Build Versions...

BotName = "ModeChecker"

function NewUserConnected(curUser)
if curUser.sMyInfoString then
s,e,Mode = strfind(curUser.sMyInfoString,"M:(%u*),")
if Mode == nil then
curUser:SendData(BotName,"You are hidding your TAG..")
curUser:Disconnect()
elseif  Mode == "S" then  
curUser:SendData(BotName,"Your Client Mode ( "..Mode.." ) is not Allowed here, Please change to ( A ) or ( P ).")
curUser:Disconnect()
end
else
curUser:SendData(BotName,"Your MyInfoString is messed up or lost...")
curUser:Disconnect()
end
end

This Should work without problems...

I have tested this with: DC++, oDC, DC++k, DC++ Stealth, NMDCv2, NMDC & BCDC.

and didn't find any trouble... and Am running 0.3.3.0 Build 15.25 if you use an older Build like 15.18 or under they have a tendence to lose the MyInfo -data.

/NL
Title:
Post by: [NL]trucker on 16 January, 2004, 09:01:44
nightlitch

i saw your pm in my hub sorry m8 i was away the last day and probbably i will get back on comp this afternoon.

i will try and test this script again and let you know what the results are.

btw i,m using ptokax 15.25 with pzozzybot.
Title:
Post by: plop on 16 January, 2004, 12:35:39
i'm running 15.18 here and see the same error as trucker all the time.
but the weirdest things is that it doesn't cause any problem.
the tag is procest fine.

plop
Title:
Post by: NightLitch on 16 January, 2004, 12:46:39
so it is this problem then that the MyInfo is lost for a second then
and returns later or what... The Thing is It works gr8 on my hub.

as above with all those clients in all modes... and Stealth we
shouldn't talk about... hehe right plop... :-p

So what could ne the problem...
Title:
Post by: plop on 16 January, 2004, 13:23:00
well i grab the full tag 1st and then start splitting it up.
there allready it gives an error, but as you could have seen in my hub, it is actualy found.
maby play around with some other patterns.
"%a" or "" (this last 1 needs some explenation i gues, it means only search for an S).

plop
Title:
Post by: NightLitch on 16 January, 2004, 13:26:14
k, but I do need to mark the M: right otherwise it could
sense the S in S: right ?
Title:
Post by: plop on 16 January, 2004, 17:09:46
QuoteOriginally posted by NightLitch
k, but I do need to mark the M: right otherwise it could
sense the S in S: right ?
yep indeed.
i just gave the piece 2 capture the S, nothing more.
the rest you knew allready.

plop
Title:
Post by: witch on 19 October, 2004, 12:44:33
Grate script!!! Tested and working fine!!!

THANX NightLitch  :D