DC++ only (more accurate)
 

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

DC++ only (more accurate)

Started by blackwings, 15 June, 2005, 19:15:57

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

blackwings

If I understood PPK and Pothead correctly, this would make a more accurate DC++ only script =
--Anti rmDC++ script for PtokaX 0.3.3.0 Lua 5.0.2 by PPK
--CHANGED: modded to become a dc++ only script
----version 1.0

--//Start of Config
Bot = frmHub:GetHubBotName()

DcVer = "0.674"
--//End of Config

function NewUserConnected(curUser)
	if not curUser.bOperator then
		if curUser.bHasTag then
			if curUser.sClient=="DC++" then
				if tonumber(curUser.sClientVersion) < tonumber(DcVer) then
					curUser:SendData(Bot,"You aren't using DC++, go away")
					curUser:Disconnect()
					return 1
				end
			else
				curUser:Disconnect()
			end
		else
			curUser:Disconnect()
		end 
	end
end


function SupportsArrival(curUser, sData)
	if string.sub(sData, 10, 11) == "  " then
		curUser:SendData( Bot.."Buggy client, go away!")
		SendPmToNick(Bot, " rmDC++ from IP: "..curUser.sIP.." trying to login... he is his wasting time")
		curUser:Disconnect()
		return 1
	elseif not string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch GetZBlock")then
		curUser:SendData( Bot.."You aren't useing DC++, go away")
		SendPmToNick(Bot, " Non-DC++ client from IP: "..curUser.sIP.." trying to login... he is his wasting time")
		curUser:Disconnect()
		return 1
	end
end


Pothead

How come clients less than 0.670 aren't classed as DC++ ?

blackwings

QuoteOriginally posted by Pothead
How come clients less than 0.670 aren't classed as DC++ ?
you mean that the support I use is only for 0.670 and newer?


Pothead

Yup. In that case, you should only support 0.674 clients (for the security fix). :)

blackwings

QuoteOriginally posted by Pothead
Yup. In that case, you should only support 0.674 clients (for the security fix). :)
ok, I have edited the script. So how should the support look like if I want to allow dc++ as old as 0.401(so that I can edit the script :) )?


Dessamator

well u can do it in 2 ways,
1.create a table of allowed dcs

or

2. if version is less than 0.674 and more then 0.401 then -- dostuff
Ignorance is Bliss.

PPK

One small thing, GetZBlock is optional in DC++ (safe and compessed transfers) ;) And one more thing DC++ have bug and always have space after last supports... some mods have this fixed :)) And for me is time to improve DC++ emulation in CZDC++ >:-]
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Pothead

QuoteOriginally posted by blackwings
QuoteOriginally posted by Pothead
Yup. In that case, you should only support 0.674 clients (for the security fix). :)
ok, I have edited the script. So how should the support look like if I want to allow dc++ as old as 0.401(so that I can edit the script :) )?
You don't really need to do the supports for DC++, the min ver does that fine. Unless you did it the otherway around. Block all clients which don't follow DC++ support structure. :)

blackwings

QuoteOriginally posted by PPK
And for me is time to improve DC++ emulation in CZDC++ >:-]
dont do that, I think its great to be able to detect czdc++ even if its emulate dc++ tag.


Pothead

#9
How about a

PPK

QuoteOriginally posted by Pothead
How about a
CZDC++ is modified DC++, but always DC++ and because this have DC++ tag :P I don't change tag now, after 3 years of modifiing it ;)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

blackwings

QuoteOriginally posted by PPK
QuoteOriginally posted by Pothead
How about a
CZDC++ is modified DC++, but always DC++ and because this have DC++ tag :P I don't change tag now, after 3 years of modifiing it ;)
so you will make it so that czdc++ cant be detected :( I dont like haveing clients with upload limiter in my hub :(


PPK

QuoteOriginally posted by blackwings
I dont like haveing clients with upload limiter in my hub :(
I know, you and most others hubowners like more DC++ with netlimiter on 1 kB/s upload :D
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

blackwings

QuoteOriginally posted by PPK
QuoteOriginally posted by blackwings
I dont like haveing clients with upload limiter in my hub :(
I know, you and most others hubowners like more DC++ with netlimiter on 1 kB/s upload :D
same thing with czdc++, 1kb/s upload.
but if people use netlimiter, you can just make a script that search for netlimiter under Connection in the userlist.


Pothead

#14
How about in description.   :D Sorry, the reason i ask is, because recently i've become a lot more tolerant to other clients in my hub.  (Let most in now, except DC Stealth and Xrev).  But i have started warning people for using client emulation.  While this is fine for Strong / Ldc / RevConnect, CZDC is slightly different, because there is no way to tell if it's emulating or not, unless the users are bandwidth limiting as well.  ?(

PPK

QuoteOriginally posted by blackwings
same thing with czdc++.
Same ??? You need to check client before you block it without real reason, as i see i know nothing about CZDC++ and his up/down limiting :]
QuoteOriginally posted by blackwings
but if people use netlimiter, you can just make a script that search for netlimiter under Connection in the userlist.
And DC++ with netlimiter always working (DC++ not show netlimiter :P) :D
QuoteOriginally posted by Pothead
CZDC is slightly different, because there is no way to tell if it's emulating or not, unless the users are bandwidth limiting as well.  ?(
Good point, fixed :)) Not it always show upload limit in tag if is enabled... most users anyway not use it because up/down ratio in CZDC++ is not good for its connection speed and use netlimiter :D
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Pothead

Thanks. :] hehe, i guess i'm stuck with:
Quote Hi, sorry if this is a bit of a weird request, but i don't mind you using CZDC, but could you just add it to your description in here. :)
<[NL]DrJackle> I'm away. State your business and I might answer later if you're lucky.

blackwings

#17
QuoteOriginally posted by PPK
QuoteOriginally posted by blackwings
same thing with czdc++.
Same ??? You need to check client before you block it without real reason, as i see i know nothing about CZDC++ and his up/down limiting :]
what I meant is, that its not uncommon for czdc++ users to have set their upload limiter on just a few kb/s, seen many dsl users that use czdc++ and limit their upload to just like 2kb/s. So CZDC++ upload limiter is as bad as netlimiter, because it depends on the user on how bad it is.

So if you want to improve CZDC++ emulating, please also make so that if the user use the limiter, that it shows up in the tag(I mean, so that the user cant hide that he/she use upload limiter.)


Pothead

QuoteOriginally posted by blackwings
So if you want to improve CZDC++ emulating, please also make so that if the user use the limiter, that it shows up in the tag(I mean, so that the user cant hide that he/she use upload limiter.)
QuoteOriginally posted by PPK
QuoteOriginally posted by Pothead
CZDC is slightly different, because there is no way to tell if it's emulating or not, unless the users are bandwidth limiting as well.  ?(
Good point, fixed :)) Not it always show upload limit in tag if is enabled... most users anyway not use it because up/down ratio in CZDC++ is not good for its connection speed and use netlimiter :D
:)

PPK

QuoteOriginally posted by blackwings
what I meant is, that its not uncommon for czdc++ users to have set their upload limiter on just a few kb/s, seen many dsl users that use czdc++ and limit their upload to just like 2kb/s. So CZDC++ upload limiter is as bad as netlimiter, because it depends on the user on how bad it is.
CZDC++ not allow 2 kB/s upload limit (min is 5 kB/s if user have 1 slot) ;) And if user limit upload then limit own download too :))
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

blackwings

#20
QuoteOriginally posted by PPK
QuoteOriginally posted by blackwings
what I meant is, that its not uncommon for czdc++ users to have set their upload limiter on just a few kb/s, seen many dsl users that use czdc++ and limit their upload to just like 2kb/s. So CZDC++ upload limiter is as bad as netlimiter, because it depends on the user on how bad it is.
CZDC++ not allow 2 kB/s upload limit (min is 5 kB/s if user have 1 slot) ;) And if user limit upload then limit own download too :))
how much does czdc limit the download if user use uplod limiter? + what is the min ul limit per slot (if user has like 5 slots)?

and has czdc always worked like that?


BeeR

QuoteOriginally posted by blackwings
If I understood PPK and Pothead correctly, this would make a more accurate DC++ only script =
--Anti rmDC++ script for PtokaX 0.3.3.0 Lua 5.0.2 by PPK
--CHANGED: modded to become a dc++ only script
----version 1.0

--//Start of Config
Bot = frmHub:GetHubBotName()

DcVer = "0.674"
--//End of Config

function NewUserConnected(curUser)
	if not curUser.bOperator then
		if curUser.bHasTag then
			if curUser.sClient=="DC++" then
				if tonumber(curUser.sClientVersion) < tonumber(DcVer) then
					curUser:SendData(Bot,"You aren't using DC++, go away")
					curUser:Disconnect()
					return 1
				end
			else
				curUser:Disconnect()
			end
		else
			curUser:Disconnect()
		end 
	end
end


function SupportsArrival(curUser, sData)
	if string.sub(sData, 10, 11) == "  " then
		curUser:SendData( Bot.."Buggy client, go away!")
		SendPmToNick(Bot, " rmDC++ from IP: "..curUser.sIP.." trying to login... he is his wasting time")
		curUser:Disconnect()
		return 1
	elseif not string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch GetZBlock")then
		curUser:SendData( Bot.."You aren't useing DC++, go away")
		SendPmToNick(Bot, " Non-DC++ client from IP: "..curUser.sIP.." trying to login... he is his wasting time")
		curUser:Disconnect()
		return 1
	end
end


Hi ,,

Any chance some1 adds redirecting insted of only disconnect a user ??

that would be nice :]
A cold BeeR is stunning !!

Madman

#22
--Anti rmDC++ script for PtokaX 0.3.3.0 Lua 5.0.2 by PPK
--CHANGED: modded to become a dc++ only script
----version 1.0
-- Moded by Madman
-- Added Redirect option

--//Start of Config
Bot = frmHub:GetHubBotName()

DcVer = "0.674"
Redir = nil -- 1 for on, nil for off
--//End of Config

function NewUserConnected(curUser)
	if not curUser.bOperator then
		if curUser.bHasTag then
			if curUser.sClient=="DC++" then
				if tonumber(curUser.sClientVersion) < tonumber(DcVer) then
					curUser:SendData(Bot,"You aren't using DC++, go away")
					if Redir then
						curUser:Redirect(frmHub:GetRedirectAddress())
					end
					curUser:Disconnect()
					return 1
				end
			else
				curUser:SendData(Bot,"You aren't using DC++, go away")
				if Redir then
					curUser:Redirect(frmHub:GetRedirectAddress())
				end
				curUser:Disconnect()
			end
		else
			curUser:SendData(Bot,"You aren't using DC++, go away")
			if Redir then
				curUser:Redirect(frmHub:GetRedirectAddress())
			end
			curUser:Disconnect()
		end
	end
end

function SupportsArrival(curUser, sData)
	if string.sub(sData, 10, 11) == "  " then
		curUser:SendData( Bot.."Buggy client, go away!")
		SendPmToNick(Bot, " rmDC++ from IP: "..curUser.sIP.." trying to login... he is his wasting time")
		if Redir then
			curUser:Redirect(frmHub:GetRedirectAddress())
		end
		curUser:Disconnect()
		return 1
	elseif not string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch GetZBlock")then
		curUser:SendData( Bot.."You aren't useing DC++, go away")
		SendPmToNick(Bot, " Non-DC++ client from IP: "..curUser.sIP.." trying to login... he is his wasting time")
		if Redir then
			curUser:Redirect(frmHub:GetRedirectAddress())
		end
		curUser:Disconnect()
		return 1
	end
end

This should work...
Completly untested!
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

BeeR

Tack Madman:]

i guess this script wont let the VIP's connect if they dont have DC++ ,, am i right ??
A cold BeeR is stunning !!

GeceBekcisi

It'll only allow Operators to connect without DC++
Do you need an advanced user handling script? Download UserBekcisi today (Latest Edit)
Features: User + ISP + GeoIP database, user info + share checking and many more...

SMF spam blocked by CleanTalk