Sub Menu
Suche

Last Online
In order to view the online list you have to be registered and logged in.



We are a free and open
community, all are welcome.

Click here to Register

Not always remove both

BeitragAuthor: taz » Mo 14. Apr 2008, 03:45

@CUploadQueue::AddClientToQueue :

Code: Alles auswählen
...
            if (client->credits != NULL && client->credits->GetCurrentIdentState(client->GetIP()) == IS_IDENTIFIED)
            {
                //client has a valid secure hash, add him remove other one
                if (thePrefs.GetVerbose())
                    AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName(), cur_client->GetUserName(), cur_client->GetUserName());

// By Taz - SUQWT
                // ==> SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
                waitinglist.GetAt(pos2)->ClearWaitStartTime();
                // <== SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
// <------- SUQWT

                RemoveFromWaitingQueue(pos2,true);
                if (!cur_client->socket)
                {
                    if(cur_client->Disconnected(_T("AddClientToQueue - same userhash 1")))
                        delete cur_client;
                }
            }
            else

// By Taz - ClientAnalyzer don't remove both
#ifdef CLIENTANALYZER
            {
                bool removed;
                CString cur_nick = cur_client->GetUserName();

                removed = false;
                if (cur_client->GetAntiLeechData()){
                    if (cur_client->GetAntiLeechData()->GetBadForThisSession(AT_NICKTHIEF) || cur_client->GetAntiLeechData()->GetBadForThisSession(AT_MODTHIEF)){
                    // existing is a nick or mod thief, remove existing one
                        if (thePrefs.GetVerbose())
                            AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName(), cur_nick, cur_nick);

// By Taz - SUQWT
                        // ==> SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
                        waitinglist.GetAt(pos2)->ClearWaitStartTime();
                        // <== SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
// <------- SUQWT

                        RemoveFromWaitingQueue(pos2,true);
                        if (!cur_client->socket)
                        {
                            if(cur_client->Disconnected(_T("AddClientToQueue - same userhash 1")))
                                delete cur_client;
                        }
                        removed = true;
                    }
                }
                if(client->GetAntiLeechData()){
                    if (client->GetAntiLeechData()->GetBadForThisSession(AT_NICKTHIEF) || client->GetAntiLeechData()->GetBadForThisSession(AT_MODTHIEF)){
                    // new client is a nick or mod thief
                        if (thePrefs.GetVerbose())
                            AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName(), cur_nick, client->GetUserName());
                        return;
                    }
                }
                if (removed)
                    return;
            }
#endif
// <------- ClientAnalyzer don't remove both

            {
                // remove both since we do not know who the bad one is
                if (thePrefs.GetVerbose())
                    AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName() ,cur_client->GetUserName(), _T("Both"));

// By Taz - SUQWT
                // ==> SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
                waitinglist.GetAt(pos2)->ClearWaitStartTime();
                // <== SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
// <------- SUQWT

                RemoveFromWaitingQueue(pos2,true);
                if (!cur_client->socket)
                {
                    if(cur_client->Disconnected(_T("AddClientToQueue - same userhash 2")))
                        delete cur_client;
                }
                return;
            }
        }
        else if (client->GetIP() == cur_client->GetIP())
        {
            // same IP, different port, different userhash
            cSameIP++;
        }
    }


BTW: can easily be used with other, then CA, leecher detectors as well
SharkX modder - less " free meals" only a CLICK away !
Requests for additional / changed features HERE Next version changelog
Benutzeravatar
taz
Stammgast
 
Beiträge: 438
Registriert: Do 29. Mär 2007, 07:30
Wohnort: Israel

BeitragAuthor: Spike2 » Mo 14. Apr 2008, 07:15

Nice one ! Bild
Der Haushalts-Tipp der Woche: Hähnchen bleiben länger frisch, wenn man sie einfach am Leben lässt!
Benutzeravatar
Spike2
Stammgast
 
Beiträge: 992
Registriert: Mi 11. Apr 2007, 00:49
Wohnort: Am Busen der Natur :)

BeitragAuthor: WiZaRd » Mo 14. Apr 2008, 07:43

Absolute nonsense!

This does not comply with the principle of the analyzer and I also think it would be illegal to add such a "one-way-ban" to eMule. Better remove it ASAP and re-think the whole thing.
Bild

... 9 von 10 Stimmen im meinem Kopf sagen ich bin nicht verrückt... - die 10te summt die Melodie von TETRIS
Benutzeravatar
WiZaRd
Forenlegende
 
Beiträge: 3805
Registriert: Fr 7. Jan 2005, 19:28
Wohnort: The Realm of Magic

BeitragAuthor: Spike2 » Mo 14. Apr 2008, 07:49

Argl, seems I misunderstood it. I'm too tired probably.

Didn't looked WHERE in the code this has to be and understood it as sth. different.

One-side-bans (and adding a client not to the queue is one) are for the official devs only - for GPL-Evildoer.
Der Haushalts-Tipp der Woche: Hähnchen bleiben länger frisch, wenn man sie einfach am Leben lässt!
Benutzeravatar
Spike2
Stammgast
 
Beiträge: 992
Registriert: Mi 11. Apr 2007, 00:49
Wohnort: Am Busen der Natur :)

BeitragAuthor: dlarge500 » Mo 14. Apr 2008, 07:51

oh no,this is the wrong Way for the CA. Bild

WiZaRd have right,this is nonsense.
__________________
Sys1: Asus P5Q-E | Intel Q9650 | 4 GB RAM DDR800| 1x Super Talent 64GB SSD | 1x Samsung HD103UJ 1TB | ATI 4870 | Windows 7 64Bit
Sys2: Gigabyte MA790X-UD4P | AMD X2 550 | 2x Seagate ST31500341AS 1,5TB | 4 GB RAM DDR800 | nVidia 9400GT | Win Vista 32Bit
Sys3: PoV ION330 | 4GB RAM Corsair | nVidia 9400GT | WD WD10EADS 1TB | Windows 7 64Bit

dlarge500
Stammgast
 
Beiträge: 432
Registriert: Sa 10. Mär 2007, 15:49
Wohnort: Mulihausen

BeitragAuthor: Spike2 » Mo 14. Apr 2008, 07:58

Well...wait a moment...

Code: Alles auswählen
                // remove both since we do not know who the bad one is
                if (thePrefs.GetVerbose())
                    AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName() ,cur_client->GetUserName(), _T("Both"));

(...)

                RemoveFromWaitingQueue(pos2,true);
                if (!cur_client->socket)
                {
                    if(cur_client->Disconnected(_T("AddClientToQueue - same userhash 2")))
                        delete cur_client;
                }
                return;

^^^^^^^^^^^^^this IS official code !
So with taz enhancement we do NOT remove both clients, since "we do not know who the bad one is" isn't really valid for mods with AntiNickThief / AntiModThief ! We do (at least we have a really good guess), so we remove only one client where official eMule removes two.
So this fix seems good to me. Or did I get it wrong again ?
Der Haushalts-Tipp der Woche: Hähnchen bleiben länger frisch, wenn man sie einfach am Leben lässt!
Benutzeravatar
Spike2
Stammgast
 
Beiträge: 992
Registriert: Mi 11. Apr 2007, 00:49
Wohnort: Am Busen der Natur :)

BeitragAuthor: WiZaRd » Mo 14. Apr 2008, 11:05

I had to check the details, too, again... however this code simply does not make any sense... if the same userhash is encountered then it is important to remove both because we dunno which one the good client is... plus the code is not fully correct:
Code: Alles auswählen
[...]
            else
            {

// By Taz - ClientAnalyzer
#ifdef CLIENTANALYZER
                if(client->GetAntiLeechData() && (client->GetAntiLeechData()->GetBadForThisSession(AT_NICKTHIEF) || client->GetAntiLeechData()->GetBadForThisSession(AT_MODTHIEF))
                {
                    // new client is a nick or mod thief
                    if (thePrefs.GetVerbose())
                        AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName(), cur_client->GetUserName(), client->GetUserName());
                    return;
                }
                else if (cur_client->GetAntiLeechData() && (cur_client->GetAntiLeechData()->GetBadForThisSession(AT_NICKTHIEF) || cur_client->GetAntiLeechData()->GetBadForThisSession(AT_MODTHIEF))
                {
                    // other is a nick or mod thief, add new remove other one
                    if (thePrefs.GetVerbose())
                        AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName(), cur_client->GetUserName(), cur_client->GetUserName());

// By Taz - SUQWT
                    // ==> SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
                    waitinglist.GetAt(pos2)->ClearWaitStartTime();
                    // <== SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
// <------- SUQWT

                    RemoveFromWaitingQueue(pos2,true);
                    if (!cur_client->socket && cur_client->Disconnected(_T("AddClientToQueue - same userhash 1"))
                        delete cur_client;
                }
                else
#endif
                {
// <------- ClientAnalyzer
                    // remove both since we do not know who the bad one is
                    if (thePrefs.GetVerbose())
                        AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName() ,cur_client->GetUserName(), _T("Both"));

// By Taz - SUQWT
                    // ==> SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
                    waitinglist.GetAt(pos2)->ClearWaitStartTime();
                    // <== SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
// <------- SUQWT

                    RemoveFromWaitingQueue(pos2,true);
                    if (!cur_client->socket && cur_client->Disconnected(_T("AddClientToQueue - same userhash 2"))
                        delete cur_client;
                    return;
                }
            }
[...]


Please note the last added { } which are important!!!

GreetZ,
WiZ
Bild

... 9 von 10 Stimmen im meinem Kopf sagen ich bin nicht verrückt... - die 10te summt die Melodie von TETRIS
Benutzeravatar
WiZaRd
Forenlegende
 
Beiträge: 3805
Registriert: Fr 7. Jan 2005, 19:28
Wohnort: The Realm of Magic

BeitragAuthor: Spike2 » Mo 14. Apr 2008, 16:05

Yes, you're right of course, we can't really know which one is the good client. But I think if one was already identified as NickThief or ModThief we have a really good guess....
Der Haushalts-Tipp der Woche: Hähnchen bleiben länger frisch, wenn man sie einfach am Leben lässt!
Benutzeravatar
Spike2
Stammgast
 
Beiträge: 992
Registriert: Mi 11. Apr 2007, 00:49
Wohnort: Am Busen der Natur :)

BeitragAuthor: taz » Mo 14. Apr 2008, 18:36

Obviously WiZ is right about { } - 1'st post fixed.

I'm sorry to have "dropped" a bome and be gone - however I can not browse eMF board from work anymore (blocked as P2P by blue coat sites filtering system).

I do think that at the very worst, code won't do any "real" damage (won't kick in or drop one bad guy instead two) - but on the other hand it offers a real chance for keeping valid clients on queue ...
SharkX modder - less " free meals" only a CLICK away !
Requests for additional / changed features HERE Next version changelog
Benutzeravatar
taz
Stammgast
 
Beiträge: 438
Registriert: Do 29. Mär 2007, 07:30
Wohnort: Israel

BeitragAuthor: WiZaRd » Mo 14. Apr 2008, 19:28

Yes, you're right of course, we can't really know which one is the good client. But I think if one was already identified as NickThief or ModThief we have a really good guess....

Right... but having no such information does not prove the opposite... the system of logic, 1st semester...
If it rains, the grass gets wet... if it doesn't rain...
... then there is nothing we can say about the grass' humidity.
Bild

... 9 von 10 Stimmen im meinem Kopf sagen ich bin nicht verrückt... - die 10te summt die Melodie von TETRIS
Benutzeravatar
WiZaRd
Forenlegende
 
Beiträge: 3805
Registriert: Fr 7. Jan 2005, 19:28
Wohnort: The Realm of Magic

Nächste

Zurück zu Entwicklung

Wer ist online?

Mitglieder: 0 Mitglieder

cron