PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: plop on 11 October, 2003, 23:25:22

Title: anti mldc
Post by: plop on 11 October, 2003, 23:25:22
stripped from ai bot and bit modified.
haven't tested this as a stand alone script but in ai it's definatly working.
as kicking of mldc is hard 2 nearly imposible i made this as a backup.
it shows (or should show) there ip into the opchat so the op's can ban that.
it's running for a few day's now in the vikings hub and the amount of mldc reports is cleary going down.

function NewUserConnected(user)
   local i,j,mldc = strfind(user.sMyInfoString, "$(%d+)%$")
if strfind(user.sMyInfoString, "mldonkey", 1, 1) or strfind(user.sMyInfoString, "mldc", 1, 1) or (tonumber(mldc) ==11534336) then
user:SendData(Bot, "All mlDonkey traces cause disconnection ... begone foul swine ... |")
      SendPmToOps(frmHub:GetOpChatName(), "mldc user: "..user.sName.." is friendly begging for his IP to be banned: "..user.sIP.."|")
      user:Disconnect()
      return 1
end
end

plop
Title:
Post by: [NL]Pur on 15 October, 2003, 11:57:50
another anti - mldonkey script
donkey get kicked in dataarrival - no ip showed



function DataArrival(user,data)

if strfind(data,"$MyINFO",1,1) then
forbiddenWords = { "mldonkey","mldc","11534336" }
for key,checkWord in forbiddenWords do
if strfind(data, checkWord, 1, 1) then
        user:Disconnect()
end
end
end

end
Title: kicking MLDC
Post by: (Mr420) on 20 October, 2003, 02:01:19
hey peeps. I have had troubles with MLDC (as all hub owners do). I have found that rather than kicking them upon the sending of the MyInfoString, it is best to use the $MyINFO command straight from the hubsoft as [NL]Pur has. It seems to work better and takes less hub resources. just thought I would add my 2 cents hehe.

BTW: I run Pur's version, and to this date...have NO MLDC clients. Good Job Pur!
Title:
Post by: klownietklowniet on 20 October, 2003, 02:07:05
I can't really believe that checking in DataAarrival for $MyInfo takes less resources that checking on NewUserConnected(). Only difference is maybe that it gets rid of mldcs faster...
Title:
Post by: plop on 20 October, 2003, 04:58:59
there were no mldc clients in our hub's, but by banning there ip's the bot has it more relax. lol
that definatly takes less resources, and that was the idea i had when i made it like this.
the ip ban is handled by ptokax so the bot does nothing.  lol
still cool 2 see how pur handled it.
only 1 thing left 2 say, use the 1 you like most.

plop
Title: mldonkey
Post by: [NL]Portal on 12 January, 2004, 23:34:26
QuoteOriginally posted by plop
stripped from ai bot and bit modified.
haven't tested this as a stand alone script but in ai it's definatly working.
as kicking of mldc is hard 2 nearly imposible i made this as a backup.
it shows (or should show) there ip into the opchat so the op's can ban that.
it's running for a few day's now in the vikings hub and the amount of mldc reports is cleary going down.

function NewUserConnected(user)
   local i,j,mldc = strfind(user.sMyInfoString, "$(%d+)%$")
if strfind(user.sMyInfoString, "mldonkey", 1, 1) or strfind(user.sMyInfoString, "mldc", 1, 1) or (tonumber(mldc) ==11534336) then
user:SendData(Bot, "All mlDonkey traces cause disconnection ... begone foul swine ... |")
      SendPmToOps(frmHub:GetOpChatName(), "mldc user: "..user.sName.." is friendly begging for his IP to be banned: "..user.sIP.."|")
      user:Disconnect()
      return 1
end
end

plop


Can someone not write a script with a automaticly BAN.
No IP adresses at the OPCHAT but an inmediatly BAN!!
Much better then collect ip adresses.
Title:
Post by: NightLitch on 12 January, 2004, 23:44:05
This should do it

function NewUserConnected(user)
   local i,j,mldc = strfind(user.sMyInfoString, "$(%d+)%$")
if strfind(user.sMyInfoString, "mldonkey", 1, 1) or strfind(user.sMyInfoString, "mldc", 1, 1) or (tonumber(mldc) ==11534336) then
user:SendData(Bot, "All mlDonkey traces cause disconnection ... begone foul swine ... |")
      SendPmToOps(frmHub:GetOpChatName(), "mldc user: "..user.sName.." is friendly begging for his IP to be banned: "..user.sIP.."|")
      user:Ban()
      return 1
end
end
Title:
Post by: plop on 13 January, 2004, 12:20:25
QuoteOriginally posted by [NL]Portal
Can someone not write a script with a automaticly BAN.
No IP adresses at the OPCHAT but an inmediatly BAN!!
Much better then collect ip adresses.
problem on mldc is that there description is part of there name.
for example your client shows user name: "klaasje" description: "mldc", then there full name is actualy "klaasje mldc".
mldc clients aren't following the dc protocol with that space in the nick.
thats why i came up with the idea of reporting there ip's 2 be banned.
but good news, the 0.3.3.0 beta of ptokax kicks all there asses, just put a min share of 12MB or higher.

plop
Title:
Post by: Intel on 13 January, 2004, 12:32:18
But the Best is just making 12MB minimum share in ur hub right ?
Title:
Post by: plop on 14 January, 2004, 04:56:14
QuoteOriginally posted by Intel
But the Best is just making 12MB minimum share in ur hub right ?
ptokax checks 1st so thats indeed the fastest/best.
but on testdrive and earlyer versions you still see them show up reguarly.
there way of login in isn't what you can call friendly.

plop
Title:
Post by: pHaTTy on 14 January, 2004, 04:57:43
btw ppl checking the tag is no longer valid, just because they say mldc doesnt mean they dont share ;)

so technically atm just setting 12mb is probably the best way of doing it for now ;)
Title:
Post by: ????L?F?? on 20 January, 2004, 22:52:35
Im having a mldoneky problem in my hub atm aswel, exept it isnt ptokax ;-)

trying to hardcode it into the server and for some reason they dont bugger off, so instead of posting c++ code here, ill just ask, is the only way to find a mldonkey is by description saying mldc/mldonkey and share size being 11mb?
Title:
Post by: gizmo on 20 January, 2004, 23:54:26
this works perfekt


function DataArrival(user,data)

   if strfind(data,"$MyINFO",1,1) then
      forbiddenWords = { "mldonkey","mldc","11534336" }
      for key,checkWord in forbiddenWords do
         if strfind(data, checkWord, 1, 1) then
                 user:Disconnect()
         end
      end
   end
Title:
Post by: ????L?F?? on 21 January, 2004, 00:22:22
ok never mind it does work ^^