0

I have a program built in Visual Fox Pro which read and write information in a database, but the information is encrypted.

I have the source code so, I have the key (same key to encrypt and dencrypt) use to encrypt/decrypt. But I cannot get the algorithm used to encrypt/dencrypt.

I need this in order to create a new program with C# which can read the information and save it in another DB.

Below you have some examples of the information encrypted:

ùœ¢Qa³•ù¼?-
pJ´’ˆò»Æ8-skYIÞµ§¬†Œ‚„Šç

럭IpAÔúùÈP@kJ´’ˆò»Æ8-skYIÞµ§¬†Œ‚„Šç

I read that VFP doesn't have a native algorithm to encrypt so the developer should use an external library. In the source code I cannot find anything, he just used encrypt function sending the text to encrypt and the key.

In the root folder there are the following DLL (maybe one of this has the code to encrypt) This is the first time I see something in VFP msvcr70.dll vfp7r.dll vfp7renu.dll vfp7resn.dll

WorkSmarter
  • 3,738
  • 3
  • 29
  • 34
  • 2
    Either the encrypt function is an external call, or it contains external calls. If you have the source, you should be able to see where/how the encryption/decryption is performed. – Simon MᶜKenzie Mar 03 '15 at 03:51
  • I have it... But the function is just "wreturn = encrypt(plaintext,wpassw)" and the encrypt function is not defined anywhere. Maybe is there in those DLL... I don't know – Fabian Angeloni Mar 03 '15 at 04:01
  • You mentioned that you have the encryption keys - how are they supplied to the encryption code? – Simon MᶜKenzie Mar 03 '15 at 04:47
  • 1
    As Simon said. FWIW, Craig Boyd's VFPEncryption library is perhaps the most popular one in the VFP community during the last decade, and has an Encrypt() function. It's an FLL rather than a DLL though, see also http://www.sweetpotatosoftware.com/SPSBlog/2009/08/09/MajorVFPEncryptionUpdate.aspx – Stefan Wuebbe Mar 03 '15 at 08:20

2 Answers2

1

VFP does not have any native encryption functionality. Those DLLs you list are just the VFP 7 runtimes, and a Visual C++ runtime which the VFP 7 runtimes have a dependency on.

What I would do is:

  1. Download Process Explorer from sysinternals.com.
  2. Start it, then run your VFP program executable.
  3. Find your program EXE in Process Monitor processes column and click on it once.
  4. In the toolbar at the top, use the button to toggle between viewing handles and viewing DLLs. This will list each of these that the EXE has open.

I suspect it's Craig Boyd's library.

Alan B
  • 4,086
  • 24
  • 33
0

If your VFP application was built on Visual MaxFrame then it contains its own encryption/decription functionality as a prg which is part of the framework(x3ed.prg).

It's basically a cypher with some modular logic to flip a couple of bits, but there are 2 variants.

If you have a special key then this is likely not it, but just in case. :)

nqramjets
  • 76
  • 9