determinate determinate

Author Topic: DHT blocker  (Read 3140 times)

0 Members and 1 Guest are viewing this topic.

Offline Jorgo

  • Double Ace
  • *
  • Posts: 134
  • Karma: +6/-6
DHT blocker
« on: August 05, 2010, 08:24:41 pm »
A new version of ApexDC++ just came out which has DHT enabled by default. A user in the private hub I'm in nearly had a heart attack when someone who's not a member started downloading files from him - and our user isn't in any other hubs.

What I'm looking for urgently is a method to detect DHT and block users who have it enabled in their client. I'm not sure if this should be done in ptokax itself or by script - either way it's pretty urgent. There are always users who never react to hub announcements where we would ask everybody to turn it off manually.

Because of the urgency of the matter, I'll also post this in the ptokax feature request section - please forgive double posting.

Offline lUk3f1l3w4lK3R

  • Junior Member
  • **
  • Posts: 23
  • Karma: +4/-0
Re: DHT blocker
« Reply #1 on: August 06, 2010, 02:32:57 pm »
I tried such a script a while ago but with no success.
A script to disconnect users who have DHT enabled would be nice,
cause it doesnt matter on which kind of hub (NMDC or ADC) you are,
with DHT enabled, users that are not on the same hub can leech from you.
I run also a private hub and would like to see such a script
but i think its not possible due to the fact that a client that have the DHT
feature, only sends the info about this support when connecting to a ADC hub.
Therefore i dont see a way to block these clients with a PtokaX script.
When connecting to a ADC hub then ADDHT0 is send in SU (Support).
When this is not send in SU then DHT is disabled.
This info is not send by the client when you connect to a NMDC hub,
not in MyINFO and not in Support.
Maybe i missed something and somebody can enlighten me
but i think its not possible to write such a script for PtokaX.
« Last Edit: August 06, 2010, 02:36:27 pm by lUk3f1l3w4lK3R »

Offline Naithif

  • Triple Ace
  • **
  • Posts: 203
  • Karma: +32/-13
Re: DHT blocker
« Reply #2 on: August 06, 2010, 02:39:42 pm »
Quote from: StrongDC++ nmdchub.cpp
Code: [Select]
StringList feat;
feat.push_back("UserCommand");
feat.push_back("NoGetINFO");
feat.push_back("NoHello");
feat.push_back("UserIP2");
feat.push_back("TTHSearch");
feat.push_back("ZPipe0");

if(CryptoManager::getInstance()->TLSOk() && !getStealth())
feat.push_back("TLS");

if(BOOLSETTING(USE_DHT))
feat.push_back("DHT0");

supports(feat);


Quote from: Test
$Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch ZPipe0 TLS DHT0


Code: [Select]
function SupportsArrival(tUser, sData)
if string.find(sData, "DHT0") then
Core.Kick(tUser, "Hub-Security", "Please turn off DHT in Settings/Advanced/Publish shared files on DHT and use it for searching alternate sources")
end
end

Should work... Modify it to your needs...

Possibly sending a message and disconnecting is better because supports arrive first from a client and maybe even before kicked users check.
« Last Edit: August 06, 2010, 02:45:09 pm by Naithif »

Offline Jorgo

  • Double Ace
  • *
  • Posts: 134
  • Karma: +6/-6
Re: DHT blocker
« Reply #3 on: August 06, 2010, 04:54:17 pm »
That works just fine, thanks a lot!

Offline pR0Ps

  • Member
  • ***
  • Posts: 27
  • Karma: +0/-2
Re: DHT blocker
« Reply #4 on: August 06, 2010, 05:02:11 pm »
Just as an FYI to everyone looking for this, this script works for StrongDC++ 2.30+ and it's derivatives (such as ApexDC++ 1.3.5). At the moment these are the only clients that even support DHT, so this script will detect all DHT users, no exceptions (for now). Thanks for the post Naithif.

EDIT: NMDC hubs will receive "DHT0" while ACD hubs will get "ADDHT0".
« Last Edit: August 06, 2010, 05:09:55 pm by pR0Ps »

Offline Yahoo

  • Lord
  • ***
  • Posts: 265
  • Karma: +32/-14
  • People Say "I Dont Know English"
    • Yahoo
Re: DHT blocker
« Reply #5 on: August 06, 2010, 05:04:57 pm »
gr8 work @ Naithif

seen you are a long time :D
"BoRN FIGhTEr"

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 245
  • Karma: +206/-17
  • PtokaX "developer"
Re: DHT blocker
« Reply #6 on: August 06, 2010, 11:01:38 pm »
At the moment these are the only clients that even support DHT, so this script will detect all DHT users, no exceptions (for now).
Wrong, there are other (and older) clients using Kademlia DHT network and they are not detected by this script :P
« Last Edit: August 06, 2010, 11:05:42 pm by PPK »

Offline pR0Ps

  • Member
  • ***
  • Posts: 27
  • Karma: +0/-2
Re: DHT blocker
« Reply #7 on: August 07, 2010, 05:09:35 am »
Hmmm, didn't know that. Good to know. Probably not that relevant though, those clients have been around for a while and this seems to be a new thing for most hubowners. Is there any way to check for people using DHT on those older clients?

Offline Naithif

  • Triple Ace
  • **
  • Posts: 203
  • Karma: +32/-13
Re: DHT blocker
« Reply #8 on: August 07, 2010, 01:16:26 pm »
Wrong, there are other (and older) clients using Kademlia DHT network and they are not detected by this script :P

That doesn't really count because:

- This feat was requested on other places because Apex 1.3.5 enabled DHT by default. I believe the request here was connected and it is from the hub owner telling why they banned 1.3.5

- Latest kad client is RevConnect that has core 0.674 (other kad clients are even older) which is usually disallowed in private hubs.
« Last Edit: August 07, 2010, 01:35:41 pm by Naithif »

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 245
  • Karma: +206/-17
  • PtokaX "developer"
Re: DHT blocker
« Reply #9 on: August 07, 2010, 03:19:53 pm »
- This feat was requested on other places because Apex 1.3.5 enabled DHT by default.
Here it is requested as DHT blocker...
- Latest kad client is RevConnect that has core 0.674 (other kad clients are even older) which is usually disallowed in private hubs.
More 0.674 based clients have kademlia. And they all have kademlia from reverse connect (where it is from year 2003)  ::)

Offline Jorgo

  • Double Ace
  • *
  • Posts: 134
  • Karma: +6/-6
Re: DHT blocker
« Reply #10 on: August 07, 2010, 06:28:06 pm »
Well, I'm no expert in the matter, but I'd like the script to be as complete as possible. The goal is to not permit any public connections on a private hub.
« Last Edit: August 08, 2010, 12:07:36 am by Jorgo »

Offline Naithif

  • Triple Ace
  • **
  • Posts: 203
  • Karma: +32/-13
Re: DHT blocker
« Reply #11 on: August 09, 2010, 12:44:32 am »
Here it is requested as DHT blocker...

It does just that.
As far as one can do via hub/scripting. More can be done client level, but I doubt anyone will do that.

Besides the request was started as:

A new version of ApexDC++ just came out which has DHT enabled by default.[...]

So... Exactly...



More 0.674 based clients have kademlia. And they all have kademlia from reverse connect (where it is from year 2003)  ::)

Yes. What I've tried to say is that 99.99% clients that have kad are stuck on (at most) 0.674.

So banning older clients including 0.674 solves the problem.
Private hubs doesn't rely on usercount anyway, so doing that shouldn't be a problem. Some even enforce a particular client...



Offline P_pan

  • Double Ace
  • *
  • Posts: 120
  • Karma: +1/-3
Re: DHT blocker
« Reply #12 on: August 19, 2010, 08:07:57 pm »
is it possibble to forward a msg to opchat as soon someone is  using this DHT stuff?

like : user:.... has dht enabled etc etc.... ?

thanks for this great script!

Offline P_pan

  • Double Ace
  • *
  • Posts: 120
  • Karma: +1/-3
Re: DHT blocker
« Reply #13 on: August 20, 2010, 08:59:37 am »
Thank You Master Mutor!

getting an little error though
DHT_block.lua: 4: unexpected symbol near "="

and scripts does crash
« Last Edit: August 20, 2010, 09:14:53 am by P_pan »

Offline lUk3f1l3w4lK3R

  • Junior Member
  • **
  • Posts: 23
  • Karma: +4/-0
Re: DHT blocker
« Reply #14 on: August 21, 2010, 02:10:25 pm »
Thank You Master Mutor!

getting an little error though
DHT_block.lua: 4: unexpected symbol near "="

and scripts does crash

remove the , at the end of line 2 and the script starts and you dont get the error message


I get this error message when a registered user try to download filelist from another user:
PtokaX\scripts\kickdht.lua:34:attempt to perform arithmetic on field '?'(a nil value)
« Last Edit: August 21, 2010, 02:40:03 pm by lUk3f1l3w4lK3R »

Offline P_pan

  • Double Ace
  • *
  • Posts: 120
  • Karma: +1/-3
Re: DHT blocker
« Reply #15 on: August 21, 2010, 03:11:06 pm »
Quote
I get this error message when a registered user try to download filelist from another user:
PtokaX\scripts\kickdht.lua:34:attempt to perform arithmetic on field '?'(a nil value)

This error i don't have at all.....  total no lua error does show...

Ur Trick did solve  my prob...  Thank You lUk3f1l3w4lK3R



Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: DHT blocker
« Reply #16 on: August 21, 2010, 05:22:39 pm »
I get this error message when a registered user try to download filelist from another user:
PtokaX\scripts\kickdht.lua:34:attempt to perform arithmetic on field '?'(a nil value)
Getting a file list or any other transfer is irrelevant.
The user probably disconnected and the timing coincidental.
Script updated to avoid this possibility.
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline P_pan

  • Double Ace
  • *
  • Posts: 120
  • Karma: +1/-3
Re: DHT blocker
« Reply #17 on: August 23, 2010, 09:09:59 am »
getting now indeed this error aswell but now on line 39

PtokaX\scripts\kickdht.lua:39:attempt to perform arithmetic on field '?'(a nil value)

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: DHT blocker
« Reply #18 on: August 24, 2010, 05:18:00 am »
Oops, I goofed. Used the wrong key in UserDisconnected.
Try again.
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline P_pan

  • Double Ace
  • *
  • Posts: 120
  • Karma: +1/-3
Re: DHT blocker
« Reply #19 on: August 28, 2010, 12:32:22 pm »
Thank You....

works very fine :)

Offline somewherenotthere

  • Member
  • ***
  • Posts: 31
  • Karma: +0/-0
Re: DHT blocker
« Reply #20 on: August 28, 2010, 08:57:35 pm »
Doesnt seem to be working... no errors, just not doing anything.

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: DHT blocker
« Reply #21 on: August 28, 2010, 09:01:22 pm »
Do you have any DHT enabled clients users in the hub?

Code: [Select]
[15:30:40] <[PxDev]> DHT is disallowed here. Please disable DHT functions in your client.
[15:30:40] <[PxDev]> You are being kicked because: DHT Enabled
[15:30:41] *** Connection closed
« Last Edit: August 28, 2010, 09:32:41 pm by Mutor »
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: DHT blocker
« Reply #22 on: August 29, 2010, 12:07:31 am »
Added option for report only, disconnect, tempban or redirect
Code: [Select]
--
-- Admin's nick for status / error messages ["" = OpChat]
OpNick = "Mutor"
--Extended status / error messages? true/false [false script errors only]
Verbose = true
--Penalty for DHT enabled [0 = None,report only / 1 = Disconnect / 2= Tempban / 3 = Redirect]
Penalty = 2

OnStartup = function()
    Hub,Bot,Tab,Tmr = SetMan.GetString(0),SetMan.GetString(21),{},TmrMan.AddTimer(1000,"Process")
    Msg1 = "DHT is not allowed here. Please disable DHT functions in your client.|"
    Msg2 = "Uncheck: Settings\\Advanced\\Process shared files on DHT and use it for searching alternate sources."
end

OnError = function(msg)
    if msg then
        local user,bot = Core.GetUser(OpNick),"<"..Bot.."> "
        if user then Core.SendToUser(user,bot..msg.."|") else Core.SendToOpChat(bot..msg.."|") end
    end
end

SupportsArrival = function(user,data)
    if data:find("DHT0") and not Tab[user.sIP] then Tab[user.sIP] = {os.time()} end
end

VersionArrival = function(user)
    if Tab[user.sIP] then
        table.insert(Tab[user.sIP],1,GetProf(user))
        table.insert(Tab[user.sIP],1,user.sNick)
        if not Tmr then Tmr = TmrMan.AddTimer(1000,"Process") end
        if Tab[user.sIP] and #Tab[user.sIP] == 3 and Verbose then
            OnError("DHT Client Connected: "..table.concat(Tab[user.sIP]," "):gsub("%d+$",os.date(nil,tonumber("%1"))))
        end
    end
end

UserDisconnected = function(user)
    if Tab[user.sIP] then
        local s = "DHT Client Disconnected: "..table.concat(Tab[user.sIP]," "):gsub("%d+$",os.date(nil,os.time()))
        Tab[user.sIP] = nil
        if not Tab[user.sIP] and Verbose then OnError(s) end
    end
end
RegDisconnected,OpDisconnected = UserDisconnected,UserDisconnected

Process = function()
    local t,n = os.time(),0
    for i,v in pairs(Tab) do
        if type(v) == "table" and #v == 3 and ((t - v[3]) > 5) then
            local rep = "The "..v[2]..", "..v[1].." with I.P.: "..i.." is using DHT."
            local user = Core.GetUser(v[1])
            if user then
                Core.SendToUser(user,"<"..Bot.."> "..Msg1)
                Core.SendToUser(user,"<"..Bot.."> "..Msg2)
                local s,n = "DHT Enabled",user.sNick
                if Penalty == 0 then
                    OnError(rep)
                else
                    local Reply = {"disconnected from "..SetMan.GetString(0),
                    "tempbanned for "..tostring(SetMan.GetNumber(16)).." minutes",
                    "redirected to "..SetMan.GetString(6)}
                    if Reply[Penalty] then
                        Core.SendToUser(user,"<"..Bot.."> You will be "..Reply[Penalty])
                        rep = v[2].." "..v[1].." "..Reply[Penalty]
                        if Penalty == 1 then
                            if Core.Disconnect(user) and Verbose then OnError(rep) end
                        elseif Penalty == 2 then
                            if BanMan.TempBan(user,0,s,Bot,false) and Verbose then OnError(rep) end
                        elseif Penalty == 3 then
                            if Core.Redirect(user,SetMan.GetString(6),s) and Verbose then OnError(rep) end
                        end
                    end
                end
            end
            Tab[i] = nil
        else
            n = n + 1
        end
    end
    if n == 0 then
        TmrMan.RemoveTimer(Tmr)
        Tmr = nil
    end
end

GetProf = function(user)
    local Prof = "Unregistered User"
    if user.iProfile ~= -1 then Prof = ProfMan.GetProfile(user.iProfile).sProfileName end
    return Prof
end
« Last Edit: September 24, 2010, 04:19:01 am by Mutor »
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline somewherenotthere

  • Member
  • ***
  • Posts: 31
  • Karma: +0/-0
Re: DHT blocker
« Reply #23 on: August 29, 2010, 06:45:03 am »
Yes I do/did.

It is working now thought, weird...

kudos to the creators of this script, really really helpful!

Offline merlin_xl54

  • Forum Ace
  • *****
  • Posts: 91
  • Karma: +2/-0
  • Not a player, just Playing!
Re: DHT blocker
« Reply #24 on: August 31, 2010, 01:19:07 am »
I started using this in our private hub and seem to be getting quite a few notifications. Even from users with the newest DC++ 0.770. We also have some older clients too. Is there a cut off where clients have it on with no options to turn it off. Can it be listed under any other options? We have a lot of clients pre 0.699 etc?

TIA

M
Living is easy with eyes closed.

Offline P_pan

  • Double Ace
  • *
  • Posts: 120
  • Karma: +1/-3
Re: DHT blocker
« Reply #25 on: August 31, 2010, 09:27:29 pm »
it looks like this script is a little mean ghost.... :)

error: scripts\DHT_block.lua:50: attempt to concatenate a nil value

:)  on latest build....

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: DHT blocker
« Reply #26 on: August 31, 2010, 09:31:40 pm »
Or perhaps you need to set then Main redirect address in PtokaX :P
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline For_Ever_MeXxX

  • Junior Member
  • **
  • Posts: 22
  • Karma: +0/-0
  • Gamato™
Re: DHT blocker
« Reply #27 on: September 17, 2010, 08:30:30 am »
Hello,

how I can remove the Botname from the Report in Operator Chat?

<#Operator> <#Kolloid> The Unregistered User, NICK with IP: **.**.**.** is using DHT.


and if I set only Report it Spams the Operator Chat with the same message 5 times or sometimes more...
Look here...

Code: [Select]
[12:26:30] <#Operator> <#Kolloid> The Unregistered User, [ ROMANIA-GIRL ] with IP: [ **.**.**.** ] is using DHT.
[12:26:30] <#Operator> <#Kolloid> The Unregistered User, [ [ro][rds]fane ] with IP: [ **.**.**.** ] is using DHT.
[12:26:30] <#Operator> <#Kolloid> The Unregistered User, [ sdhgfnsdfsdxaz ] with IP: [ **.**.**.** ] is using DHT.
[12:26:30] <#Operator> <#Kolloid> The Unregistered User, [ [RO][AG][RDS][George_2010] ] with IP: [ **.**.**.** ] is using DHT.
[12:26:31] <#Operator> <#Kolloid> The Unregistered User, [ ROMANIA-GIRL ] with IP: [ **.**.**.** ] is using DHT.
[12:26:31] <#Operator> <#Kolloid> The Unregistered User, [ [ro][rds]fane ] with IP: [ **.**.**.** ] is using DHT.
[12:26:31] <#Operator> <#Kolloid> The Unregistered User, [ sdhgfnsdfsdxaz ] with IP: [ **.**.**.** ] is using DHT.
[12:26:31] <#Operator> <#Kolloid> The Unregistered User, [ [RO][AG][RDS][George_2010] ] with IP: [ **.**.**.** ] is using DHT.
[12:26:32] <#Operator> <#Kolloid> The Unregistered User, [ ROMANIA-GIRL ] with IP: [ **.**.**.** ] is using DHT.
[12:26:32] <#Operator> <#Kolloid> The Unregistered User, [ [ro][rds]fane ] with IP: [ **.**.**.** ] is using DHT.
[12:26:32] <#Operator> <#Kolloid> The Unregistered User, [ sdhgfnsdfsdxaz ] with IP: [ **.**.**.** ] is using DHT.
[12:26:32] <#Operator> <#Kolloid> The Unregistered User, [ [RO][AG][RDS][George_2010] ] with IP: [ **.**.**.** ] is using DHT.
[12:26:33] <#Operator> <#Kolloid> The Unregistered User, [ ROMANIA-GIRL ] with IP: [ **.**.**.** ] is using DHT.
[12:26:33] <#Operator> <#Kolloid> The Unregistered User, [ [ro][rds]fane ] with IP: [ **.**.**.** ] is using DHT.
[12:26:33] <#Operator> <#Kolloid> The Unregistered User, [ sdhgfnsdfsdxaz ] with IP: [ **.**.**.** ] is using DHT.
[12:26:33] <#Operator> <#Kolloid> The Unregistered User, [ [RO][AG][RDS][George_2010] ] with IP: [ **.**.**.** ] is using DHT.
[12:26:34] <#Operator> <#Kolloid> The Unregistered User, [ ROMANIA-GIRL ] with IP: [ **.**.**.** ] is using DHT.
[12:26:34] <#Operator> <#Kolloid> The Unregistered User, [ [ro][rds]fane ] with IP: [ **.**.**.** ] is using DHT.
[12:26:34] <#Operator> <#Kolloid> The Unregistered User, [ sdhgfnsdfsdxaz ] with IP: [ **.**.**.** ] is using DHT.
[12:26:34] <#Operator> <#Kolloid> The Unregistered User, [ [RO][AG][RDS][George_2010] ] with IP: [ **.**.**.** ] is using DHT.
[12:26:35] <#Operator> <#Kolloid> The Unregistered User, [ ROMANIA-GIRL ] with IP: [ **.**.**.** ] is using DHT.
[12:26:35] <#Operator> <#Kolloid> The Unregistered User, [ [ro][rds]fane ] with IP: [ **.**.**.** ] is using DHT.
[12:26:35] <#Operator> <#Kolloid> The Unregistered User, [ sdhgfnsdfsdxaz ] with IP: [ **.**.**.** ] is using DHT.
[12:26:35] <#Operator> <#Kolloid> The Unregistered User, [ sossana ] with IP: [ **.**.**.** ] is using DHT.
[12:26:35] <#Operator> <#Kolloid> The Unregistered User, [ [RO][AG][RDS][George_2010] ] with IP: [ **.**.**.** ] is using DHT.
[12:27:48] <#Operator> <#Kolloid> The Unregistered User, [ ROMANIA-GIRL ] with IP: [ **.**.**.** ] is using DHT.
[12:27:48] <#Operator> <#Kolloid> The Unregistered User, [ [ro][rds]fane ] with IP: [ **.**.**.** ] is using DHT.
[12:27:48] <#Operator> <#Kolloid> The Unregistered User, [ sossana ] with IP: [ **.**.**.** ] is using DHT.
[12:27:48] <#Operator> <#Kolloid> The Unregistered User, [ sdhgfnsdfsdxaz ] with IP: [ **.**.**.** ] is using DHT.
[12:27:48] <#Operator> <#Kolloid> The Unregistered User, [ [RO]90-CMO ] with IP: [ **.**.**.** ] is using DHT.
[12:27:48] <#Operator> <#Kolloid> The Unregistered User, [ [RO][AG][RDS][George_2010] ] with IP: [ **.**.**.** ] is using DHT.
[12:28:46] <#Operator> <#Kolloid> The Unregistered User, [ ROMANIA-GIRL ] with IP: [ **.**.**.** ] is using DHT.
[12:28:46] <#Operator> <#Kolloid> The Unregistered User, [ [ro][rds]fane ] with IP: [ **.**.**.** ] is using DHT.
[12:28:46] <#Operator> <#Kolloid> The Unregistered User, [ sossana ] with IP: [ **.**.**.** ] is using DHT.
[12:28:46] <#Operator> <#Kolloid> The Unregistered User, [ sdhgfnsdfsdxaz ] with IP: [ **.**.**.** ] is using DHT.
[12:28:46] <#Operator> <#Kolloid> The Unregistered User, [ [RO]90-CMO ] with IP: [ **.**.**.** ] is using DHT.
[12:28:46] <#Operator> <#Kolloid> The Unregistered User, [ [RO][AG][RDS][George_2010] ] with IP: [ **.**.**.** ] is using DHT.
« Last Edit: September 17, 2010, 11:33:29 am by For_Ever_MeXxX »
For_Ever_MeXxX ;)

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: DHT blocker
« Reply #28 on: September 17, 2010, 11:03:46 pm »
That's a ridiculous and long winded bot name for the hub bot.
You can over ride that name in the OnError function.
I've also updated the script to avoid the repeated messages.
It continued to spam because you were reporting only and never
removed those users from the hub.
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline somewherenotthere

  • Member
  • ***
  • Posts: 31
  • Karma: +0/-0
Re: DHT blocker
« Reply #29 on: September 19, 2010, 09:56:55 pm »
hey mutor, this is definitely a helpful script, apex users are now aware of the fact that dht is enabled.

The problem that i am experiencing is that, on user arrival, the opchat gets spammed with msgs of all users using dht and multiples of this:

Quote
[21:39:34] <*> <*> The Reg, *with I.P.: *.*.*.*is using DHT.
[21:39:34] <*> <*> The Owner, *with I.P.: *..*.*is using DHT.
[21:39:34] <*> <*> The Reg, *with I.P.: *.*.*.*is using DHT.
[21:39:34] <*> <*> The Owner, *with I.P.: *.*.*.*is using DHT.
[21:39:34] <*> <*> The Reg, *with I.P.: *.*.*.*is using DHT.
[21:39:34] <*> <*> The Owner, *with I.P.: *.*.*.*is using DHT.
[21:39:36] <*> <*> The Reg, *with I.P.: **.*.*is using DHT.
[21:39:36] <*> <*> The Owner, *with I.P.: *.*.*.*is using DHT.
[21:39:36] <*> <*> The Reg, *with I.P.: *.*.*.*is using DHT.
[21:39:36] <*> <*> The Unregistered User, *with I.P.: *.*.*.*is using DHT.
[21:39:36] <*> <*> The Owner, *with I.P.: ***.*.*is using DHT.

I have report only on fyi. Any help? it seems like such a random thing
« Last Edit: September 20, 2010, 10:01:49 am by somewherenotthere »

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: DHT blocker
« Reply #30 on: September 19, 2010, 10:01:14 pm »
Do youthink you could maybe read the last 2 posts?
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline somewherenotthere

  • Member
  • ***
  • Posts: 31
  • Karma: +0/-0
Re: DHT blocker
« Reply #31 on: September 20, 2010, 09:54:48 am »
Hey Mutor, I did read them yes, and i used the latest one. Unless there is something i missed in those 2 posts? Or perhaps you could make it clearer as to what your suggestion is in those posts?

Offline For_Ever_MeXxX

  • Junior Member
  • **
  • Posts: 22
  • Karma: +0/-0
  • Gamato™
Re: DHT blocker
« Reply #32 on: September 20, 2010, 12:58:19 pm »
He is right Mutor, my Opchat get spammed again, too...
For_Ever_MeXxX ;)

Offline lUk3f1l3w4lK3R

  • Junior Member
  • **
  • Posts: 23
  • Karma: +4/-0
Re: DHT blocker
« Reply #33 on: September 20, 2010, 05:35:30 pm »
First version of this script did exactly what the script did, that i tried to make myself: it didnt disconnect users with DHT enabled clients (yes, there where DHT enabled clients).
Now the 2nd version of your script works like it should work.

I dont know what caused the issue with your first version
but thanks for updating your script.

Good work as allways Mutor.

Thx alot.

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: DHT blocker
« Reply #34 on: September 20, 2010, 10:02:29 pm »
My apologies somewherenotthere, I'd assumed as there
were no reports in the three days since the change that
the repetition was solved. What is going on here is we
detect DHT in supports and log the user IP to table.
As this is the very first step in the client to server
handshake. There is no other information yet. In
the UserConnected we pick up the user's nickname
and profile and assign those to the IP in the table.

After 5 seconds [this allows for fill login] we then
start moaning about the user's DHT, either to OpNick
or OpChat. Now I only have one client to test with
and I've only received one message regarding that
test user. As you've both masked the user IP's in
your posts can you tell me if these users had the
same IP addresses? This could cause the repetition.

The short solution is to kick the users upon detection.
They are messaged and temp banned. That ought to
be enough. If you're waiting for users to simply notice
and correct the settings of their client, they won't. :P
At any rate I will try to develop a method to handle
the common IP issue.
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

 

determinate determinate
guestbook