Request for script what stops multisource client
i wannna stop these:
strongdc, reverse connect
and this ldc++
Thanks, qaz
sorry to bother but is there any way to stop those clients...
QuoteOriginally posted by qaz
sorry to bother but is there any way to stop those clients...
if they show their real tag, then yes. then a ordinary client checker can do it.
hmm, PPK could probably write that, each client has a specific supports arrival, and most are unique, it doesnt matter what tag u have :) (i think)
StrongDC++, LDC++ and maybe zDC++ is not problem to detect... but Reverse Connect is for hub same as DC++ and i don't know if is posible to detect it with counting connection request (multisource client sending more request than normal client) :(
QuoteOriginally posted by Dessamator
hmm, PPK could probably write that, each client has a specific supports arrival, and most are unique, it doesnt matter what tag u have :) (i think)
do you mean this =
MultiConnectToMeArrival(User, Data) - Incoming multi connection request from user. If script return 1 hub don't process data.
indeed !
If you can implement LUA sockets in your script, you MAY be able to try and pretend that your script is a Kalmadia client. Reverse connect will respond differently that DC++ to this. Dunno if it's possible to do though, via LUA.
QuoteOriginally posted by Dessamator
indeed !
then shouldn't this be enough to stop the multi-source clients? =
-- Simple anti-multi source clients
MultiConnectToMeArrival(user,data)
if not user.bOperator then
return 1
end
end
QuoteOriginally posted by blackwings
do you mean this =
MultiConnectToMeArrival(User, Data)
No MultiConnectToMe is from old NMDc client is used (but i never see it working) to connect to user on another linked hub. Multisource client sending more $ConnectToMe and $RevConnectToMe commands ...
QuoteOriginally posted by PPK
QuoteOriginally posted by blackwings
do you mean this =
MultiConnectToMeArrival(User, Data)
No MultiConnectToMe is from old NMDc client is used (but i never see it working) to connect to user on another linked hub. Multisource client sending more $ConnectToMe and $RevConnectToMe commands ...
ok, to bad :( but is it possible to add this future to ptokax? Or cant ptokax see the difference between $ConnectToMe/$RevConnectToMe spam and multi-source client user??
well, i had meant b4 analysing the supportarrivals of each client, but i thought that other method would work, either way, from what ppk said, i guess u can count the number of connection request in a certain time pr something, compare to them to the norms, and kick them out if need be .
Some clients have special description tags and most of the users use them turned on. They may be detected from these descriptions and tags..
I am using a script that I butchered from Anti-rmDC++ script and its aliases, and most of the time its successful.. People know LUA better than me should feel free to show me if I am wrong or edit the script to help me learn..
----------------------------------------------------------
-- Anti-rmDC++ script by PPK
-- Added some code by GeceBekcisi
----------------------------------------------------------
-- rmDC Part (No need in PtokaX 0.3.3.0 build 17.09 or higher )
----------------------------------------------------------
function SupportsArrival(curUser, sData)
if string.sub(sData, 10, 11) == " " then
curUser:SendData("| You are using a bad client, so you are not allowed to access this hub. Please get a clean client from [URL]http://dcplusplus.sourceforge.net/[/URL]|")
curUser:SendData("$ForceMove "..frmHub:GetRedirectAddress())
curUser:Disconnect()
return 1
end
end
----------------------------------------------------------
-- iDC, RevCon, DCStealth, LDC, GDC, StrongDC Block Part
----------------------------------------------------------
function MyINFOArrival(curUser, sData)
if curUser.sDescription and string.find(curUser.sDescription, " curUser:SendData("| You are using iDC++, so you are not allowed to access this hub. Please get a clean client from [URL]http://dcplusplus.sourceforge.net/[/URL]|")
curUser:SendData("$ForceMove "..frmHub:GetRedirectAddress())
curUser:Disconnect()
return 1
end
if curUser.sDescription and string.find(curUser.sDescription, " curUser:SendData("| You are using DCStealth, so you are not allowed to access this hub. Please get a clean client from [URL]http://dcplusplus.sourceforge.net/[/URL]|")
curUser:SendData("$ForceMove "..frmHub:GetRedirectAddress())
curUser:Disconnect()
return 1
end
if curUser.sDescription and string.find(curUser.sDescription, " LDC") then
curUser:SendData("| You are using LDC++, so you are not allowed to access this hub. Please get a clean client from [URL]http://dcplusplus.sourceforge.net/[/URL]|")
curUser:SendData("$ForceMove "..frmHub:GetRedirectAddress())
curUser:Disconnect()
return 1
end
if curUser.sDescription and string.find(curUser.sDescription, " curUser:SendData("| You are using GDC++, so you are not allowed to access this hub. Please get a clean client from [URL]http://dcplusplus.sourceforge.net/[/URL]|")
curUser:SendData("$ForceMove "..frmHub:GetRedirectAddress())
curUser:Disconnect()
return 1
end
if curUser.sDescription and string.find(curUser.sDescription, "<<< www") then
curUser:SendData("| You are using RevConnect, so you are not allowed to access this hub. Please get a clean client from [URL]http://dcplusplus.sourceforge.net/[/URL]|")
curUser:SendData("$ForceMove "..frmHub:GetRedirectAddress())
curUser:Disconnect()
return 1
end
if curUser.sTag and string.find(curUser.sTag, "StrgDC") then
curUser:SendData("| You are using StrongDC, so you are not allowed to access this hub. Please get a clean client from [URL]http://dcplusplus.sourceforge.net/[/URL]|")
curUser:SendData("$ForceMove "..frmHub:GetRedirectAddress())
curUser:Disconnect()
return 1
end
----------------------------------------------------------
-- Added AntiVirus script to code on 01.06.2005
----------------------------------------------------------
if curUser.sEmail and string.find(curUser.sEmail, "myemail@host.com") then
-- if string.find(curUser.sEmail, "myemail@host.com") or string.find(curUser.sName, "mynick") or string.find(curUser.sDescription, "none") then
curUser:SendData("| Your DC++ system is infected by a virus. Please clean it! ||")
--curUser:Redirect(frmHub:GetRedirectAddress()," Get a AntiVirus software! ")
curUser:Disconnect()
return 1
end
----------------------------------------------------------
-- Added AntiMLDonkey script to code on 01.06.2005
----------------------------------------------------------
if string.find(curUser.sMyInfoString, "mldonkey", 1, 1) or string.find(curUser.sMyInfoString, "replika", 1, 1) or string.find(curUser.sMyInfoString, "pepek", 1, 1) or string.find(curUser.sMyInfoString, "mldc", 1, 1) then
curUser:SendData("| GO AWAY!|")
curUser:Disconnect()
return 1
end
end
----------------------------------------------------------
-- Anti-External Search (aka MoGLO etc)
----------------------------------------------------------
function ValidateNickArrival(curUser, sData)
nick = string.sub(sData, 14, -2);
if string.find(string.lower(nick), "search", 1) then
curUser:SendData(Bot,"*** External Search isn't allowed in this hub. Go somewhere else! ***")
curUser:Disconnect()
return 1
end
end
Yep, it might work for users who dont care for changing the description and stuff, but its not "full proof". As a temporary measure it might be suitable until a way to block them completely, is found !
QuoteOriginally posted by GeceBekcisi
Some clients have special description tags and most of the users use them turned on. They may be detected from these descriptions and tags..
I am using a script that I butchered from Anti-rmDC++ script and its aliases, and most of the time its successful.. People know LUA better than me should feel free to show me if I am wrong or edit the script to help me learn..
just a few comments on your script ;)
The way you use to detect those clients is just ordinary client checker, which cant see through dc++ emulation.
its better to script what clients you want to use and disconnect all others.
And as you meantion in the script description, anti-RMDC isn't needed any more.
And I personally think this is a faster and better anti-mldc function =
function MyINFOArrival(user,data)
if user.bRegistered==nil then
if string.find(user.sDescription,"mld(%S+)") or string.find(user.sDescription,"edonk(%S+)") then
user:Disconnect()
return 1
end
end
end
Maybe wrong, but i think the newer ptokaX block MLDC's anyway. :)
Or it might be that the min share bugs are actually sorted. (they always have 11mb, but seem to get around all older hubsofts minshare settings.)
StrongDC can be blocked via supports as well as rm. There is some post on this forum by PPK saying how to do it. :)
QuoteOriginally posted by blackwings
QuoteOriginally posted by GeceBekcisi
People know LUA better than me should feel free to show me if I am wrong or edit the script to help me learn..
just a few comments on your script ;)
This is my second script trial on LUA and I need any kind of comments, and thanks for yours :)
I have to see the full login sequence between hub and client like
Hub: $Lock EXTENDEDPROTOCOLuLUX7n^Bm:3DvTgGcGXUL4=mFVxiv Pk=PtokaX
Client: $Supports MiniSlots XmlBZList ADCGet TTHL TTHF GetZBlock ZLIG|
Client: $Key ?????A ????0????????u?w#"3BB????/%DCN005%/???|$ValidateNick TestUSER|$Version 1,0091|
Hub: $Supports HubINFO
Hub: $Hello TestUSER
Client: $GetNickList|
Hub: $NickList ...........
Hub: $OpList ..........
(and also must have a large client archieve, but I have newly began to create my archieve so I lack info about them) to make a better detection script but I dont know how to see it (the sequence above is taken from HubList.org logs). Is PtokaX User/Chat screen enough?
QuoteOriginally posted by Pothead
StrongDC can be blocked via supports as well as rm. There is some post on this forum by PPK saying how to do it. :)QuoteOriginally posted by PPK
Not bug but is easy to identify it by supports :D[I]StrongDC++ RC9 fixed 2[/I]
$Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch QuickList GetZBlock|
[I]CZDC++ 0.666[G][/I]
$Supports UserCommand NoGetINFO NoHello UserIP2 QuickList|
[I]DC++ 0.670[/I]
$Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch GetZBlock |
Another thing to detect. DC++ sending $GetNickList before $MyINFO on login, CZDC++ and StrongDC+ after :]
And if it is, my LUA knowledge is not enough to make a script detect special strings and their placement in supports :( That's why people knowing LUA better than me should feel free to show me if I am wrong or edit the script and add features to help me learn..
QuoteOriginally posted by Pothead
Maybe wrong, but i think the newer ptokaX block MLDC's anyway. :)
Yes PtokaX block 99.9% of mldc clients, they have bug in MyINFO... but here exist few without this bug (and diferent share size than the 99.9% of blocked) and for this is script needed :(
Thanks for the info. I'll add it again. :)
--Anti rmDC++ script for PtokaX 0.3.3.0 Lua 5.0.2 by PPK
--//Config
AdminNick = "!" -- PM Reports Goto This Nick
Bot = frmHub:GetHubBotName()
function SupportsArrival(curUser, sData)
if string.sub(sData, 10, 11) == " " then
curUser:SendData( Bot.."Buggy client, go away!")
SendPmToNick(AdminNick,Bot, " rmDC++ from IP: "..curUser.sIP.." trying to login... he is wasting time")
curUser:Disconnect()
return 1
elseif string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch QuickList GetZBlock")then
curUser:SendData( Bot.."Multisource client")
SendPmToNick(AdminNick,Bot, " StrongDC++ from IP: "..curUser.sIP.." trying to login... he is wasting time")
curUser:Disconnect()
return 1
end
end
QuoteOriginally posted by Pothead
Thanks for the info. I'll add it again. :)
but that does only block strongdc right? not all multi source clients?
Blackwings: Yes that only blocks strong and rm. It was to be added to the other script posted, if wanted.
GeceBekcisi: That's because BigMuscle sorted out part of his client emulations problems. :)
added CZDC just for fun = --Anti rmDC++ script for PtokaX 0.3.3.0 Lua 5.0.2 by PPK
--ADDED: Anti strongDC++ by Pothead
--ADDED: Anti CZDC++ by blackwings
--//Config
AdminNick = "!" -- PM Reports Goto This Nick
Bot = frmHub:GetHubBotName()
function SupportsArrival(curUser, sData)
if string.sub(sData, 10, 11) == " " then
curUser:SendData( Bot.."Buggy client, go away!")
SendPmToNick(AdminNick,Bot, " rmDC++ from IP: "..curUser.sIP.." trying to login... he is his wasting time")
curUser:Disconnect()
return 1
elseif string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch QuickList GetZBlock")then
curUser:SendData( Bot.."Multisource client, go away")
SendPmToNick(AdminNick,Bot, " StrongDC++ from IP: "..curUser.sIP.." trying to login... he is his wasting time")
curUser:Disconnect()
return 1
elseif string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 QuickList")then
curUser:SendData( Bot.."CZDC++, go away")
SendPmToNick(AdminNick,Bot, " CZDC++ from IP: "..curUser.sIP.." trying to login... he is wasting his time")
curUser:Disconnect()
return 1
end
end
Then can you use "DC++ sending $GetNickList before $MyINFO on login, CZDC++ and StrongDC+ after" info to detect emulating clients?
Isn't there any way to do this?
Edit: I see most of MultiSource clients have show speed option resulting addition of [xxxK/xxxK] or [xxxM/xxxM] like things to descriptions. If there is no Non-MultiSource client having this as an option; this can be applied too.
Now the question is; is there any Non-MultiSource client having this as an option?
If no, why not giving a try on this?
R2++ has this connection speeds, and is none-multisource. :)
But R2++ show its speed in connection and with (), not in description with []...
QuoteOriginally posted by GeceBekcisi
I see most of MultiSource clients have show speed option resulting addition of [xxxK/xxxK] or [xxxM/xxxM] like things to descriptions. If there is no Non-MultiSource client having this as an option; this can be applied too.
Now the question is; is there any Non-MultiSource client having this as an option?
BCDC++ knows this (at least the FleetCommand versions), and many others I assume. R2++ has that connection type like DSL(1024/384) which is weird, I just do not get why this makes sense.
well at least its a way to check that :)
Then, can you code it?
QuoteOriginally posted by GeceBekcisi
Then, can you code it?
Code what?
Code a script to detect that additions to description, maybe with a CTM / RCTM spam counter to be sure he's multiple sourcing??
well based on those things its possible to script, but 100% efficience is not garanteed !
Like people who force the connection a few times. ?(
QuoteOriginally posted by Pothead
Like people who force the connection a few times. ?(
You may be right but and intelligent detecting mechanism may fail about %1 or less; in my opinion..
QuoteOriginally posted by PPK
StrongDC++, LDC++ and maybe zDC++ is not problem to detect... but Reverse Connect is for hub same as DC++ and i don't know if is posible to detect it with counting connection request (multisource client sending more request than normal client) :(
I am very very happy if you can write that script what stops strongdc and ldc++ and zdc++. This script should stop all users icluded ops to use multisource clients. No options to remove any rank so this is real deal for all users...
I have small hub and i dont wanna support multisource thiefs who stole all slots...
thanks for your help...
BTW, i allways trust power of Ptokax...
can somebody write that script... :)
hello, is there anyone who can do this ? or make some part of these... as ldc++, strongdc, stealthdc maybe some other mess of clients....
Only checked for syntax errors, and the original code is working fine for me but you should be careful about errors though. Have fun!--// ------------------------------------------------------------------------------------------------------------ --
--// - GeceBekcisi'nin yazdigi HubBekcisi s?r?m 0.5 ten alintidir
--// - Stripped from HubBekcisi v0.5 by GeceBekcisi
--// ------------------------------------------------------------------------------------------------------------ --
--// - Features: Simple client detection
--// ------------------------------------------------------------------------------------------------------------ --
--------------------------------------------------------------------------------------------------------------------
--// Global Settings
--------------------------------------------------------------------------------------------------------------------
sHub = frmHub:GetHubName() -- Hub's Name
sBot = frmHub:GetHubBotName() -- Bot's Name ( leave so if you don't want to use a special name for your bot )
sRdAd = frmHub:GetRedirectAddress() -- Redirect address ( leave so if you want users to be redirected to the default redirect address )
sRedirect = "off" -- Redirect detected users ( on / off )
sInform = "on" -- Inform user why he was banned / disconnected ( on / off )
sFeed = "on" -- Feed about detected users ( on / off )
sFeedType = "OPS" -- "OPS" for Pm to ops, "NICK" for pm to specified nick below
sFeedNick = "Admin" -- Enter nick to send feeds if NICK selected above
sKickType = "BAN" -- "DSC" to disconnect user, "BAN" to timeban user for specified minutes below
iTimeBan = "60" -- TimeBan time in minutes if BAN selected above
--------------------------------------------------------------------------------------------------------------------
-- Some notes about Kick Type setting
-- Disconnecting may cause feed spam if a popular hub with feed turned on
-- TimeBanning fixes feed spam but may cause a slow hub because of huge banlist
--------------------------------------------------------------------------------------------------------------------
--// Client Detection Tables // Edit as you wish, but don't touch the structure
--------------------------------------------------------------------------------------------------------------------
tBadDesc = {
{"<.P>", "PhantomDC++"},
{"reverseconnect.sf.net","ReverseConnect"},
{"www.RevConnect.com","ReverseConnect"},
{" {" {"LDC","LDC++"},
{"Glesius.it","GlesiusDC++"},
{"PeerWeb.org","PeerWebDC++"},
{"-=mtrx=-", "StrongDC++ RC9f2 Matrix Edition"},
}
tBadTags = {
{"LDC", "LDC++"},
{"GDC", "GlesiusDC++"},
{"Strg","StrongDC++"},
{"Z++","Zion++"},
{"UKC","UKCable++"},
{"PWDC++","PeerWebDC++"},
}
--------------------------------------------------------------------------------------------------------------------
--// rmDC Block Part by PPK (No need in PtokaX 0.3.3.0 b17.09+ )
--------------------------------------------------------------------------------------------------------------------
function SupportsArrival(curUser, sData)
if string.sub(sData, 10, 11) == " " then
local sClient = "rmDC++"
if sFeed == "on" then
if sFeedType == "OPS" then
SendPmToOps(sBot, "A user from IP "..curUser.sIP.." is trying to login with "..sClient.." but stopped.")
else
SendPmToNick(sFeedNick, sBot, "A user from IP "..curUser.sIP.." is trying to login with "..sClient.." but stopped.")
end
end
if sInform == "on" then
curUser:SendData(sBot, "Hi, welcome to "..sHub.." hub... You are using a bad client named "..sClient.." ")
curUser:SendData(sBot, "Because of your client, you are not allowed to access this hub. Please get a clean client from [URL]http://dcplusplus.sourceforge.net/[/URL]")
end
if sRedirect == "on" then
curUser:Redirect(sRdAd)
end
if sKickType == "DSC" then
curUser:Disconnect()
else
curUser:TimeBan(iTimeBan)
end
return 1
end
--------------------------------------------------------------------------------------------------------------------
--// StrongDC (Non-Emulating supports) Block Part
--------------------------------------------------------------------------------------------------------------------
if not curUser.bOperator then
if string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch QuickList GetZBlock")then
local sClient = "StrongDC++ or a StrongDC++ Based client"
if sFeed == "on" then
if sFeedType == "OPS" then
SendPmToOps(sBot, "A user from IP "..curUser.sIP.." is trying to login with "..sClient.." but stopped.")
else
SendPmToNick(sFeedNick, sBot, "A user from IP "..curUser.sIP.." is trying to login with "..sClient.." but stopped.")
end
end
if sInform == "on" then
curUser:SendData(sBot, "Hi, welcome to "..sHub.." hub... You are using a bad client named "..sClient.." ")
curUser:SendData(sBot, "Because of your client, you are not allowed to access this hub. Please get a clean client from [URL]http://dcplusplus.sourceforge.net/[/URL]")
end
if sRedirect == "on" then
curUser:Redirect(sRdAd)
end
if sKickType == "DSC" then
curUser:Disconnect()
else
curUser:TimeBan(iTimeBan)
end
return 1
end
end
end
--------------------------------------------------------------------------------------------------------------------
--// Other Clients Block Part
--// Table idea & function taken from blackwings' BASIC script
--------------------------------------------------------------------------------------------------------------------
function MyINFOArrival(curUser, sData)
if not curUser.bOperator then
if curUser.sDescription then
for i=1,table.getn(tBadDesc) do
tBadDesc[i][1] = string.gsub(tBadDesc[i][1], "<" , "")
if string.find(curUser.sDescription,tBadDesc[i][1]) then
local sClient=tBadDesc[i][2]
if sFeed == "on" then
if sFeedType == "OPS" then
SendPmToOps(sBot, ""..curUser.sName.." from IP "..curUser.sIP.." is trying to login with "..sClient.." but stopped.")
else
SendPmToNick(sFeedNick, sBot, ""..curUser.sName.." from IP "..curUser.sIP.." is trying to login with "..sClient.." but stopped.")
end
end
if sInform == "on" then
curUser:SendData(sBot, "Hi, welcome to "..sHub.." hub... You are using a bad client named "..sClient.." ")
curUser:SendData(sBot, "Because of your client, you are not allowed to access this hub. Please get a clean client from [URL]http://dcplusplus.sourceforge.net/[/URL]")
end
if sRedirect == "on" then
curUser:Redirect(sRdAd)
end
if sKickType == "DSC" then
curUser:Disconnect()
else
curUser:TimeBan(iTimeBan)
end
return 1
end
end
end
if curUser.sTag then
for i=1,table.getn(tBadTags) do
if string.find(curUser.sTag,tBadTags[i][1]) then
local sClient=tBadTags[i][2]
if sFeed == "on" then
if sFeedType == "OPS" then
SendPmToOps(sBot, ""..curUser.sName.." from IP "..curUser.sIP.." is trying to login with "..sClient.." but stopped.")
else
SendPmToNick(sFeedNick, sBot, ""..curUser.sName.." from IP "..curUser.sIP.." is trying to login with "..sClient.." but stopped.")
end
end
if sInform == "on" then
curUser:SendData(sBot, "Hi, welcome to "..sHub.." hub... You are using a bad client named "..sClient.." ")
curUser:SendData(sBot, "Because of your client, you are not allowed to access this hub. Please get a clean client from [URL]http://dcplusplus.sourceforge.net/[/URL]")
end
if sRedirect == "on" then
curUser:Redirect(sRdAd)
end
if sKickType == "DSC" then
curUser:Disconnect()
else
curUser:TimeBan(iTimeBan)
end
return 1
end
end
end
end
end
--// ------------------------------------------------------------------------------------------------------------ --
--// - Simple client detection ends
--// ------------------------------------------------------------------------------------------------------------ --
QuoteOriginally posted by blackwings
added CZDC just for fun = --Anti rmDC++ script for PtokaX 0.3.3.0 Lua 5.0.2 by PPK
--ADDED: Anti strongDC++ by Pothead
--ADDED: Anti CZDC++ by blackwings
--//Config
AdminNick = "!" -- PM Reports Goto This Nick
Bot = frmHub:GetHubBotName()
function SupportsArrival(curUser, sData)
if string.sub(sData, 10, 11) == " " then
curUser:SendData( Bot.."Buggy client, go away!")
SendPmToNick(AdminNick,Bot, " rmDC++ from IP: "..curUser.sIP.." trying to login... he is his wasting time")
curUser:Disconnect()
return 1
elseif string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch QuickList GetZBlock")then
curUser:SendData( Bot.."Multisource client, go away")
SendPmToNick(AdminNick,Bot, " StrongDC++ from IP: "..curUser.sIP.." trying to login... he is his wasting time")
curUser:Disconnect()
return 1
elseif string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 QuickList")then
curUser:SendData( Bot.."CZDC++, go away")
SendPmToNick(AdminNick,Bot, " CZDC++ from IP: "..curUser.sIP.." trying to login... he is wasting his time")
curUser:Disconnect()
return 1
end
end
can u make script what makes all things like this ?
Post edited above due to your request with some more options.