返回信息流瑞星2005-2006序列号存放位置会加密存放在Rsconfig.cfg文件里,
下面我来说一下瑞星是如何加密这个Rsconfig.cfg文件的。
用UE打开Rsconfig.cfg,在0x80位置,连续8个字节就是瑞星的Rsconfig.cfg整个文件使用的加密的字符。
0xc-0xf位置4个字节是整个Rsconfig.cfg文件的大小。
0x20位置的16个字节目前还没研究出来是什么,不过需要替换序列号时,需要把后0个字节用0替换。
从0x300位置开始,整个文件开始加密。
加密方法,每连续8个字节分别和0x80位置的连续8个字节异或。
解密整个文件后,就可以在CurrentSn和CurrentId的附近找到序列号和ID了。
private void FindKey()
{
GetInstallPath();
if(installPath != null)
{
if(File.Exists(installPath+@"\RsConfig.cfg") == true)
{
try
{
FileStream fs = new FileStream(installPath+@"\RsConfig.cfg",FileMode.Open,FileAccess.Read,FileShare.ReadWrite);
byte[] bytEncode = new byte[16];
fs.Position = 16*8;
fs.Read(bytEncode,0,bytEncode.Length);
for(int i=8;i<16;i++)
{
bytEncode[i] = bytEncode[i-8];
}
fs.Position = 16*48;
byte[] bytDecode = new byte[fs.Length - fs.Position];
long lngFlag = 0;
while (fs.Length - fs.Position >= 16)
{
byte[] bytTemp = new byte[16];
fs.Read(bytTemp,0,bytTemp.Length);
for(int i=0;i<16;i++)
{
bytDecode[lngFlag] = Convert.ToByte(bytTemp[i]^bytEncode[i]);
lngFlag ++;
}
}
long countRes = fs.Length - fs.Position;
for(int i=0;i<countRes;i++)
{
byte b = (byte)fs.ReadByte();
bytDecode[lngFlag] = Convert.ToByte(
b^bytEncode[i]);
lngFlag ++;
}
string strDecode = Encoding.GetEncoding("GB2312").GetString(bytDecode);
StreamWriter sw = new StreamWriter(Application.StartupPath+@"\Info.txt");//整个文件解密
sw.Write(strDecode);
sw.Close();
int index = strDecode.IndexOf("CurrentSn");
string strKey = strDecode.Substring(index-28,27);
this.textBoxSerial.Text = strKey;
index = strDecode.IndexOf("CurrentUserID");
string stringId = strDecode.Substring(index-16,16);
this.textBoxId.Text = getId(stringId);
fs.Close();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
GC.Collect();
}
}
else
{
this.textBoxSerial.Text = "Cann't find the Key!";
this.textBoxId.Text = "Cann't find the ID!";
}
}
else
{
MessageBox.Show("You haven't install Rising Software!","Information", MessageBoxButtons.OK,MessageBoxIcon.Information);
}
}
这是一条镜像帖。来源:北邮人论坛 / soft-design / #3000同步于 2006/1/9
SoftDesign机器人发帖
[原创]瑞星2005-2006序列号解密
Lonhero
2006/1/9镜像同步0 回复
订阅后,新回复会通过你的通知中心匿名送达。
0 条回复
暂无回复 · 你可以订阅本帖等待新回复。