某TS下载及解密合并程序的注册机编写
高考假期,想下载点资源看看,不了到都是特么m3u8的视频,部分还加了密,手动解密恢复过于麻烦,百度下,找到了这个软件(话说大家都在拿什么软件下载m3u8呢?)
功能挺丰富,可惜要注册码,不然只给下载30s种的视频,这谁受得了呢???
正文开始
DIE瞧瞧,是个.NET写的程序,挺好
拖进DN SPY宰割
很轻松就找到了注册按钮处理函数
放大了给大家瞧瞧
```
private void button3_Click(object sender, EventArgs e)
{
Form1.UpdateAppConfig("sncode", this.textBox4.Text);
this.textBox3.Text = MachineCode.GetMachineCodeString();//获取机器码
bool flag = this.textBox4.Text.Equals(MachineCode.cksn(this.textBox3.Text));//计算注册码并与输入数据做对比
if (flag)
{
this.snflg = true;
MessageBox.Show("注册成功,不限制文件数。");
this.groupBox3.Text = "已注册版本";
}
else
{
this.snflg = false;
MessageBox.Show("注册失败,请联系作者。");
this.groupBox3.Text = "未注册版本(仅可处理10个文件)";
}
}
```
再来瞧瞧 MachineCode类里有什么好玩的东东
```
using System;
using System.Management;
using System.Security.Cryptography;
using System.Text;
namespace TSmaster
{
// Token: 0x0200000E RID: 14
public class MachineCode
{
// Token: 0x0600006C RID: 108 RVA: 0x0000B090 File Offset: 0x00009290
public static string GetMachineCodeString()//获取一般机器码
{
string empty = string.Empty;
bool flag = MachineCode.machineCode == null;
if (flag)
{
MachineCode.machineCode = new MachineCode();
}
return MachineCode.machineCode.GetCpuInfo() + MachineCode.machineCode.GetMoAddress().Replace(":", "");
}
// Token: 0x0600006D RID: 109 RVA: 0x0000B0EC File Offset: 0x000092EC
public static string cksn(string machinecode)//适当修改下机器码
{
MD5 md = new MD5CryptoServiceProvider();
byte[] bytes = Encoding.Default.GetBytes("#$" + machinecode + "&*");
byte[] inArray = md.ComputeHash(bytes);
byte[] bytes2 = Encoding.Default.GetBytes("+-" + machinecode + "*/");
byte[] inArray2 = md.ComputeHash(bytes2);
return (Convert.ToBase64String(inArray) + Convert.ToBase64String(inArray2)).Replace("=", "");
}
// Token: 0x0600006E RID: 110 RVA: 0x0000B170 File Offset: 0x00009370
public string GetCpuInfo()//字面意思
{
string text = "";
try
{
using (ManagementClass managementClass = new ManagementClass("Win32_Processor"))
{
ManagementObjectCollection instances = managementClass.GetInstances();
foreach (ManagementBaseObject managementBaseObject in instances)
{
ManagementObject managementObject = (ManagementObject)managementBaseObject;
text = managementObject.Properties["ProcessorId"].Value.ToString();
managementObject.Dispose();
}
}
}
catch (Exception)
{
throw;
}
return text.ToString();
}
// Token: 0x0600006F RID: 111 RVA: 0x0000B234 File Offset: 0x00009434
public string GetHDid()//这个么,不知道获取的啥
{
string text = "";
try
{
using (ManagementClass managementClass = new ManagementClass("Win32_DiskDrive"))
{
ManagementObjectCollection instances = managementClass.GetInstances();
foreach (ManagementBaseObject managementBaseObject in instances)
{
ManagementObject managementObject = (ManagementObject)managementBaseObject;
text = (string)managementObject.Properties["Model"].Value;
managementObject.Dispose();
}
}
}
catch (Exception)
{
throw;
}
return text.ToString();
}
// Token: 0x06000070 RID: 112 RVA: 0x0000B2F8 File Offset: 0x000094F8
public string GetMoAddress()//网络地址
{
string text = "";
try
{
using (ManagementClass managementClass = new ManagementClass("Win32_NetworkAdapterConfiguration"))
{
ManagementObjectCollection instances = managementClass.GetInstances();
foreach (ManagementBaseObject managementBaseObject in instances)
{
ManagementObject managementObject = (ManagementObject)managementBaseObject;
bool flag = (bool)managementObject["IPEnabled"];
if (flag)
{
text = managementObject["MacAddress"].ToString();
}
managementObject.Dispose();
}
}
}
catch (Exception)
{
throw;
}
return text.ToString();
}
// Token: 0x04000094 RID: 148
private static MachineCode machineCode;
}
}
```
这么多就是为了算出机器码,这效率。。。。。
废话不多说,反编译码复制进vs ide,建个C#项目(我用的是VS2010)
主程序如下
```
//这就是的来的反编译码喽(偷懒没去优化)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Management;
using System.Security.Cryptography;
using System.Text;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
namespace TS_MASTER注册机
{
public class MachineCode
{
// Token: 0x06000064 RID: 100 RVA: 0x0000B824 File Offset: 0x00009A24
public static string GetMachineCodeString()
{
string empty = string.Empty;
bool flag = MachineCode.machineCode == null;
if (flag)
{
MachineCode.machineCode = new MachineCode();
}
return MachineCode.machineCode.GetCpuInfo() + MachineCode.machineCode.GetMoAddress().Replace(":", "");
}
// Token: 0x06000065 RID: 101 RVA: 0x0000B880 File Offset: 0x00009A80
public static string cksn(string machinecode)//算注册码
{
MD5 md = new MD5CryptoServiceProvider();
byte[] bytes = Encoding.Default.GetBytes("#$" + machinecode + "&*");
byte[] inArray = md.ComputeHash(bytes);
byte[] bytes2 = Encoding.Default.GetBytes("+-" + machinecode + "*/");
byte[] inArray2 = md.ComputeHash(bytes2);
return (Convert.ToBase64String(inArray) + Convert.ToBase64String(inArray2)).Replace("=", "");
}
// Token: 0x06000066 RID: 102 RVA: 0x0000B904 File Offset: 0x00009B04
public string GetCpuInfo()
{
string text = "";
try
{
using (ManagementClass managementClass = new ManagementClass("Win32_Processor"))
{
ManagementObjectCollection instances = managementClass.GetInstances();
foreach (ManagementBaseObject managementBaseObject in instances)
{
ManagementObject managementObject = (ManagementObject)managementBaseObject;
text = managementObject.Properties["ProcessorId"].Value.ToString();
managementObject.Dispose();
}
}
}
catch (Exception)
{
throw;
}
return text.ToString();
}
// Token: 0x06000067 RID: 103 RVA: 0x0000B9C8 File Offset: 0x00009BC8
public string GetHDid()
{
string text = "";
try
{
using (ManagementClass managementClass = new ManagementClass("Win32_DiskDrive"))
{
ManagementObjectCollection instances = managementClass.GetInstances();
foreach (ManagementBaseObject managementBaseObject in instances)
{
ManagementObject managementObject = (ManagementObject)managementBaseObject;
text = (string)managementObject.Properties["Model"].Value;
managementObject.Dispose();
}
}
}
catch (Exception)
{
throw;
}
return text.ToString();
}
// Token: 0x06000068 RID: 104 RVA: 0x0000BA8C File Offset: 0x00009C8C
public string GetMoAddress()
{
string text = "";
try
{
using (ManagementClass managementClass = new ManagementClass("Win32_NetworkAdapterConfiguration"))
{
ManagementObjectCollection instances = managementClass.GetInstances();
foreach (ManagementBaseObject managementBaseObject in instances)
{
ManagementObject managementObject = (ManagementObject)managementBaseObject;
bool flag = (bool)managementObject["IPEnabled"];
if (flag)
{
text = managementObject["MacAddress"].ToString();
}
managementObject.Dispose();
}
}
}
catch (Exception)
{
throw;
}
return text.ToString();
}
// Token: 0x04000085 RID: 133
private static MachineCode machineCode;
}
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new form1());
}
}
}
``````
//对话框处理函数
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace TS_MASTER注册机
{
public partial class form1 : Form
{
public form1()
{
InitializeComponent();
textBox1.Text = MachineCode.cksn(MachineCode.GetMachineCodeString());
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
}
}
```
OK-编译-链接-运行-一次通过,看看效果怎么样
完美通过:本文终------------》下片去喽
附上练手资源 https://www.lanzoux.com/iDxeqeg23rc
本帖最后由 逍遥一仙 于 2020-7-10 07:42 编辑
话说我这个不好用吗https://www.52pojie.cn/thread-1216473-1-1.html 逍遥一仙 发表于 2020-7-9 11:24
话说我这个不好用吗 https://www.52pojie.cn/thread-785996-1-1.html (下载链接无法打开的话,就把下载链 ...
太好用了{:301_993:} 这个好感谢分享 逍遥一仙 发表于 2020-7-9 11:24
话说我这个不好用吗 https://www.52pojie.cn/thread-785996-1-1.html
新版本增加了自动识别本地缓存路径 ...
呀,我忘记去论坛上找了。。。。。百度上软件少得可怜 逍遥一仙 发表于 2020-7-9 11:24
话说我这个不好用吗 https://www.52pojie.cn/thread-785996-1-1.html (下载链接无法打开的话,就把下载链 ...
很好用,很不错 早有这个软件不就好了! 好起来了 太好用了{:1_893:}