solved new crackme

This commit is contained in:
Chenx221 2024-10-03 15:54:24 +08:00
parent e9a07b6213
commit 27158a3940
Signed by: chenx221
GPG Key ID: D7A9EC07024C3021
15 changed files with 836 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,41 @@
ÛÛÛÛÛÛÛÛÛÛ» ÛÛÛ°» ÛÛÛÛÛÛÛ°» ÛÛÛ±»ÛÛÛÛ» ÛÛÛÛÛÛÛÛ°»
ÛÛÉÍÍÍÍÛÛÛÛ» ÈÍÍͼ ÛÛ°ÉÍÍÍÍͼ ÛÛÛ²ºÛÛÛÛº ÛÛ²ÉÍÍÛÛÛÛÛÛ»
ÛÛº ÛÛɼ ÛÛÛ» ÛÛ°º ÛÛÛÛÛÛÛÛÛÛº ÛÛÛÛÛÛÛÛ» ÛÛÛº ÛÛÛÉͼ
ÛÛÛÛÛÛÛÛÛÛ¹ ÛÛÛ²º ÛÛÛÛÛÛÛÛ°» ÛÛÛÛÛÛÛÛ°¼ ÛÛÛÛÛÛÛÛÛÛ» ÛÛÛº ÛÛÛÉͼ
ÛÛÉÍÍÍÍÍÛÛ¹ ÛÛÛº ÈÍÍ»ÛÛÛ°º ÛÛÛÉÍÛÛÛÛ»ÛÛÛÛ±ÉÍÛÛÛÛÛ» ÛÛÛÛÛÛÉͼ
ÛÛº ÛÛÛÛ» ÛÛÛº È»ÛÛÛº ÛÛ²º ÛÛÛ±º ÛÛÛÛÛÛÛÛÛÛɼ ÛÛÛÌÍͼ
ÛÛÛÛÛÛÛÛÛÛÉͼ ÛÛÛ°º ÛÛÛÛÛÛÛÛ°º ÛÛ±º ÛÛÛɼ ÛÉÛÛÛÛÛÛɼ ÛÛÛº
ÈÍÍÊÍÍÍÍÍͼ ÈÍÍͼ ÈÍÍÍÍÍÍÍͼ ÈÍͼ ÈÍͼ ȼÈÍÍÍÍͼ ÈÍͼ
-------------=================Presents=================-------------
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
º²²²±±±±±°°°°°°°°° BiSHoP's VB Crackme #5 °°°°°°°°°±±±±±²²²º
º²²²±±±±±°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°±±±±±²²²º
ÈÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍͼ
ÉÍÍÍÊÍÍÍ» ÉÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍ»
º01/7/00º º²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²º
ÈÍÍÍÍÍÍͼ º±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±º
ÈÍÍ» º
ºÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º
̹ Supplier: BiSHoP ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
ºÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ º
ºÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º
̹ Coder: BiSHoP ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
ºÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ º
ºÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º
̹ Packager: BiSHoP ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
ºÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ º
ºÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º
̹ Cracker: N/A ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
ºÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ º
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Content type:
[ ] Crack [ ] Patch [ ] Tutorial [ ] Program [ ] Serial [X] Crackme
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Greetz: DarkWolf, Acid_Cool_178, C_DKnight, Ac|dFusion,
Falcon, Mercution, ArKiS, Neo|mAn and to everybody in #c4n.
And gOOD LucK t0 LaZaRuS, who just retired from the scene!
-BiSHoP- BiSHoP_dRE@gmx.net

View File

@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"keygen3/1.0.0": {
"runtime": {
"keygen3.dll": {}
}
}
}
},
"libraries": {
"keygen3/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,19 @@
{
"runtimeOptions": {
"tfm": "net8.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "8.0.0"
}
],
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": true
}
}
}

View File

@ -0,0 +1,28 @@
BiSHoP's VB Crackme#5
Protection:
Name/Serial/Nag
Your goal:
Finding the serial takes less than 5 seconds but
you have to solve the algo and make a key generator.
And oh yeah, patch the nag.
If you cracked it,
send your solution to diablo337@hotmail.com
and include a tutorial or description on how
you cracked it. Good luck :)
About...
This is the first crackme coded in VB6 and I compiled
it in Native Code so you can use SmartCheck to debug
it, also I put labels in there to reveal the values
and that makes it 100% crackable using SmartCheck.
All you need is a brain!
Greetz: LaZaRuS, Dark_Wolf, Falcon, [AC_178], Mercution,
Ac|dFusion, C_DKnight, Dead-Mike, JACKnIRON, SoleSurvivor,
ArKiS, Neo|mAn and everyone in #cracking4newbies and
#cracking.uk on EFNet.
-BiSHoP- BiSHoP_dRE@gmx.net

View File

@ -0,0 +1,23 @@
跳过了这个作者好几个vb4的crackme因为太老了没工具...
1. 去NAG
```
102BC:00->01
1030C:01->00
```
2. Serial算法
```c#
long result = 0;
foreach (char c in name)
{
int ci = c;
result += ci * ci;
}
result += result * result;
```

View File

@ -0,0 +1,81 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35303.130
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "keygen1", "keygen1\keygen1.csproj", "{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "keygen2", "keygen2\keygen2.csproj", "{2446CB50-1882-4219-9DB0-E7F5517E6E20}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "keygen3", "keygen3\keygen3.csproj", "{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GiveMeSerial", "GiveMeSerial\GiveMeSerial.vcxproj", "{E3604156-7DF2-4B5F-AECA-64786B92F38C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DllInjector", "DllInjector\DllInjector.csproj", "{A5A24406-1296-457B-91A3-60E67511D807}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetSerial", "GetSerial\GetSerial.vcxproj", "{85044A5C-C4A3-4C79-9AD5-6895F61F8515}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|x64.ActiveCfg = Debug|Any CPU
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|x64.Build.0 = Debug|Any CPU
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|x86.ActiveCfg = Debug|x86
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|x86.Build.0 = Debug|x86
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|x64.ActiveCfg = Release|x64
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|x64.Build.0 = Release|x64
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|x86.ActiveCfg = Release|x86
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|x86.Build.0 = Release|x86
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|x64.ActiveCfg = Debug|x64
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|x64.Build.0 = Debug|x64
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|x86.ActiveCfg = Debug|x86
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|x86.Build.0 = Debug|x86
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|x64.ActiveCfg = Release|x64
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|x64.Build.0 = Release|x64
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|x86.ActiveCfg = Release|x86
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|x86.Build.0 = Release|x86
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|x64.ActiveCfg = Debug|Any CPU
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|x64.Build.0 = Debug|Any CPU
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|x86.ActiveCfg = Debug|x86
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|x86.Build.0 = Debug|x86
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|x64.ActiveCfg = Release|x64
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|x64.Build.0 = Release|x64
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|x86.ActiveCfg = Release|x86
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|x86.Build.0 = Release|x86
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|x64.ActiveCfg = Debug|x64
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|x64.Build.0 = Debug|x64
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|x86.ActiveCfg = Debug|Win32
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|x86.Build.0 = Debug|Win32
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|x64.ActiveCfg = Release|x64
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|x64.Build.0 = Release|x64
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|x86.ActiveCfg = Release|Win32
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|x86.Build.0 = Release|Win32
{A5A24406-1296-457B-91A3-60E67511D807}.Debug|x64.ActiveCfg = Debug|Any CPU
{A5A24406-1296-457B-91A3-60E67511D807}.Debug|x64.Build.0 = Debug|Any CPU
{A5A24406-1296-457B-91A3-60E67511D807}.Debug|x86.ActiveCfg = Debug|Any CPU
{A5A24406-1296-457B-91A3-60E67511D807}.Debug|x86.Build.0 = Debug|Any CPU
{A5A24406-1296-457B-91A3-60E67511D807}.Release|x64.ActiveCfg = Release|x64
{A5A24406-1296-457B-91A3-60E67511D807}.Release|x64.Build.0 = Release|x64
{A5A24406-1296-457B-91A3-60E67511D807}.Release|x86.ActiveCfg = Release|x86
{A5A24406-1296-457B-91A3-60E67511D807}.Release|x86.Build.0 = Release|x86
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|x64.ActiveCfg = Debug|x64
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|x64.Build.0 = Debug|x64
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|x86.ActiveCfg = Debug|Win32
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|x86.Build.0 = Debug|Win32
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|x64.ActiveCfg = Release|x64
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|x64.Build.0 = Release|x64
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|x86.ActiveCfg = Release|Win32
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {01ED3EE8-E89A-4A27-AF68-EF2490CB6BD7}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,185 @@
namespace keygen3
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
textBox1 = new TextBox();
button1 = new Button();
button2 = new Button();
label1 = new Label();
button3 = new Button();
label3 = new Label();
label4 = new Label();
textBox3 = new TextBox();
checkBox1 = new CheckBox();
button4 = new Button();
button5 = new Button();
SuspendLayout();
//
// textBox1
//
textBox1.Location = new Point(12, 31);
textBox1.Name = "textBox1";
textBox1.Size = new Size(256, 23);
textBox1.TabIndex = 0;
//
// button1
//
button1.Location = new Point(323, 12);
button1.Name = "button1";
button1.Size = new Size(115, 41);
button1.TabIndex = 1;
button1.Text = "Calculate Serial";
button1.UseVisualStyleBackColor = true;
button1.Click += Button1_Click;
//
// button2
//
button2.Location = new Point(323, 59);
button2.Name = "button2";
button2.Size = new Size(115, 42);
button2.TabIndex = 1;
button2.Text = "Generate Key File";
button2.UseVisualStyleBackColor = true;
button2.Visible = false;
button2.Click += Button2_Click;
//
// label1
//
label1.AutoSize = true;
label1.Location = new Point(12, 13);
label1.Name = "label1";
label1.Size = new Size(42, 15);
label1.TabIndex = 2;
label1.Text = "Name:";
//
// button3
//
button3.Location = new Point(323, 107);
button3.Name = "button3";
button3.Size = new Size(115, 41);
button3.TabIndex = 3;
button3.Text = "Restart as Admin";
button3.UseVisualStyleBackColor = true;
button3.Click += Button3_Click;
//
// label3
//
label3.AutoSize = true;
label3.Location = new Point(242, 133);
label3.Name = "label3";
label3.Size = new Size(74, 15);
label3.TabIndex = 6;
label3.Text = "By Chenx221";
//
// label4
//
label4.AutoSize = true;
label4.Location = new Point(12, 74);
label4.Name = "label4";
label4.Size = new Size(38, 15);
label4.TabIndex = 7;
label4.Text = "Serial:";
//
// textBox3
//
textBox3.Location = new Point(12, 92);
textBox3.Name = "textBox3";
textBox3.ReadOnly = true;
textBox3.Size = new Size(256, 23);
textBox3.TabIndex = 8;
//
// checkBox1
//
checkBox1.AutoSize = true;
checkBox1.Location = new Point(12, 132);
checkBox1.Name = "checkBox1";
checkBox1.Size = new Size(83, 19);
checkBox1.TabIndex = 9;
checkBox1.Text = "AutoMode";
checkBox1.UseVisualStyleBackColor = true;
//
// button4
//
button4.Location = new Point(274, 31);
button4.Name = "button4";
button4.Size = new Size(43, 23);
button4.TabIndex = 10;
button4.Text = "Copy";
button4.UseVisualStyleBackColor = true;
button4.Click += Button4_Click;
//
// button5
//
button5.Location = new Point(274, 92);
button5.Name = "button5";
button5.Size = new Size(43, 23);
button5.TabIndex = 11;
button5.Text = "Copy";
button5.UseVisualStyleBackColor = true;
button5.Click += Button5_Click;
//
// Form1
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(446, 156);
Controls.Add(button5);
Controls.Add(button4);
Controls.Add(checkBox1);
Controls.Add(textBox3);
Controls.Add(label4);
Controls.Add(label3);
Controls.Add(button3);
Controls.Add(label1);
Controls.Add(button2);
Controls.Add(button1);
Controls.Add(textBox1);
FormBorderStyle = FormBorderStyle.FixedSingle;
MaximizeBox = false;
Name = "Form1";
Text = "KeyGen For bishop_crackme_05";
ResumeLayout(false);
PerformLayout();
}
#endregion
private TextBox textBox1;
private Button button1;
private Button button2;
private Label label1;
private Button button3;
private Label label3;
private Label label4;
private TextBox textBox3;
private CheckBox checkBox1;
private Button button4;
private Button button5;
}
}

View File

@ -0,0 +1,285 @@
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Security.Principal;
using System.Text;
using System.Windows.Forms;
using System.Xml.Linq;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace keygen3
{
public partial class Form1 : Form
{
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
static extern IntPtr FindWindow(string? lpClassName, string lpWindowName);
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
private static extern bool EnumChildWindows(IntPtr hWndParent, EnumWindowsProc lpEnumFunc, IntPtr lParam);
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
static extern IntPtr GetDlgItem(IntPtr hDlg, int nIDDlgItem);
[DllImport("user32.dll", CharSet = CharSet.Unicode, SetLastError = false)]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, StringBuilder? lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
private static extern bool GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
private static extern bool GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
const uint WM_SETTEXT = 0x000C;
const uint BM_CLICK = 0x00F5;
private delegate bool EnumWindowsProc(IntPtr hwnd, IntPtr lParam);
public Form1()
{
InitializeComponent();
UpdateWindowTitle();
}
private void UpdateWindowTitle()
{
Text += IsRunningAsAdministrator() ? " (Admin)" : " (Non-Admin)";
button3.Enabled = !IsRunningAsAdministrator();
}
private static bool IsRunningAsAdministrator()
{
try
{
var identity = WindowsIdentity.GetCurrent();
var principal = new WindowsPrincipal(identity);
return principal.IsInRole(WindowsBuiltInRole.Administrator);
}
catch
{
return false;
}
}
private void Button1_Click(object sender, EventArgs e)
{
string name = textBox1.Text;
if (string.IsNullOrEmpty(name))
{
MessageBox.Show("Key不能为空");
return;
}
Generate(name);
}
private void Generate(string name)
{
//if (name.Length < 5)
//{
// MessageBox.Show("Name至少5位长度");
// return;
//}
//else if (name.Length > 0x14)
//{
// MessageBox.Show("Name最大长度为20");//不影响密钥验证,但这里还是加了这个限制
// return;
//}
if (name[0] == ' ')
{
MessageBox.Show("Name开头不能包含空格");
return;
}
string? key = GenerateKey(name);
if (string.IsNullOrEmpty(key))
{
MessageBox.Show("生成Key失败");
return;
}
textBox3.Text = key;
if (checkBox1.Checked) AutoMode(name, key);
}
private static string? GenerateKey(string name)
{
long result = 0;
foreach (char c in name)
{
int ci = c;
result += ci * ci;
}
result += result * result;
return result.ToString();
}
private static void SaveKeyFile(string name, string serial)
{
SaveFileDialog saveFileDialog = new()
{
FileName = "cm5.dat", // 固定文件名
Filter = "激活凭证 (*.dat)|*.dat", // 限制保存为.dat文件
Title = "请选择密钥文件的保存位置"
};
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
string filePath = saveFileDialog.FileName;
try
{
string result = $"{name}\r\n{serial}";
File.WriteAllText(filePath, result);
MessageBox.Show("文件保存成功!");
}
catch (UnauthorizedAccessException)
{
MessageBox.Show("保存文件失败,请尝试以管理员身份运行应用程序。");
}
catch (Exception ex)
{
MessageBox.Show($"保存文件失败: {ex.Message}");
}
}
}
private void Button2_Click(object sender, EventArgs e)
{
string name = textBox1.Text;
string key = textBox3.Text;
if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(key))
{
MessageBox.Show("请先计算密钥再生成key文件");
return;
}
SaveKeyFile(name, key);
}
private void Button3_Click(object sender, EventArgs e)
{
try
{
string exePath = Application.ExecutablePath;
var processInfo = new ProcessStartInfo
{
FileName = exePath,
UseShellExecute = true,
Verb = "runas",
Arguments = ""
};
Process.Start(processInfo);
Application.Exit();
}
catch (System.ComponentModel.Win32Exception)
{
MessageBox.Show("权限提升请求被拒绝。");
}
}
private static IntPtr[] childHandles = new IntPtr[10];
private static int childCount = 0;
private static bool EnumChildWindowsProc(IntPtr hwnd, IntPtr lParam)
{
if (childCount >= childHandles.Length)
return false; // Stop enumeration if the array is full
childHandles[childCount++] = hwnd;
return true; // Continue enumeration
}
private static void AutoMode(string username)
{
string windowTitle = "ABuggerCrackMe#2";
IntPtr hWnd = FindWindow(null, windowTitle);
if (hWnd == IntPtr.Zero)
{
MessageBox.Show("窗口未找到");
return;
}
//int usernameControlId = 0x402C4;
//int submitButtonId = 0x6028A;
//IntPtr usernameHwnd = GetDlgItem(hWnd, usernameControlId);
//IntPtr submitButtonHwnd = GetDlgItem(hWnd, submitButtonId);
//IntPtr usernameHwnd = FindWindowEx(hWnd, IntPtr.Zero, "Edit", string.Empty);
//IntPtr submitButtonHwnd = FindWindowEx(hWnd, IntPtr.Zero, "Button", string.Empty);
childCount = 0;
EnumChildWindows(hWnd, EnumChildWindowsProc, IntPtr.Zero);
if (childCount < 5)
{
MessageBox.Show("控件未找到");
return;
}
IntPtr usernameHwnd = childHandles[4];
IntPtr submitButtonHwnd = childHandles[3];
if (usernameHwnd == IntPtr.Zero || submitButtonHwnd == IntPtr.Zero)
{
MessageBox.Show("控件未找到");
return;
}
StringBuilder usernameToSet = new(username);
SendMessage(usernameHwnd, WM_SETTEXT, IntPtr.Zero, usernameToSet);
MessageBox.Show("请在稍后弹出的文件选框中选择C:\\CrackMes\\File文件");
SendMessage(submitButtonHwnd, BM_CLICK, IntPtr.Zero, IntPtr.Zero);
}
private static void AutoMode(string username, string key)
{
string windowTitle = "BiSHoP's VB Crackme #5";
IntPtr hWnd = FindWindow(null, windowTitle);
if (hWnd == IntPtr.Zero)
{
MessageBox.Show("窗口未找到");
return;
}
int usernameControlId = 0x5;
int serialControlId = 0x4;
int submitButtonId = 0x3;
IntPtr usernameHwnd = GetDlgItem(hWnd, usernameControlId);
IntPtr serialHwnd = GetDlgItem(hWnd, serialControlId);
IntPtr submitButtonHwnd = GetDlgItem(hWnd, submitButtonId);
if (usernameHwnd == IntPtr.Zero || serialHwnd == IntPtr.Zero || submitButtonHwnd == IntPtr.Zero)
{
MessageBox.Show("控件未找到");
return;
}
StringBuilder usernameToSet = new(username);
StringBuilder serialToSet = new(key);
SendMessage(usernameHwnd, WM_SETTEXT, IntPtr.Zero, usernameToSet);
SendMessage(serialHwnd, WM_SETTEXT, IntPtr.Zero, serialToSet);
SendMessage(submitButtonHwnd, BM_CLICK, IntPtr.Zero, IntPtr.Zero);
}
private void Button4_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(textBox1.Text))
{
Clipboard.SetText(textBox1.Text);
}
}
private void Button5_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(textBox3.Text))
{
Clipboard.SetText(textBox3.Text);
}
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,17 @@
namespace keygen3
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new Form1());
}
}
}

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<Platforms>AnyCPU;x86;x64</Platforms>
<Authors>chenx221</Authors>
<Company>chenx221</Company>
</PropertyGroup>
</Project>