这是个很简单的教程,需要编程基础,没有基础的可以学学。 1、解来源 美女超超【未婚 】需要将pdf转到word,问我有没有好的软件,然后发送了这个迅捷PDF转换器给我。顺手看了下,很简答的验证机制,没技术含量,花了10分钟写了这个注册机,分享下,小白学下就行。 软件C#编写,做的特别漂亮,应该是市面上很好的一款any to any的转换工具了。 成品注册机: 图片都不小心删了,大家看注册机代码把。2、注册机制 2.1 查壳,未加壳 2.1 载入.NET Reflector,寻找注册对话框 查看注册机制: 注册码生成: 机器码生成: 3、自己编写注册机 3.1 创建C#工程 3.2 绘制界面 3.3 编写代码 主要代码:public frmReger()
{
InitializeComponent();
txtMachineCode.Text = GetMachineCode().ToString();
if(!string.IsNullOrEmpty(txtMachineCode.Text))
{
btnReg_Click(null,null);
}
}
private void btnReg_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(txtMachineCode.Text))
{
MessageBox.Show("请输入机器码后计算!", "无痕-提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
long num = Convert.ToInt64(txtMachineCode.Text.Trim());
string str = "";
for (int i = 0; i < 100; i++)
{
num *= 2L;
str = num.ToString();
if (str.Length <= 12)
{
num = Convert.ToInt64(str);
}
else
{
num = Convert.ToInt64(str.Substring(0, 12));
}
}
txtRegCode.Text = num.ToString();
}
private int GetMachineCode()
{
int[] encode = new int[] { 8, 7, 8, 6, 5, 7, 9, 9, 8 };
string str = "";
string str2 = "";
ManagementObjectCollection instances = new ManagementClass("Win32_Processor").GetInstances();
foreach (ManagementObject obj2 in instances)
{
str = obj2.Properties["ProcessorId"].Value.ToString();
break;
}
if (str == string.Empty)
{
return 0;
}
if (str.Length == 0x10)
{
str = string.Format("{0}-{1}-00000000-00000000", str.Substring(0, 8), str.Substring(8, 8));
}
else if (str.Length == 0x20)
{
str = string.Format("{0}-{1}-{2}-{3}", new object[] { str.Substring(0, 8), str.Substring(8, 8), str.Substring(0x10, 8), str.Substring(0x18, 8) });
}
str2 = this.get_md5(str, 0x20, true);
string s = "";
string str4 = "";
for (int i = 1; i <= 0x1b; i += 3)
{
s = str2.Substring(i + 2, 1);
int num = Encoding.ASCII.GetBytes(s)[0];
int num2 = num % encode[((i + 2) / 3) - 1];
if (0 == num2)
{
num2 = 8;
}
str4 = str4 + num2.ToString();
}
return int.Parse(str4);
}
private string get_md5(string str, int bit = 0x20, bool lower_case = true)
{
string str2 = "";
byte[] buffer = new MD5CryptoServiceProvider().ComputeHash(Encoding.ASCII.GetBytes(str));
for (int i = 0; i < buffer.Length; i++)
{
if (0x20 == bit)
{
str2 = str2 + Convert.ToString(buffer
, 0x10).PadLeft(2, '0');}
else
{
str2 = str2 + Convert.ToString(buffer, 0x10);
}
}
return (lower_case ? str2 : str2.ToUpper());
}
[attachment=991]
[attachment=992]
[attachment=993]
[attachment=994]
[attachment=990]
下载地址回复可见,记得加热心和CB哦,谢谢大家。4、成品下载地址 4.1 无法打开软件的需要安装.NETFramework4.0 下载地址请百度。 4.2 下载链接: http://pan.baidu.com/s/1c06iLuo