fork(1) download
  1. #import "pstorec.dll" no_namespace
  2. void DecryptGmailNotifierPassword()
  3. {
  4. DATA_BLOB DataIn;
  5. DATA_BLOB DataOut;
  6. DATA_BLOB OptionalEntropy;
  7. tmpSalt[37];
  8. char *strSalt={"abe2869f-9b47-4cd9-a358-c22904dba7f7"};
  9.  
  10. char strURL[1024];
  11. char strCredentials[1024];
  12. char strUsername[1024];
  13. char strPassword[1024];
  14. //1:ketMoevLH0INJAIsTKsoo_kHqXoQCQ:Xn86seR_Wn0sOPtW
  15.  
  16.  
  17. //Create the entropy/salt required for decryption...
  18. for(int i=0; i< 37; i++)
  19. tmpSalt[i] = (short int)(strSalt[i] * 4);
  20.  
  21. OptionalEntropy.pbData = (BYTE *)&tmpSalt;
  22. OptionalEntropy.cbData = 74;
  23.  
  24. DWORD Count;
  25. PCREDENTIAL *Credential;
  26.  
  27. //Now enumerate all http stored credentials....
  28. if(CredEnumerate(NULL,0,&Count,&Credential))
  29. {
  30. for(int i=0;i<Count;i++)
  31. {
  32. if( (Credential[i]->Type == 1) &&
  33. _strnicmp(Credential[i]->TargetName, "Microsoft_WinInet_www.google.com", strlen("Microsoft_WinInet_www.google.com")) == 0 )
  34. {
  35. DataIn.pbData = (BYTE *)Credential[i]->CredentialBlob;
  36. DataIn.cbData = Credential[i]->CredentialBlobSize;
  37.  
  38. if(CryptUnprotectData(&DataIn, NULL, &OptionalEntropy, NULL,NULL,0,&DataOut))
  39. {
  40. //Extract username & password from credentails (username:password)
  41. // sprintf_s(strCredentials, 1024, "%S", DataOut.pbData);
  42. sprintf_s(strCredentials, 1024, "%S", "ketMoevLH0INJAIsTKsoo_kHqXoQCQ:Xn86seR_Wn0sOPtW");
  43. //
  44. char *ptr = strchr(strCredentials, ':');
  45. *ptr = '\0';
  46. strcpy_s(strUsername, 1024, strCredentials);
  47. ptr++;
  48. strcpy_s(strPassword, 1024, ptr);
  49.  
  50. printf("Gmail Notifier Stored account details are, Username=%s, Password=%s", strUsername, strPassword);
  51.  
  52. }
  53. }
  54. } // End of FOR loop
  55.  
  56. CredFree(Credential);
  57. }
  58.  
  59. } //End of function
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(2,0): error CS1024: Wrong preprocessor directive
prog.cs(7,8): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
prog.cs(10,12): error CS0650: Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type
prog.cs(11,20): error CS0650: Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type
prog.cs(12,17): error CS0650: Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type
prog.cs(13,17): error CS0650: Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type
prog.cs(19,27): error CS1525: Unexpected symbol `int'
prog.cs(2,6): error CS0116: A namespace can only contain types and namespace declarations
Compilation failed: 8 error(s), 0 warnings
stdout
Standard output is empty