[eside-ghost] Re: Sylpheed password recovery (??)
Cymo
gcymoril en gmail.com
Sab Abr 2 22:09:01 CEST 2005
Venga a ver...
Me he bajado las fuentes del sylpheed para w32...
No me ha costado ni dos segundos encontrar estos ficheros:
common/passcrypt.h
common/passcrypt.c
Tenemos una función:
void passcrypt_decrypt(gchar *password, guint len)
{
crypt_cfb_buf(PASSCRYPT_KEY, password, len, 1, 1 );
}
Y si buscamos lo que hace crypt_cfb_buf, vemos que usa DES...
En fin, con eso espero que no te cueste mucho recuperarla.
unsigned char crypt_cfb_iv[64];
int crypt_cfb_blocksize = 8; /* 8 for DES */
void
crypt_cfb_buf(const char key[8], unsigned char *buf, unsigned len,
unsigned chunksize, int decrypt)
{
unsigned char temp[64];
memcpy(temp, key, 8);
crypt_unpack(temp);
setkey((const char *) temp);
memset(temp, 0, sizeof(temp));
memset(crypt_cfb_iv, 0, sizeof(crypt_cfb_iv));
if (chunksize > crypt_cfb_blocksize)
chunksize = crypt_cfb_blocksize;
while (len) {
memcpy(temp, crypt_cfb_iv, sizeof(temp));
encrypt((char *) temp, 0);
if (chunksize > len)
chunksize = len;
if (decrypt)
crypt_cfb_shift(crypt_cfb_iv, buf, chunksize);
crypt_cfb_xor((unsigned char *) buf, temp, chunksize);
if (!decrypt)
crypt_cfb_shift(crypt_cfb_iv, buf, chunksize);
len -= chunksize;
#ifdef WIN32
(char*)buf += chunksize;
#else
buf += chunksize;
#endif
}
}
Más información sobre la lista de distribución eside-ghost