- UID
- 66309
注册时间2010-5-1
阅读权限95
最后登录1970-1-1
超级版主
TA的每日心情 | 开心 2019-3-25 14:18 |
---|
签到天数: 881 天 [LV.10]以坛为家III
|
本帖最后由 GeekCat 于 2015-8-11 19:31 编辑
这是我学习写注册机第一个成品
软件分析怎样切入请看我之前分析一个帖子
传送门:https://www.chinapyg.com/thread-73228-1-1.html
这个软件的算法分析及注册机论坛早有放出,我这次用的是C#来写
算法分析代码:
- 0053749F |. 8D55 F8 lea edx,dword ptr ss:[ebp-0x8]
- 005374A2 |. B8 60755300 mov eax,ColorSch.00537560 ; CSS2
- 005374A7 |. E8 2081F5FF call ColorSch.0048F5CC ; CSS2 MD5计算
- 005374AC |. 8D45 F0 lea eax,dword ptr ss:[ebp-0x10]
- 005374AF |. 50 push eax
- 005374B0 |. B9 08000000 mov ecx,0x8
- 005374B5 |. 33D2 xor edx,edx
- 005374B7 |. 8BC6 mov eax,esi ; (ASCII "GEEKCATP")
- 005374B9 |. E8 82D4ECFF call ColorSch.00404940
- 005374BE |. 8B45 F0 mov eax,dword ptr ss:[ebp-0x10] ; (ASCII "GEEKCATP")
- 005374C1 |. 8D55 F4 lea edx,dword ptr ss:[ebp-0xC]
- 005374C4 |. E8 1F17EDFF call ColorSch.00408BE8
- 005374C9 |. 8B45 F4 mov eax,dword ptr ss:[ebp-0xC] ; (ASCII "GEEKCATP")
- 005374CC |. 8D55 FC lea edx,dword ptr ss:[ebp-0x4]
- 005374CF |. E8 F880F5FF call ColorSch.0048F5CC ; 注册名MD5计算
- 005374D4 |. 8D45 E8 lea eax,dword ptr ss:[ebp-0x18]
- 005374D7 |. 8B4D F8 mov ecx,dword ptr ss:[ebp-0x8] ; (ASCII "92767d20ae2d6d175fdfcfc11d656a42")
- 005374DA |. 8B55 FC mov edx,dword ptr ss:[ebp-0x4] ; (ASCII "9757e5974ba6377a7e0560d9ca015912")
- 005374DD |. E8 4AD2ECFF call ColorSch.0040472C ; 把注册名及字符串“CSS2”MD5值拼接
- 005374E2 |. 8B45 E8 mov eax,dword ptr ss:[ebp-0x18] ; (ASCII "9757e5974ba6377a7e0560d9ca01591292767d20ae2d6d175fdfcfc11d656a42")
- 005374E5 |. 8D55 EC lea edx,dword ptr ss:[ebp-0x14]
- 005374E8 |. E8 DF80F5FF call ColorSch.0048F5CC ; 拼接后的字符串MD5
- 005374ED |. 8B45 EC mov eax,dword ptr ss:[ebp-0x14] ; (ASCII "1d8ce062f5e8109641992c621c725720")
- 005374F0 |. 8BD3 mov edx,ebx
- 005374F2 |. E8 F116EDFF call ColorSch.00408BE8 ; MD5值字符中小写字母转大写
- 005374F7 |. 8D55 E4 lea edx,dword ptr ss:[ebp-0x1C]
- 005374FA |. 8B03 mov eax,dword ptr ds:[ebx] ; (ASCII "1D8CE062F5E8109641992C621C725720")
- 005374FC |. E8 2B1BF0FF call ColorSch.0043902C ; 字符串反顺
- 00537501 |. 8B55 E4 mov edx,dword ptr ss:[ebp-0x1C] ; (ASCII "027527C126C2991469018E5F260EC8D1")
- 00537504 |. 8BC3 mov eax,ebx
- 00537506 |. E8 69CFECFF call ColorSch.00404474
- 0053750B |. 8D45 E0 lea eax,dword ptr ss:[ebp-0x20]
- 0053750E |. 50 push eax
- 0053750F |. 8B03 mov eax,dword ptr ds:[ebx] ; (ASCII "027527C126C2991469018E5F260EC8D1")
- 00537511 |. B9 10000000 mov ecx,0x10 ; 取0x10(16)位
- 00537516 |. BA 01000000 mov edx,0x1 ; 从第一位开始取
- 0053751B |. E8 20D4ECFF call ColorSch.00404940 ; 取字符串操作
- 00537520 |. 8B4D E0 mov ecx,dword ptr ss:[ebp-0x20] ; (ASCII "027527C126C29914")
- 00537523 |. 8BC3 mov eax,ebx
- 00537525 |. BA 60755300 mov edx,ColorSch.00537560 ; CSS2
- 0053752A |. E8 FDD1ECFF call ColorSch.0040472C ;
复制代码
源代码:
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using System.Security.Cryptography;
- namespace ColorSchemer_Studio_V2._1
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- labCopy.Visible = false;
- }
- private void btnKeyGen_Click(object sender, EventArgs e)
- {
- string md51 = "92767d20ae2d6d175fdfcfc11d656a42";
- if (txtOrder.Text.Length == 8)
- {
- //MD5值计算
- byte[] result = Encoding.Default.GetBytes((this.txtOrder.Text.ToUpper()).Trim()); //txtOrder为输入密码的文本框
- MD5 md52 = new MD5CryptoServiceProvider();
- byte[] output = md52.ComputeHash(result);
- //this.txtResult.Text = (BitConverter.ToString(output).Replace("-", "")).ToLower(); //txtResult为输出加密文本
- string md521 = (BitConverter.ToString(output).Replace("-", "")).ToLower();
-
- string str = md521 + md51;
- byte[] result2 = Encoding.Default.GetBytes(str); //str为输入密码的文本框
- MD5 md54 = new MD5CryptoServiceProvider();
- byte[] output2 = md54.ComputeHash(result2);
- string md53 = (BitConverter.ToString(output2).Replace("-", ""));
- string strR = "CSS2" + ReverseString(md53).Substring(0, 16);
- txtResult.Text = strR.ToString();
- ///复制功能
- if(txtResult.Text !="")
- {
- Clipboard.SetText(txtResult.Text);
- labCopy.Visible = true;
- }
- }
- else
- {
- txtOrder.SelectAll(); //输入位数错误时选中框中的内容
- txtOrder.Focus(); //让输入框获得焦点
- MessageBox.Show("你输入的字符串位数错误,请输入8位字符串","错误提示");
- }
- }
- //输入一个字串反序输入函数
- public string ReverseString(string str)
- {
- StringBuilder strBuild = new StringBuilder();
- for (int i = str.Length - 1; i >= 0; i--)
- {
- strBuild.Append(str[i]);
- }
- return strBuild.ToString();
- }
- private void txtOrder_TextChanged(object sender, EventArgs e)
- {
- labCopy.Visible = false; //订单号修改“复制成功”隐藏
- txtResult.Text = ""; //订单号修改清空注册码框
- }
- private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
- {
- System.Diagnostics.Process.Start("[url=https://www.chinapyg.com]https://www.chinapyg.com[/url]");
- }
- }
- }
复制代码
注册机运行要在安装.net4.0及以上的电脑上否则会报错;
ColorSchemer Studio V2.1 注册机源码.rar
(180.83 KB, 下载次数: 27)
|
评分
-
查看全部评分
|