Official eMule-Board: Preferences.dat - Official eMule-Board

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Preferences.dat

#1 User is offline   loverboy 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 218
  • Joined: 17-September 06

Posted 01 November 2009 - 10:16 AM

Why preferences.dat changes everytime, while cryptkey.dat remains the same since the first installation of eMule?
0

#2 User is offline   SS1900 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1314
  • Joined: 15-November 08

Posted 01 November 2009 - 10:21 AM

Preferences.dat
Saves the user hash. This is a value calculated at eMule's first start and is used to identify this client in the network. Used for credit system and friends.

Cryptkey.dat
Contains the unique 384 bit private RSA key of your client to verify your userhash. If you delete this file, make sure to also delete preferences.dat which stores your userhash.
0

#3 User is offline   loverboy 

  • Splendid Member
  • PipPipPipPip
  • Group: Members
  • Posts: 218
  • Joined: 17-September 06

Posted 01 November 2009 - 11:09 AM

So why my preferences.dat (=userhash) changes everytime I close emule? the file date changes and so its content.
Is it related to my IP in that particular session?
0

#4 User is offline   SS1900 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1314
  • Joined: 15-November 08

Posted 01 November 2009 - 11:23 AM

because after an emule's session your "credits" are changed

This post has been edited by SS1900: 01 November 2009 - 11:25 AM

0

#5 User is offline   Nissenice 

  • Good ol' me
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 3878
  • Joined: 05-January 06

Posted 01 November 2009 - 12:11 PM

View Postloverboy, on 01 November 2009 - 12:09 PM, said:

So why my preferences.dat (=userhash) changes everytime I close emule? the file date changes and so its content.
Is it related to my IP in that particular session?

No it has nothing to do with your IP. A value named PREFFILE_VERSION (which currently (v0.49c) equals 0x14), the position of eMule's window on the screen and the userhash is saved in preferences.dat each time eMule is closed.



bool CPreferences::Save(){

	bool error = false;
	CString strFullPath;
	strFullPath = GetMuleDirectory(EMULE_CONFIGDIR) + L"preferences.dat";

	FILE* preffile = _tfsopen(strFullPath, L"wb", _SH_DENYWR);
	prefsExt->version = PREFFILE_VERSION;
	if (preffile){
		prefsExt->version=PREFFILE_VERSION;
		prefsExt->EmuleWindowPlacement=EmuleWindowPlacement;
		md4cpy(prefsExt->userhash, userhash);

		error = fwrite(prefsExt,sizeof(Preferences_Ext_Struct),1,preffile)!=1;
		if (thePrefs.GetCommitFiles() >= 2 || (thePrefs.GetCommitFiles() >= 1 && !theApp.emuledlg->IsRunning())){
			fflush(preffile); // flush file stream buffers to disk buffers
			(void)_commit(_fileno(preffile)); // commit disk buffers to disk
		}
		fclose(preffile);
	}
	else
		error = true;

(...)
}

Posted Image
0

#6 User is offline   omeringen 

  • löl
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 660
  • Joined: 01-January 06

Posted 01 November 2009 - 12:14 PM

View Postloverboy, on 01 November 2009 - 01:09 PM, said:

So why my preferences.dat (=userhash) changes everytime I close emule? the file date changes and so its content.
Is it related to my IP in that particular session?

Your ID is related with your WAN ip number, not userhash. I think preferences.dat file content is always the same. Maybe eMule is reading it from the memory and rewriting it to the disk on close action.

View PostSS1900, on 01 November 2009 - 01:23 PM, said:

because after an emule's session your "credits" are changed

I couldn't understand that message. . .

//Nissenice has already posted while i was writing :P

This post has been edited by omeringen: 01 November 2009 - 12:16 PM

0

#7 User is offline   SS1900 

  • Golden eMule
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1314
  • Joined: 15-November 08

Posted 01 November 2009 - 12:35 PM

View Postomeringen, on 01 November 2009 - 01:14 PM, said:

View PostSS1900, on 01 November 2009 - 01:23 PM, said:

because after an emule's session your "credits" are changed

I couldn't understand that message. . .


yeah i'm wrong :worthy:
0

#8 User is offline   xilolee 

  • eMule 0.49c user
  • PipPipPipPipPipPipPip
  • Group: Italian Moderators
  • Posts: 3912
  • Joined: 20-August 08

Posted 01 November 2009 - 01:09 PM

if

Quote

preferences.dat file content is always the same

why should emule rewrite it? :confused:

This post has been edited by xilolee: 01 November 2009 - 01:10 PM

INCONCEIVABLE! - You keep using that word. I do not think it means what you think it means.
italian guides - guide della sezione italiana --- come ottenere aiuto
italian support - sezione italiana --- scaricare la lista server --- i filtri ip
ottenere id alto --- aprire le porte nel router --- recuperare file corrotti
Sembra talco ma non è serve a darti l'allegrIa! Se lo lanci e poi lo respiri ti dà subito l'allegrIa!
0

#9 User is offline   omeringen 

  • löl
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 660
  • Joined: 01-January 06

Posted 01 November 2009 - 01:27 PM

File content is always the same, eMule is just rewriting it. Don't know the tech explanation, maybe devs or someone who knows how to read the code can answer :)
0

#10 User is offline   xilolee 

  • eMule 0.49c user
  • PipPipPipPipPipPipPip
  • Group: Italian Moderators
  • Posts: 3912
  • Joined: 20-August 08

Posted 01 November 2009 - 01:30 PM

precisely ... if the content does not change, it should not to be rewrited and have the same date of the criptkey.dat (mine has 19/12/2006)
INCONCEIVABLE! - You keep using that word. I do not think it means what you think it means.
italian guides - guide della sezione italiana --- come ottenere aiuto
italian support - sezione italiana --- scaricare la lista server --- i filtri ip
ottenere id alto --- aprire le porte nel router --- recuperare file corrotti
Sembra talco ma non è serve a darti l'allegrIa! Se lo lanci e poi lo respiri ti dà subito l'allegrIa!
0

#11 User is offline   Nissenice 

  • Good ol' me
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 3878
  • Joined: 05-January 06

Posted 01 November 2009 - 01:37 PM

View Postxilolee, on 01 November 2009 - 02:30 PM, said:

precisely ... if the content does not change, it should not to be rewrited and have the same date of the criptkey.dat (mine has 19/12/2006)

Have you 'Safe .met/.dat file writing' set to 'Never' in Options->Extended?
Posted Image
0

#12 User is offline   omeringen 

  • löl
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 660
  • Joined: 01-January 06

Posted 01 November 2009 - 01:41 PM

@Nissenice,
cryptkey.dat file is not the point because eMule doesn't rewrite it even if you set "Safe .met/.dat file writing" option to "Always". . . For example mine is about 2008.

This post has been edited by omeringen: 01 November 2009 - 01:51 PM

0

#13 User is offline   xilolee 

  • eMule 0.49c user
  • PipPipPipPipPipPipPip
  • Group: Italian Moderators
  • Posts: 3912
  • Joined: 20-August 08

Posted 01 November 2009 - 01:50 PM

@nissenice

yes, but i have modified that option in the last months, whilst in the 2006 i had the default option (on shutdown) :)
INCONCEIVABLE! - You keep using that word. I do not think it means what you think it means.
italian guides - guide della sezione italiana --- come ottenere aiuto
italian support - sezione italiana --- scaricare la lista server --- i filtri ip
ottenere id alto --- aprire le porte nel router --- recuperare file corrotti
Sembra talco ma non è serve a darti l'allegrIa! Se lo lanci e poi lo respiri ti dà subito l'allegrIa!
0

#14 User is offline   Nissenice 

  • Good ol' me
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 3878
  • Joined: 05-January 06

Posted 01 November 2009 - 02:01 PM

View Postomeringen, on 01 November 2009 - 02:41 PM, said:

@Nissenice,
cryptkey.dat file is not the point because eMule doesn't save it even if you set "Safe .met/.dat file writing" option to "Always". . . For example mine is about 2008.


Well, I wasn't thinking of cryptkey.dat. I thought what xilolee was trying to say was that his preferences.dat was last changed the same date as his cryptkey.dat.

And if so the only reason for this would be this part from the code posted above:

		if (thePrefs.GetCommitFiles() >= 2 || (thePrefs.GetCommitFiles() >= 1 && !theApp.emuledlg->IsRunning())){
			fflush(preffile); // flush file stream buffers to disk buffers
			(void)_commit(_fileno(preffile)); // commit disk buffers to disk
		}


Which basically says, if I'm not wrong, that if 'Safe .met/.dat file writing' is set to 'Always' preferences.dat will always be saved at shutdown and if it is set to 'Never' it never will.


Btw, my preferences.dat changes every time I close the program. And I have "Safe .met/.dat file writing" set to 'On shutdown'
Posted Image
0

#15 User is offline   Nissenice 

  • Good ol' me
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 3878
  • Joined: 05-January 06

Posted 01 November 2009 - 02:04 PM

View Postxilolee, on 01 November 2009 - 02:50 PM, said:

@nissenice

yes, but i have modified that option in the last months, whilst in the 2006 i had the default option (on shutdown) :)

Hmm.. Strange! That was unexpected. Perhaps you are using a backup of it?

This post has been edited by Nissenice: 01 November 2009 - 02:11 PM

Posted Image
0

#16 User is offline   xilolee 

  • eMule 0.49c user
  • PipPipPipPipPipPipPip
  • Group: Italian Moderators
  • Posts: 3912
  • Joined: 20-August 08

Posted 01 November 2009 - 02:15 PM

Now i have modified the safe met/dat in always - restarted and connected emule twice and the criptkey is always since 2006 :bounce:

This post has been edited by xilolee: 01 November 2009 - 02:16 PM

INCONCEIVABLE! - You keep using that word. I do not think it means what you think it means.
italian guides - guide della sezione italiana --- come ottenere aiuto
italian support - sezione italiana --- scaricare la lista server --- i filtri ip
ottenere id alto --- aprire le porte nel router --- recuperare file corrotti
Sembra talco ma non è serve a darti l'allegrIa! Se lo lanci e poi lo respiri ti dà subito l'allegrIa!
0

#17 User is offline   omeringen 

  • löl
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 660
  • Joined: 01-January 06

Posted 01 November 2009 - 02:16 PM

Why unexpected ? I have just told my file's "date modified" date is about 02/2008 :P ;

View Postomeringen, on 01 November 2009 - 03:41 PM, said:

@Nissenice,
cryptkey.dat file is not the point because eMule doesn't rewrite it even if you set "Safe .met/.dat file writing" option to "Always". . . For example mine is about 2008.

This post has been edited by omeringen: 01 November 2009 - 02:16 PM

0

#18 User is offline   Nissenice 

  • Good ol' me
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 3878
  • Joined: 05-January 06

Posted 01 November 2009 - 02:17 PM

View Postxilolee, on 01 November 2009 - 03:15 PM, said:

Now i have modified the safe met/dat in always - restarted and connected emule twice and the criptkey is always since 2006 :bounce:

criptkey? I thought we were discussing preferences.dat here. :P
Posted Image
0

#19 User is offline   xilolee 

  • eMule 0.49c user
  • PipPipPipPipPipPipPip
  • Group: Italian Moderators
  • Posts: 3912
  • Joined: 20-August 08

Posted 01 November 2009 - 02:19 PM

:lol:

imo, if the preferences.dat and the criptkey.dat do not change, they should not be rewrited ... but the preferences.dat changes

This post has been edited by xilolee: 01 November 2009 - 02:22 PM

INCONCEIVABLE! - You keep using that word. I do not think it means what you think it means.
italian guides - guide della sezione italiana --- come ottenere aiuto
italian support - sezione italiana --- scaricare la lista server --- i filtri ip
ottenere id alto --- aprire le porte nel router --- recuperare file corrotti
Sembra talco ma non è serve a darti l'allegrIa! Se lo lanci e poi lo respiri ti dà subito l'allegrIa!
0

#20 User is offline   torpon 

  • I'm so tired
  • PipPipPipPipPipPipPip
  • Group: Moderator
  • Posts: 19957
  • Joined: 20-January 05

Posted 01 November 2009 - 02:46 PM

User hash is 16 bytes long, whilw preferences.dat is 56 bytes long. So is clear that it stores something more than user hash.

Cheers :D+-
Enlaces Importantes Guias Rápidas Cuestionario de Consulta
Reglas del Foro Configuraciones de Varios Cortafuegos Saturación de la Conexión
La torpeza en la persona grandes males proporciona
Siervo de la gleba de la extinta Republica de Kjersti

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

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