Official eMule-Board: Enhanced Client Recognization - Official eMule-Board

Jump to content


Page 1 of 1

Enhanced Client Recognization Recognize more Clients

#1 User is offline   Famerlor 

  • also known as Spike2
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 685
  • Joined: 16-October 04

Posted 12 February 2006 - 09:47 PM

Purpose:
Recognize every Shareaza and MLdonkey. Recognize eMule+, Hydranode and TrustyFiles to show their names in the Lists.


updownclient.h:

enum EClientSoftware{
	SO_EMULE  	= 0,	// default
	SO_CDONKEY  	= 1,	// ET_COMPATIBLECLIENT
	SO_XMULE  	= 2,	// ET_COMPATIBLECLIENT
	SO_AMULE  	= 3,	// ET_COMPATIBLECLIENT
	SO_SHAREAZA  	= 4,	// ET_COMPATIBLECLIENT
	SO_EMULEPLUS  = 5,	// Spike2 - Enhanced Client Recognization
	SO_HYDRANODE  = 6,	// Spike2 - Enhanced Client Recognization
	SO_MLDONKEY  	= 10,	// ET_COMPATIBLECLIENT
	SO_LPHANT  	= 20,	// ET_COMPATIBLECLIENT
	SO_SHAREAZA2  = 28,	// Spike2 - Enhanced Client Recognization
	SO_TRUSTYFILES  = 30,	// Spike2 - Enhanced Client Recognization
	SO_SHAREAZA3  = 40,
	// other client types which are not identified with ET_COMPATIBLECLIENT
	SO_EDONKEYHYBRID	= 50,
	SO_EDONKEY  	= 51,	// Spike2 from aMule
	SO_MLDONKEY2  = 52,	// Spike2 from aMule
	SO_OLDEMULE  	= 53,	// Spike2 from aMule
	SO_SHAREAZA4  = 68,	// Spike2 from aMule
	SO_MLDONKEY3  = 152,	// Spike2 from aMule
	SO_URL,

// WebCache ////////////////////////////////////////////////////////////////////////////////////
	SO_WEBCACHE, // statistics

	SO_UNKNOWN
};




BaseClient.cpp:

	int iHashType = GetHashType();
	if (m_bEmuleProtocol || iHashType == SO_EMULE){
  LPCTSTR pszSoftware;
  switch(m_byCompatibleClient){
  	case SO_CDONKEY:
    m_clientSoft = SO_CDONKEY;
    pszSoftware = _T("cDonkey");
    break;
  	case SO_XMULE:
    m_clientSoft = SO_XMULE;
    pszSoftware = _T("xMule");
    break;
  	case SO_AMULE:
    m_clientSoft = SO_AMULE;
    pszSoftware = _T("aMule");
    break;
  	case SO_SHAREAZA:
  	case SO_SHAREAZA2:
  	case SO_SHAREAZA3:
  	case SO_SHAREAZA4:
    m_clientSoft = SO_SHAREAZA;
    pszSoftware = _T("Shareaza");
    break;
  	case SO_LPHANT:
    m_clientSoft = SO_LPHANT;
    pszSoftware = _T("lphant");
    break;
  	// Spike2 - Enhanced Client Recognization - START
  	case SO_EMULEPLUS:
    m_clientSoft = SO_EMULEPLUS;
    pszSoftware = _T("eMule Plus");
    break;
  	case SO_HYDRANODE:
    m_clientSoft = SO_HYDRANODE;
    pszSoftware = _T("Hydranode");
    break;
  	case SO_TRUSTYFILES:
    m_clientSoft = SO_TRUSTYFILES;
    pszSoftware = _T("TrustyFiles");
    break;
  	// Spike2 - Enhanced Client Recognization - END
  	default:
    if (m_bIsML || m_byCompatibleClient == SO_MLDONKEY || m_byCompatibleClient == SO_MLDONKEY2 || m_byCompatibleClient == SO_MLDONKEY3){ // Spike2
    	m_clientSoft = SO_MLDONKEY;
    	pszSoftware = _T("MLdonkey");
    }
    else if (m_bIsHybrid || m_byCompatibleClient == SO_EDONKEYHYBRID){ //Spike2
    	m_clientSoft = SO_EDONKEYHYBRID;
    	pszSoftware = _T("eDonkeyHybrid");
    }
    else if (m_byCompatibleClient != 0){
    	// Spike2 - recognize other Shareaza - START - just to be sure :)
    	if (StrStrI(m_pszUsername,_T("shareaza")))
    	{
      m_clientSoft = SO_SHAREAZA;
      pszSoftware = _T("Shareaza");
    	}
    	// Spike2 - recognize other Shareaza - END
    	// Spike2 - Enhanced Client Recognization - START
    	else if (StrStr(m_strModVersion,_T("Plus 1")))
    	{
      m_clientSoft = SO_EMULEPLUS;
      pszSoftware = _T("eMule Plus");
    	}
    	// Spike2 - Enhanced Client Recognization - END
    	else
    	{
    	m_clientSoft = SO_XMULE; // means: 'eMule Compatible'
    	pszSoftware = _T("eMule Compat");
    	} // Spike2
    }
    else{
    	m_clientSoft = SO_EMULE;
    	pszSoftware = _T("eMule");
    }
  }

  int iLen;
  TCHAR szSoftware[128];
  if (m_byEmuleVersion == 0){
  	m_nClientVersion = MAKE_CLIENT_VERSION(0, 0, 0);
  	iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s"), pszSoftware);
  }
  else if (m_byEmuleVersion != 0x99){
  	UINT nClientMinVersion = (m_byEmuleVersion >> 4)*10 + (m_byEmuleVersion & 0x0f);
  	m_nClientVersion = MAKE_CLIENT_VERSION(0, nClientMinVersion, 0);
  	iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v0.%u"), pszSoftware, nClientMinVersion);
  }
  else{
  	UINT nClientMajVersion = (m_nClientVersion >> 17) & 0x7f;
  	UINT nClientMinVersion = (m_nClientVersion >> 10) & 0x7f;
  	UINT nClientUpVersion  = (m_nClientVersion >>  7) & 0x07;
  	m_nClientVersion = MAKE_CLIENT_VERSION(nClientMajVersion, nClientMinVersion, nClientUpVersion);
  	if ((m_clientSoft == SO_EMULE) || (m_clientSoft == SO_EMULEPLUS)) // Spike2 - show correct ePlus-Version




ClientList.cpp:

  switch (cur_client->GetClientSoft())
  {
  	case SO_EMULE:
  	case SO_OLDEMULE:
    stats[2]++;
    clientVersionEMule[cur_client->GetVersion()]++;
    break;

  	case SO_EDONKEYHYBRID : 
    stats[4]++;
    clientVersionEDonkeyHybrid[cur_client->GetVersion()]++;
    break;
  	
  	case SO_AMULE:
    stats[10]++;
    clientVersionAMule[cur_client->GetVersion()]++;
    break;

  	case SO_EDONKEY:
    stats[1]++;
    clientVersionEDonkey[cur_client->GetVersion()]++;
    break;

  	case SO_MLDONKEY:
    stats[3]++;
    break;
  	
  	case SO_SHAREAZA:
    stats[11]++;
    break;

  	// all remaining 'eMule Compatible' clients
  	case SO_HYDRANODE: // Spike2 - enhanced Client Recognization
  	case SO_EMULEPLUS: // Spike2 - enhanced Client Recognization
  	case SO_TRUSTYFILES: // Spike2 - enhanced Client Recognization
  	case SO_CDONKEY:
  	case SO_XMULE:
  	case SO_LPHANT:
    stats[5]++;
    break;

  	default:
    stats[0]++;
    break;
  }



Greetz--

Spike2

This post has been edited by Famerlor: 16 February 2006 - 09:53 PM

Posted Image

You want a light mod with source-dropping, Powershare and WiZaRd's ClientAnalyzer ?
Try Spike2-Mod !

You rather want to stick to official eMule but don't want to miss all the new fixes and optimizations from the mods ?
Try OfFixed-Mod !


This post has been edited 1 time, the last time by God: Tomorrow, 12:74 PM
0

#2 User is offline   Madcat666 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 29-December 03

Posted 16 February 2006 - 11:50 AM

  case SO_HYDRANODE:
   m_clientSoft = SO_HYDRANODE;
   pszSoftware = _T("HydraNode");

Small correction - the correct casing is "Hydranode".

Madcat.
0

#3 User is offline   Andu 

  • Morph Team
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 13015
  • Joined: 04-December 02

Posted 16 February 2006 - 01:52 PM

The devs only try to recognise those clients that have a significant userbase. I don't think Hydranode or Trustyfiles has that yet. E+ on the other hand is another case and should be properly recognised.
Three Rings for the Elven-kings under the sky,
Seven for the Dwarf-lords in their halls of stone,
Nine for Mortal Men doomed to die,
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.


Dark Lord of the Forum


Morph your Mule

Need a little help with your MorphXT? Click here

0

#4 User is offline   Famerlor 

  • also known as Spike2
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 685
  • Joined: 16-October 04

Posted 16 February 2006 - 09:51 PM

Madcat666, on Feb 16 2006, 12:50 PM, said:

Small correction - the correct casing is "Hydranode".
View Post

THanks. Corrected.

Andu, on Feb 16 2006, 02:52 PM, said:

The devs only try to recognise those clients that have a significant userbase. I don't think Hydranode or Trustyfiles has that yet. E+ on the other hand is another case and should be properly recognised.

Hmm.... perhaps it's interesting for some mods, it doesn't hurt anyway :-) Btw: Regarding e+ --> First post updated. Now the correct version number for e+ is shown.


Greetz--

Spike2
Posted Image

You want a light mod with source-dropping, Powershare and WiZaRd's ClientAnalyzer ?
Try Spike2-Mod !

You rather want to stick to official eMule but don't want to miss all the new fixes and optimizations from the mods ?
Try OfFixed-Mod !


This post has been edited 1 time, the last time by God: Tomorrow, 12:74 PM
0

#5 User is offline   Aw3 

  • eMule Plus
  • PipPipPipPip
  • Group: Member_D
  • Posts: 104
  • Joined: 06-July 04

Posted 19 February 2006 - 03:49 PM

Famerlor, on Feb 16 2006, 10:51 PM, said:

Regarding e+ --> First post updated. Now the correct version number for e+ is shown.
If you really want to show it properly, I suggest you to study eMule Plus sources ;).
0

#6 User is offline   Famerlor 

  • also known as Spike2
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 685
  • Joined: 16-October 04

Posted 19 February 2006 - 06:56 PM

I did and the above posted code works properly. Newer e+ are recognized via Compat.ClientID, older ones via the Modstring. The version is correct shown, i.e. 1.1f .... everything seems fine here. But if you see an error in my codes you are free to correct me ! :D
Posted Image

You want a light mod with source-dropping, Powershare and WiZaRd's ClientAnalyzer ?
Try Spike2-Mod !

You rather want to stick to official eMule but don't want to miss all the new fixes and optimizations from the mods ?
Try OfFixed-Mod !


This post has been edited 1 time, the last time by God: Tomorrow, 12:74 PM
0

#7 User is offline   Andrey23 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 120
  • Joined: 19-January 03

Posted 19 February 2006 - 08:29 PM

I tested this code. eMule Plus 1.1g recognized as eMule Plus 1.1h.
And eMule Plus 1.1d recognized as eMule Plus 1.1e.
It is necessary to add -1 to nClientUpVersion calculation.
eMule Security - Ip-filter, Safe Serverlist, nodes.dat for emule.
0

#8 User is offline   BlueSonicBoy 

  • Magnificent Member
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 396
  • Joined: 26-September 04

Posted 21 February 2006 - 03:10 AM

Famerlor, on Feb 12 2006, 04:47 PM, said:

Purpose:
Recognize every Shareaza and MLdonkey. Recognize eMule+, Hydranode and TrustyFiles to show their names in the Lists.
View Post


Thank You!!! :thumbup:

I did notice, as Andrey23 has already pointed out, your code identifies eMule Plus 1.1g
as 1.1h

To be sure I checked Plus' source.

void CUpDownClient::ReGetClientSoft() said:

    if (m_eClientSoft == SO_PLUS)
    {
    if (m_dwPlusVers == 0)
      m_dwPlusVers = (dwMajVer << 8) | ((dwMinVer & 0xF) << 4) | dwUpdVer;
    strClientVer.Format(_T("%u"), dwMajVer);
    if (dwMinVer != 0)
      strClientVer.AppendFormat(_T(".%u"), dwMinVer);
    if (dwUpdVer != 0)
      strClientVer += static_cast<TCHAR>(_T('a') + dwUpdVer - 1);
    }


Fixed easily by changing your code to something like:

void CUpDownClient::InitClientSoftwareVersion() said:

      if (m_clientSoft == SO_EMULE)
                  iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v%u.%u%c"), pszSoftware, nClientMajVersion, nClientMinVersion, _T('a') + nClientUpVersion);
      else if (m_clientSoft == SO_EMULEPLUS) // Spike2 - show correct ePlus-Version
                  iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v%u.%u%c"), pszSoftware, nClientMajVersion, nClientMinVersion, _T('a') + nClientUpVersion - 1);

      else if (m_clientSoft == SO_AMULE || nClientUpVersion != 0)
                  iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v%u.%u.%u"), pszSoftware, nClientMajVersion, nClientMinVersion, nClientUpVersion);



Thank you again for the code!! :+1:
0

#9 User is offline   spiralvoice 

  • Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: 22-June 03

Posted 13 March 2006 - 02:37 PM

Hi,

one user reported a client with compatibleclient tag 240, which seems to be the
Chinese VeryCD client. Can this be verified?

http://mldonkey.sour...opic.php?t=4117
0

#10 User is offline   Famerlor 

  • also known as Spike2
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 685
  • Joined: 16-October 04

Posted 13 March 2006 - 05:39 PM

Seems so... they generally do strange things with their version: eMule Compat 127.129, eMule Compat 0.40, eMule 2.54, eMule 0.47h.... As there is as always no Source, setting them as GPLevildoer would fit much better than trying to recognize them....!
Posted Image

You want a light mod with source-dropping, Powershare and WiZaRd's ClientAnalyzer ?
Try Spike2-Mod !

You rather want to stick to official eMule but don't want to miss all the new fixes and optimizations from the mods ?
Try OfFixed-Mod !


This post has been edited 1 time, the last time by God: Tomorrow, 12:74 PM
0

#11 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 13 March 2006 - 09:20 PM

VeryCD provides a source, though I dunno wether it's complete... plus it's hard to find if you do not speak Chinese...
0

#12 User is offline   Famerlor 

  • also known as Spike2
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 685
  • Joined: 16-October 04

Posted 13 March 2006 - 09:47 PM

@WiZ:

I looked at their website (not for the first time.... - translated with google) and there is still ONLY a very old source from a 0.45b-version. All later releases are without source....!
Posted Image

You want a light mod with source-dropping, Powershare and WiZaRd's ClientAnalyzer ?
Try Spike2-Mod !

You rather want to stick to official eMule but don't want to miss all the new fixes and optimizations from the mods ?
Try OfFixed-Mod !


This post has been edited 1 time, the last time by God: Tomorrow, 12:74 PM
0

#13 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 13 March 2006 - 10:12 PM

I have at least a 0.46c (which is in fact 0.46b) version here... dunno where I got it from, though... :)
0

#14 User is offline   Enig123 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 553
  • Joined: 22-November 04

Posted 25 May 2006 - 12:08 PM

BlueSonicBoy, on Feb 21 2006, 03:10 AM, said:

Fixed easily by changing your code to something like:

void CUpDownClient::InitClientSoftwareVersion() said:

      if (m_clientSoft == SO_EMULE)
                  iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v%u.%u%c"), pszSoftware, nClientMajVersion, nClientMinVersion, _T('a') + nClientUpVersion);
      else if (m_clientSoft == SO_EMULEPLUS) // Spike2 - show correct ePlus-Version
                  iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v%u.%u%c"), pszSoftware, nClientMajVersion, nClientMinVersion, _T('a') + nClientUpVersion - 1);

      else if (m_clientSoft == SO_AMULE || nClientUpVersion != 0)
                  iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v%u.%u.%u"), pszSoftware, nClientMajVersion, nClientMinVersion, nClientUpVersion);


Actually, eMule Plus 1.2 was identified as "eMule Plus 1.2`" with this piece of code.
0

#15 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 25 May 2006 - 01:44 PM

How 'bout:

Quote

    if(nClientUpVersion && nClientUpVersion > 1)
      iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v%u.%u%c"), pszSoftware, nClientMajVersion, nClientMinVersion, _T('a') + nClientUpVersion-1);
    else
      iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v%u.%ua"), pszSoftware, nClientMajVersion, nClientMinVersion);



EDIT: cleanup...

This post has been edited by tHeWiZaRdOfDoS: 25 May 2006 - 01:46 PM

0

#16 User is offline   Enig123 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 553
  • Joined: 22-November 04

Posted 26 May 2006 - 12:34 AM

    if(nClientUpVersion)
      iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v%u.%u%c"), pszSoftware, nClientMajVersion, nClientMinVersion, _T('a') + nClientUpVersion-1);
    else
      iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v%u.%u"), pszSoftware, nClientMajVersion, nClientMinVersion);


works fine for me. :D

This post has been edited by Enig123: 10 June 2006 - 12:26 AM

0

#17 User is offline   Famerlor 

  • also known as Spike2
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 685
  • Joined: 16-October 04

Posted 09 June 2006 - 10:38 PM

tHeWiZaRdOfDoS, on May 25 2006, 02:44 PM, said:

How 'bout:

Quote

    if(nClientUpVersion && nClientUpVersion > 1)
      iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v%u.%u%c"), pszSoftware, nClientMajVersion, nClientMinVersion, _T('a') + nClientUpVersion-1);
    else
      iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v%u.%ua"), pszSoftware, nClientMajVersion, nClientMinVersion);



EDIT: cleanup...
View Post


Hmm...now all 1.2 are not shown as "1.2´" but as "1.2a"...?
Posted Image

You want a light mod with source-dropping, Powershare and WiZaRd's ClientAnalyzer ?
Try Spike2-Mod !

You rather want to stick to official eMule but don't want to miss all the new fixes and optimizations from the mods ?
Try OfFixed-Mod !


This post has been edited 1 time, the last time by God: Tomorrow, 12:74 PM
0

#18 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5630
  • Joined: 28-December 02

Posted 09 June 2006 - 10:52 PM

Wasn't that the purpose? I like it that way :D
Of course you can remove the 'a'....
0

#19 User is offline   Enig123 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 553
  • Joined: 22-November 04

Posted 10 June 2006 - 12:27 AM

I think my last post in this thread already gave a way to fix this.

Actually, eMule Plus's name convention looks like this:
1.1, 1.1a, 1.1b...; 1.2, 1.2a, 1.2b...

i.e., major number + minor number + fix letter(if needed)

This post has been edited by Enig123: 10 June 2006 - 01:44 AM

0

#20 User is offline   Famerlor 

  • also known as Spike2
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 685
  • Joined: 16-October 04

Posted 10 June 2006 - 03:35 PM

Thanx @ WiZ & Eniq !
Posted Image

You want a light mod with source-dropping, Powershare and WiZaRd's ClientAnalyzer ?
Try Spike2-Mod !

You rather want to stick to official eMule but don't want to miss all the new fixes and optimizations from the mods ?
Try OfFixed-Mod !


This post has been edited 1 time, the last time by God: Tomorrow, 12:74 PM
0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users