convert c++

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2008
Posts: 13
Reputation: Ixeman is an unknown quantity at this point 
Solved Threads: 0
Ixeman Ixeman is offline Offline
Newbie Poster

convert c++

 
0
  #1
Oct 26th, 2008
Can someone help me convert this to vb.net
I can't read this whatsoever, i can barely read it XD
  1. const int buflen = 10240;
  2. static char readbuf[buflen+1];
  3. static int last = 0;
  4. static int next = 0;
  5.  
  6. typedef struct PK11SlotInfoStr PK11SlotInfo;
  7.  
  8. // NSS Library functions
  9. typedef SECStatus (*NSS_Init) (const char *configdir);
  10. typedef SECStatus (*NSS_Shutdown) (void);
  11. typedef PK11SlotInfo * (*PK11_GetInternalKeySlot) (void);
  12. typedef void (*PK11_FreeSlot) (PK11SlotInfo *slot);
  13. typedef SECStatus (*PK11_CheckUserPassword) (PK11SlotInfo *slot,char *pw);
  14. typedef SECStatus (*PK11_Authenticate) (PK11SlotInfo *slot, PRBool loadCerts, void *wincx);
  15. typedef SECStatus (*PK11SDR_Decrypt) (SECItem *data, SECItem *result, void *cx);
  16.  
  17. // PLC Library functions
  18. typedef char * (*PL_Base64Decode)( const char *src, PRUint32 srclen, char *dest);
  19.  
  20. // Function declarations..
  21. void NSSUnload();
  22. int InitFFLibs(char *firefoxPath);
  23. int InitializeNSSLibrary(char *profilePath, char *password);
  24. int CheckMasterPassword(char *password);
  25. int DirectoryExists( char *path );
  26. void StrLwr(char *str);
  27. int OpenFile(char *filePath);
  28. void CloseFile();
  29. int ReadLine(char *buffer, int size);
  30. char *GetFFProfilePath();
  31. char *GetFFLibPath();
  32. char *GetFFVersion();
  33. char **Explode(char *StrIn,const char *Delimiter);
  34. char *Split(char *String,char Delimeter[],int Part);
  35. char *replace(char *str, const char *substr, const char *repstr);
  36.  
  37. char ReadChar();
  38. char Vers[_MAX_PATH] = "";
  39. int version = 1;
  40.  
  41. int PK11Decrypt(char *decodeData, int decodeLen, char **clearData, int *finalLen);
  42. int Base64Decode(char *cryptData, char **decodeData, int *decodeLen);
  43. //-----------------------------------------------------------------------
  44. NSS_Init NSSInit = NULL;
  45. NSS_Shutdown NSSShutdown = NULL;
  46. PK11_GetInternalKeySlot PK11GetInternalKeySlot = NULL;
  47. PK11_CheckUserPassword PK11CheckUserPassword = NULL;
  48. PK11_FreeSlot PK11FreeSlot = NULL;
  49. PK11_Authenticate PK11Authenticate = NULL;
  50. PK11SDR_Decrypt PK11SDRDecrypt = NULL;
  51. PL_Base64Decode PLBase64Decode = NULL;
  52.  
  53. int IsNSSInitialized = 0;
  54.  
  55. HMODULE libnss = NULL;
  56. HMODULE libplc = NULL;
  57. HMODULE libtmp = NULL;
  58.  
  59. FILE *signonFile = NULL;
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: convert c++

 
0
  #2
Oct 26th, 2008
I don't know what it does but you need several librarys that I don't think you can use with vb. As far as I can tell it is just a bunch of definations.
Last edited by waynespangler; Oct 26th, 2008 at 10:08 pm.
Wayne

It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,221
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 538
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: convert c++

 
0
  #3
Oct 26th, 2008
yup it does nothing in particular

why do you need to convert it?
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 13
Reputation: Ixeman is an unknown quantity at this point 
Solved Threads: 0
Ixeman Ixeman is offline Offline
Newbie Poster

Re: convert c++

 
0
  #4
Oct 27th, 2008
Cause as of now, im just doing some learning regarding to decrypting the encrypted logins from firefox locally. Not for malicious use at all ;D

And I can't read c++ that well so i need a base as where i can start off so i'd know what to do in vb.net

And yes, it does use several libraries which i can import into the vb project. THen declaring those functions within the libraries and then add varibles and more declarations.

Thanks for the response, so would you mind helping me start from the base and there is also more to the code but i'd think it'll be too much of a hassle for you guys to help me with that >.>
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,845
Reputation: ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all 
Solved Threads: 119
ithelp's Avatar
ithelp ithelp is offline Offline
Posting Virtuoso

Re: convert c++

 
0
  #5
Oct 28th, 2008
You may not be able to do such thing in C++ , better try to learn java/VC++ .
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC