Client Shield By: NightLitch
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Client Shield By: NightLitch

Started by NightLitch, 11 March, 2004, 21:53:06

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

NightLitch

Client Shield
Version: 1.1
By: NightLitch
Date: 2004-03-11

Allow/Deny Client's:

DC++, oDC, DC:PRO, DCGUI, DCTC
NeoModus 2, iDC, zDC++, MS++
DC++k CDM, Phantom DC++
Bear Claw DC++, CZDC++, Ruri_Ruri
NoTag/Unknown, Fake




Download!  
//NL

kbeh273300

looks great il give it a try :)
-=United Kings network=-
Network Webpage?
Hub address: houseofkings.no-ip.org:420
hub webpage
hub forum

WickeD

Is this the one that are in NXS-3 NL?


//WickeD

NightLitch

QuoteOriginally posted by WickeD
Is this the one that are in NXS-3 NL?


//WickeD

Nope, but I will implent it to NXS-3 l8r.
//NL

(=CyberPimp=)

Great script NightLitch, just what I was looking for. Now I can ban DC++ and all the DC++ emulators. One question tough.. does it allow or denie clients that are not listed?
I got one error: Syntax Error: bad argument #1 to `strfind' (string expected, got nil)
I translated the masseges to icelandic.. maybe thats the error.. I don?t know.
-------------------------------------------------
-- Client Shield --
-------------------------------------------------
sBot = "Client-Shield"
-------------------------------------------------
-- Don't Edit
sVersion = "1.1"
sCreator = "NightLitch"
sDate = "2004-03-11"
-------------------------------------------------
-- Set Clients 1=on / 0=off
AllowClients = {
["DC++"]=0,
["oDC"]=1,
["DC:PRO"]=0,
["DCGUI"]=1,
["DCTC"]=0,
["NeoModus 2"]=1,
["iDC"]=1,
["zDC++"]=0,
["MS++"]=0,
["DC++k CDM"]=0,
["Phantom DC++"]=0,
["Bear Claw DC++"]=0,
["CZDC++"]=0,
["Bear Claw DC++"]=0,
["Ruri_Ruri"]=0,
["NoTag/Unknown"]=0,
["Fake"]=0,
}
-- Set Profile MinSlots
MinSlots = {
[2] = 2,   -- VIP
[3] = 2,   -- REG
[-1]= 4,   -- User
}
-- Set Profile MaxSlots
MaxSlots = {
[2] = 15,   -- VIP
[3] = 5,   -- REG
[-1]= 5,   -- User
}
-- Set Profile SlotRatio
SlotRatio = {
[2] = 2,   -- VIP
[3] = 2,   -- REG
[-1]= 2,   -- User
}
-- Set Profile MaxHubs
MaxHubs = {
[2] = 2,   -- VIP
[3] = 2,   -- REG
[-1]= 2,   -- User
}
-- Set Profile Netlimiter
NetLimiter = {
[2] = 0,   -- VIP
[3] = 0,   -- REG
[-1]= 0,   -- User
}
-----------------------------------------------------------
-- Don't edit bellow this point
sClients = {
{ "{ "<++","DC++" },
{ "{ "{ "{ "http://dc.ketelhot.de","DCGUI" },
{ "{ "{ "zDC++","zDC++" },
{ "","MS++" },
{ "{ "<.P>","Phantom DC++" },
{ "}
function NewUserConnected(sUser)
   local Client,Speed,Share,Tag = sParseMyInfo(sUser.sMyInfoString)
   sUser:SendData("Running "..sBot.." Version: "..sVersion.." By: "..sCreator.." ( "..sDate.." ) ")
   sUser:SendData(" ")
   sUser:SendData("Welcome "..sUser.sName.." you are using "..Client.." version: "..Tag["V"])
end
function sParseMyInfo(sMyInfo)
   local sClient = "NoTag/Unknown"
   for i = 1,getn(sClients) do if strfind(sMyInfo,sClients[1]) then sClient = sClients[2] end end
   local sBwidh = "Unlimited"
   local _,_,sSpeed,sShare = strfind(sMyInfo,"^%$MyINFO %$ALL [^ ]+ [^$]*%$ $([^$]+)[^$]%$[^$]*%$%s*(%d+)%$")
   sShare = tonumber(sShare)
   local _,_,sVer,sMode = strfind(sMyInfo,"V:(.*),M:([SAP])")
   local _,_,sHub = strfind(sMyInfo,"H:(%d+)")
   local _,_,sSlot = strfind(sMyInfo,"S:(%d+)")
   local _,_,sBwidh = strfind(sMyInfo, "[LBF]:%d*%/?(%d+)")
   if strfind(sMyInfo,"<%+%+") then _,_,sVer = strfind(MyInfo,"") sClient = "oDC"
   elseif strfind(sMyInfo,"Ruri_Ruri") then sClient = "Ruri_Ruri"
   elseif sClient=="iDC" then _,_,sVer = strfind(sMyInfo,"") end
   if strfind(sMyInfo,"H:\"%d+/%d+/%d+\"") then sClient = "Fake" end
   if strfind(sMyInfo, "L:") then sClient = "CZDC++"
   elseif strfind(sMyInfo, "B:") then if not sClient=="Phantom DC++" then sClient = "Bear Claw DC++"  end end
   sTag = {["S"]=sSlot,["B"]=sBwidh,["H"]=sHub,["V"]=sVer,["M"]=sMode}
   return sClient,sSpeed,sShare,sTag
end
function DataArrival(sUser, data)
   if (strsub(data,1,7) == "$MyINFO") and not sUser.bOperator then
      local Client,Speed,Share,Tag = sParseMyInfo(data)
      if AllowClients[Client]~=1 then
         sUser:SendData(sBot,"   "..Client.." er banna? ? hubbnum, nota?u oDC, iDC++, NMDC, DCgui e?a DCGui-QT !")
         sUser:Disconnect()
      else
         if ( Tag["S"]==nil or Tag["H"]==nil ) then
            sUser:SendData(sBot,"?? ert a? fela Tag-i?, banna?!")
            sUser:Disconnect()
         elseif ( tonumber(Tag["S"]) < MinSlots[sUser.iProfile] ) then
            sUser:SendData(sBot,"?? ert me? of f? slot opin, l?marki? er "..MinSlots[sUser.iProfile].." slot(s) open.")
            sUser:Disconnect()
         elseif ( tonumber(Tag["S"]) > MaxSlots[sUser.iProfile] ) then
            sUser:SendData(sBot,"?? ert me? of m?rg slot opin, h?marki? er "..MaxSlots[sUser.iProfile].." slot(s) open.")
            sUser:Disconnect()
         elseif ( SlotRatio[sUser.iProfile] and tonumber(Tag["S"]) < tonumber(Tag["H"])*SlotRatio[sUser.iProfile] ) then
            sUser:SendData(sBot,"?? ert me? of f? slot opin, l?marki? er "..SlotRatio[sUser.iProfile].." slot ? hvern Hub.")
            sUser:Disconnect()
         elseif ( tonumber(Tag["H"]) > MaxHubs[sUser.iProfile] ) then
            sUser:SendData(sBot,"?? ert ? of m?rgum hubbum, h?marki? er "..MaxHubs[sUser.iProfile].." hubbar.")
            sUser:Disconnect()
         elseif not Tag["B"]=="Unlimited" and ( tonumber(Tag["B"]) < NetLimiter[sUser.iProfile] ) then
            sUser:SendData(sBot,"You have limit your bandwidh to "..Tag["B"].." kB/s, minimum is "..NetLimiter[sUser.iProfile].." kB/s.")
            sUser:Disconnect()
         end
      end
   end
end

Thats my script... can you find the error.
oh and i?m useing Robocop aswell if you think that could be a prob.

MX-10

Hi,
You must remeber that if you change the text that os not in " " you will ruin the script,exept that you now what u are doing

MX-10
Iceland
From
MX-10
Iceland

NightLitch

Script updated above. Error fixed.

/NL
//NL

(=CyberPimp=)

Yep tanx.....but you did not answer the "..does it allow or denie clients that are not listed? ". And are you going to put more clients on that list.

MX-10........j? ?g veit ?a? :o)
hver ert ?? ? Valh?ll, kannast ekki vi? ?etta nick. Virkar lua ? Verlihubba? er ?a? ekki eina sem ?i? eru? me?, e?a ertu kannski bara user ? Valh?ll.

NightLitch

Am gonna update it more, when I get the time.

It is a real fine bot now. But more will come.

/NL
//NL

(=CyberPimp=)

hehehe again you did not answer this: "..does it allow or denie clients that are not listed? ".

Yep it?s really good script :o)

[NL]trucker

#10
(=CyberPimp=)

Quotehehehe again you did not answer this: "..does it allow or denie clients that are not listed? ".

something that you dont block will automatticly be allowed .
And since there arent any other clients listed in the script they dont get blocked
That is why NL said
QuoteAm gonna update it more, when I get the time.

It is a real fine bot now. But more will come.

that he would update this script.
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


NightLitch

I have a few more client to work my way through so I can make it more complete, but the thing is that almost every client can emulate DC++ so.

But I will see what I can come up with.

/NL
//NL

(=CyberPimp=)

Quotebut the thing is that almost every client can emulate DC++ so.
..... that is wuy I block DC++ now, works great  :D  I only allow oDC, iDC, NMDC, DCgui and DCGui-QT cos thay are not emulated by other clients. I don?t see any reason to allow DC++ when you have oDC and iDC, thay are better clients anyways. It?s the only way to get rid of those emulated clients.

Sorry that I did not undersatand... well NL Tucker came with the sf answer that I were looking for... :baby:

[NL]Pur

if you have blocked dc++, do you think you have users left ??

(=CyberPimp=)

yes I have all my users I have been blockin DC++ for a week now and no problems, this is a privet hub and the users just have to change the client... and that isn?t difficult.  :D

[NL]trucker

Nightlitch

are ya still working on a update??
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


NightLitch

QuoteOriginally posted by [NL]trucker
Nightlitch

are ya still working on a update??

Yes I Am, trying to get some more clients in and trying to specify some things that make one or more clients unique.

But plz feel free and come with suggestions... plz...

/NL
//NL

[NL]trucker

nl

if you go to [NL]Pur his site you find a lot of diffrent clients

http://dcjungle.sytes.net/
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


VAZ

this is a great script!
it would be nice if it could detect netlimiter in all of those
clients so it would be possible to block all of them if they
have netlimiter installed.

if the user is using odc and has netlimiter installed on the computer then the script would block him.

but maybe that is to much work  :rolleyes:

#jdslkfjals#

it would be very nice if it would be avaible to config this script to only check ops. because i dont like when my ops are using oDC and DC++

n1ck

..... that is wuy I block DC++ now, works great :D I only allow oDC, iDC, NMDC, DCgui and DCGui-QT cos thay are not emulated by other clients. I don?t see any reason to allow DC++ when you have oDC and iDC, thay are better clients anyways. It?s the only way to get rid of those emulated clients


*coughs* RMDC can emulate oDC
dcuk.direct-connect.co.uk

**compiled bots are like what microsoft is to open source!**

Typhoon

All clients can be emulated , so banning DC++ , don't help much. people just find other clients to emulate ..


Typhoon?



SMF spam blocked by CleanTalk