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: 13009
  • 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: 113
  • 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: 493
  • 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: 493
  • 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: 493
  • 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