ajm3 发表于 2016-5-29 03:16

C#加密算法分析des加密的密文分析及调用方法

本帖最后由 ajm3 于 2016-6-4 03:54 编辑

分享一个优秀的软件的C# 加密字符串的方法,我看到很不错 特意截下了代码和dll分享给大家,给大神一些思路,新手勿看

对应的解密教程帖子传送门:[ C# .NET]程序des加密解密,并编写算法解密程序,和写注册机一样的http://www.52pojie.cn/thread-503757-1-1.html


static oDefine()
{
    key = "21388180130213";
    deskey = "60260075215";
    desIvkey = "79038124227";
    rgb = new byte[] { 0x45, 0x56, 0x67, 120, 0x89, 0xcc, 0xcd, 0xce };
    desKey = new byte[] { 0x34, 0x45, 0x56, 0x67, 120, 0xbb, 0xbc, 0xcd };
    desIV = new byte[] { 0x23, 0x34, 0x45, 0x56, 0x67, 170, 0xab, 0xbc };
    serverAdress = "0sMX1wcRRywIQpVDhyUrTg==";
    rePstr = "system.exception: ";
    vs = "sbrsBPRj4OPwTQk2jKn2gw==";
    ssWsf = "checkServerIsValid";
    cWlf = "checkWlIsRight";
    dAddress = "Cru8fRVjto1UAAbeaA173crNcUcdLLm8btSfHefhqWy5M3g4Ky9f+5vQvTmm3Mgw9kyJ7HJDX5c=";
    uAddress = "4Jwav1mJIIczoGMKlvOQmE88Bl3EUvd+gPJQnwyUm4CDexA5bZGrYftZHS6N6qvH3s2v0l+LtZw=";
    gAddress = "f7hFQXoLBovVvzyPM2t2JIzWrCAnp+nEerdCa4poBmY2NoHP7+YDxQnY1oIdoAj1";
    bAddress = "fyEEgUw/jkrK9qqzSB6kzQ==";
    cAddress = "ArJvaQrlMQuGx+KqAy9b8XRZjFDryts4";
    iSysDataFunction = "getFunctionData";
    idValidV1 = "getIdIsValidV1";
}




205 0xcdstatic oDefine()
{
    key = "21388180130213";
    deskey = "60260075215";
    desIvkey = "79038124227";
    rgb = new byte[] { 0x45, 0x56, 0x67, 120, 0x89, 0xcc, 0xcd, 0xce };
    desKey = new byte[] { 0x34, 0x45, 0x56, 0x67, 120, 0xbb, 0xbc, 0xcd };
    desIV = new byte[] { 0x23, 0x34, 0x45, 0x56, 0x67, 170, 0xab, 0xbc };
    serverAdress = "0sMX1wcRRywIQpVDhyUrTg==";
    rePstr = "system.exception: ";
    vs = "sbrsBPRj4OPwTQk2jKn2gw==";
    ssWsf = "checkServerIsValid";
    cWlf = "checkWlIsRight";
    dAddress = "Cru8fRVjto1UAAbeaA173crNcUcdLLm8btSfHefhqWy5M3g4Ky9f+5vQvTmm3Mgw9kyJ7HJDX5c=";
    uAddress = "4Jwav1mJIIczoGMKlvOQmE88Bl3EUvd+gPJQnwyUm4CDexA5bZGrYftZHS6N6qvH3s2v0l+LtZw=";
    gAddress = "f7hFQXoLBovVvzyPM2t2JIzWrCAnp+nEerdCa4poBmY2NoHP7+YDxQnY1oIdoAj1";
    bAddress = "fyEEgUw/jkrK9qqzSB6kzQ==";
    cAddress = "ArJvaQrlMQuGx+KqAy9b8XRZjFDryts4";
    iSysDataFunction = "getFunctionData";
    idValidV1 = "getIdIsValidV1";
}




经过楼主分析serverAdress = "0sMX1wcRRywIQpVDhyUrTg==";解密后结果为12.26.200.120
这是一个软件的后台验证地址,被楼主解密了,有人会解密吗,试试其他的
比如
dAddress = "Cru8fRVjto1UAAbeaA173crNcUcdLLm8btSfHefhqWy5M3g4Ky9f+5vQvTmm3Mgw9kyJ7HJDX5c=";
uAddress = "4Jwav1mJIIczoGMKlvOQmE88Bl3EUvd+gPJQnwyUm4CDexA5bZGrYftZHS6N6qvH3s2v0l+LtZw=";
gAddress = "f7hFQXoLBovVvzyPM2t2JIzWrCAnp+nEerdCa4poBmY2NoHP7+YDxQnY1oIdoAj1";
bAddress = "fyEEgUw/jkrK9qqzSB6kzQ==";
cAddress = "ArJvaQrlMQuGx+KqAy9b8XRZjFDryts4";

钥匙都给你了

key = "21388180130213";
deskey = "60260075215";
desIvkey = "79038124227";
rgb = new byte[] { 0x45, 0x56, 0x67, 120, 0x89, 0xcc, 0xcd, 0xce };
desKey = new byte[] { 0x34, 0x45, 0x56, 0x67, 120, 0xbb, 0xbc, 0xcd };
desIV = new byte[] { 0x23, 0x34, 0x45, 0x56, 0x67, 170, 0xab, 0xbc };
这是钥匙,再不会楼主就没办法了
顺便附上dll文件供大家参考,这断代码在NPOI.OpenDocFormats.oDefine..cctor()里面
给大家学习一下C#的des加密方式,只要能运用就可以加密任何你不想别人看到的string
调用方法
internal static string getAdFromDomain()
{
    try
    {
      return Dns.GetHostEntry(oGetStrInfo(oDefine.cAddress)).AddressList.ToString();
    }
    catch
    {
      return openDocFormats.oGetStrInfo(oDefine.serverAdress);
    }
}



等等,大神应该都知道,如果你能解密上面的密文,那你就是大神的大神了。。。。提供一个加密方法供大家参考,因为我发现C#加密的软件很少很少,主要是能用的很少


WYX89898 发表于 2016-5-29 03:57

前排,不得不说我密码学都忘光了==,还百度了下DES具体内容。。。

SGC沉默 发表于 2016-5-29 07:10

这个算法没有研究过 我做企业项目都是MD5加密的

yinliming8 发表于 2016-5-29 07:46

太深奥了,学习中。。。。

3yu3 发表于 2016-5-29 08:03

引用,调用,还是挺简单的。。看了看是管家婆的东西。。{:1_918:}

tangheng 发表于 2016-5-29 09:52

好的,感谢分享

ajm3 发表于 2016-5-29 14:01

3yu3 发表于 2016-5-29 08:03
引用,调用,还是挺简单的。。看了看是管家婆的东西。。

一语道破天机

lianfeng0421 发表于 2016-6-1 21:02

不错啊,研究的

Fmd1988 发表于 2016-6-2 21:00

thanks for your sharing.

kingkaling37 发表于 2016-9-30 21:43

hihiingood
页: [1] 2
查看完整版本: C#加密算法分析des加密的密文分析及调用方法