问题
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
回答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:
- Download Process Explorer from sysinternals.com.
- Start it, then run your VFP program executable.
- Find your program EXE in Process Monitor processes column and click on it once.
- 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.
回答2:
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. :)
来源:https://stackoverflow.com/questions/28823726/how-to-decrypt-a-string-encrypted-by-v-foxpro