2015-02-06 71 views
0

我想解码DBF中的一些字符串(由Foxpro应用程序创建),并且我对FoxPro的编码/加密方法感兴趣。类型的VS FoxPro编码

这里有一个样本编码字符串: “òÙÛÚÓ½kê3ù[ƒ~øžÃ+™THOA-KH-戈伊” “|øHñyäEü[email protected]‰fç9æ×甲苯基±:”

有人可以告诉我这个字符串的编码方法,或者给我任何有关Foxpro编码方法的建议?

谢谢!

回答

0

它看起来像你的文字可能是“_Crypt.vcx”这将需要一个结果给定字符串,应用任何密码并生成输出加密字符串。

VFP具有类,在其中默认安装VFP的“FFC”文件夹中(通过HOME()得到的如

C:\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 9\ 

这里路径是一个示例组的代码挂钩的_Crypt类和样本来加密一个字符串,然后解密一个加密的字符串,你的字符串显然是加密的(显然),但除非你知道更多的加密(例如找到密码/密钥,你可能会有点卡住,并进行更多的研究) ...

lcCryptLib = HOME() + "FFC\_Crypt.vcx" 
IF NOT FILE(lcCryptLib) 
    MESSAGEBOX("No crypt class library.") 
    RETURN 
ENDIF 
SET CLASSLIB TO (lcCryptLib) ADDITIVE 

oCrypt = CREATEOBJECT("_CryptAPI") 
oCrypt.AddProperty("myPassKey") 
oCrypt.myPassKey = "Hold property to represent some special 'Key/pass phrase' " 

*/ Place-holder to get encrypted value 
lcEncryptedValue = "" 
? oCrypt.EncryptSessionStreamString("Original String", oCrypt.myPassKey, @lcEncryptedValue) 

*/ Show results of encrypted value 
? "Encrypted Value: " + lcEncryptedValue 

*/ Now, to get the decrypted from the encrypted... 
lcDecryptedValue = "" 
? oCrypt.DecryptSessionStreamString(lcEncryptedValue, oCrypt.myPassKey, @lcDecryptedValue) 

? "Decrypted Value: " + lcDecryptedValue 


*/ Now, try with your string to decrypt 
lcYourString = [òÙÛÚÓ ½kê3ù[ƒ˜øžÃ+™Þoa-Kh— Gó¯ý""|øHñyäEü[email protected]‰fç9æ×ϯyi±:] 
lcDecryptedValue = "" 
? oCrypt.DecryptSessionStreamString(lcYourString, oCrypt.myPassKey, @lcDecryptedValue) 

? "Decrypted Value: " + lcDecryptedValue