source/Crypto.cs:
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace digimoto
{
public class Crypto
{
private class WinApi
{
private const int ALG_CLASS_HASH = 32768;
private const int ALG_TYPE_ANY = 0;
private const int ALG_CLASS_DATA_ENCRYPT = 24576;
private const int ALG_TYPE_STREAM = 2048;
private const int ALG_TYPE_BLOCK = 1536;
private const int ALG_SID_DES = 1;
private const int ALG_SID_RC4 = 1;
private const int ALG_SID_RC2 = 2;
private const int ALG_SID_MD5 = 3;
public const string MS_DEF_PROV = "Microsoft Base Cryptographic Provider
v1.0";
public const int PROV_RSA_FULL = 1;
public const int CRYPT_VERIFYCONTEXT = -268435456;
public const int CRYPT_EXPORTABLE = 1;
public readonly static int CALG_MD5 = 32771;
public readonly static int CALG_DES = 26113;
public readonly static int CALG_RC2 = 26114;
public readonly static int CALG_RC4 = 26625;
private const string CryptDll = "advapi32.dll";
private const string KernelDll = "kernel32.dll";
public const int FORMAT_MESSAGE_FROM_SYSTEM = 4096;
[DllImportAttribute("advapi32.dll")]
public static extern bool CryptAcquireContext(ref IntPtr phProv, st
ring pszContainer, string pszProvider, int dwProvType, int dwFlags);
[DllImportAttribute("advapi32.dll")]
public static extern bool CryptReleaseContext(IntPtr hProv, int dwF
lags);
[DllImportAttribute("advapi32.dll")]
public static extern bool CryptDeriveKey(IntPtr hProv, int Algid, IntPtr
hBaseData, int dwFlags, ref IntPtr phKey);
[DllImportAttribute("advapi32.dll")]
public static extern bool CryptCreateHash(IntPtr hProv, int Algid, IntPt
r hKey, int dwFlags, ref IntPtr phHash);
[DllImportAttribute("advapi32.dll")]
public static extern bool CryptHashData(IntPtr hHash, byte[] pbData, int
dwDataLen, int dwFlags);
[DllImportAttribute("advapi32.dll")]
public static extern bool CryptEncrypt(IntPtr hKey, IntPtr hHash, bool F
inal, int dwFlags, byte[] pbData, ref int pdwDataLen, int dwBufLen);
[DllImportAttribute("advapi32.dll")]
public static extern bool CryptDecrypt(IntPtr hKey, IntPtr hHash, bool F
inal, int dwFlags, byte[] pbData, ref int pdwDataLen);
[DllImportAttribute("advapi32.dll")]
public static extern bool CryptDestroyHash(IntPtr hHash);
[DllImportAttribute("advapi32.dll")]
public static extern bool CryptDestroyKey(IntPtr hKey);
[DllImportAttribute("kernel32.dll")]
public static extern int GetLastError();
[DllImportAttribute("kernel32.dll")]
public static extern int FormatMessage(int dwFlags, string lpSource, int
dwMessageId, int dwLanguageId, StringBuilder lpBuffer, int nSize, string[] Argu
ments);
}
private Crypto()
{
}
public static byte[] Encrypt(string passphrase, byte[] data)
{
byte[] bs1 = null;
IntPtr j = IntPtr.Zero;
IntPtr i1 = IntPtr.Zero;
try
{
if (!WinApi.CryptAcquireContext(ref j, null, "Microsoft Base Crypto
graphic Provider v1.0", 1, -268435456))
{
Failed("CryptAcquireContext");
}
i1 = GetCryptoKey(j, passphrase);
int i2 = data.Length;
int k = data.Length;
if (!WinApi.CryptEncrypt(i1, IntPtr.Zero, true, 0, null, ref i2, k))
{
Failed("CryptEncrypt");
}
bs1 = new byte[i2 - 1 + 1];
Buffer.BlockCopy(data, 0, bs1, 0, data.Length);
i2 = data.Length;
k = bs1.Length;
if (!WinApi.CryptEncrypt(i1, IntPtr.Zero, true, 0, bs1, ref i2,
k))
{
Failed("CryptEncrypt");
}
}
finally
{
if (!i1.Equals(IntPtr.Zero))
{
WinApi.CryptDestroyKey(i1);
}
if (!j.Equals(IntPtr.Zero))
{
WinApi.CryptReleaseContext(j, 0);
}
}
return bs1;
}
public static byte[] Decrypt(string passphrase, byte[] data)
{
byte[] bs2 = (byte[])data.Clone();
byte[] bs1 = null;
IntPtr j = IntPtr.Zero;
IntPtr i = IntPtr.Zero;
try
{
if (!WinApi.CryptAcquireContext(ref j, null, "Microsoft Base Crypto
graphic Provider v1.0", 1, -268435456))
{
Failed("CryptAcquireContext");
}
i = GetCryptoKey(j, passphrase);
int k = bs2.Length;
if (!WinApi.CryptDecrypt(i, IntPtr.Zero, true, 0, bs2, ref k))
{
Failed("CryptDecrypt");
}
bs1 = new byte[k - 1 + 1];
Buffer.BlockCopy(bs2, 0, bs1, 0, k);
}
finally
{
if (!i.Equals(IntPtr.Zero))
{
WinApi.CryptDestroyKey(i);
}
if (!j.Equals(IntPtr.Zero))
{
WinApi.CryptReleaseContext(j, 0);
}
}
return bs1;
}
private static IntPtr GetCryptoKey(IntPtr hProv, string passphrase)
{
IntPtr j = IntPtr.Zero;
IntPtr k = IntPtr.Zero;
try
{
if (!WinApi.CryptCreateHash(hProv, WinApi.CALG_MD5, IntPtr.Zero, 0, ref
j))
{
Failed("CryptCreateHash");
}
byte[] bs = Encoding.ASCII.GetBytes(passphrase);
if (!WinApi.CryptHashData(j, bs, bs.Length, 0))
{
Failed("CryptHashData");
}
if (!WinApi.CryptDeriveKey(hProv, WinApi.CALG_RC2, j, 1, ref k))
{
Failed("CryptDeriveKey");
}
}
finally
{
if (!j.Equals(IntPtr.Zero))
{
WinApi.CryptDestroyHash(j);
}
}
return k;
}
private static void Failed(string command)
{
System.Windows.Forms.MessageBox.Show(command);
}
}
}
source/Form1.cs:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using digimoto;
namespace digimoto
{
/// <summary>
/// Zusammenfassung für Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Erforderlich für die Windows Form-Designerunterstützung
//
InitializeComponent();
//
// TODO: Fügen Sie den Konstruktorcode nach dem Aufruf von InitializeComponen
t hinzu
//
}
/// <summary>
/// Die verwendeten Ressourcen bereinigen.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Vom Windows Form-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceMan
ager(typeof(Form1));
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.panel1 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.panel2 = new System.Windows.Forms.Panel();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fi
120;edSingle;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject
("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(5, 5);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(94, 302);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSize
Mode.AutoSize;
this.pictureBox1.TabIndex = 3;
this.pictureBox1.TabStop = false;
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSing
le;
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.textBox2);
this.panel1.Controls.Add(this.textBox1);
this.panel1.Location = new System.Drawing.Point(104, 5);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(224, 144);
this.panel1.TabIndex = 7;
//
// label2
//
this.label2.Location = new System.Drawing.Point(8, 64);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(100, 16);
this.label2.TabIndex = 11;
this.label2.Text = "LicenceKey";
//
// button1
//
this.button1.Location = new System.Drawing.Point(16, 104);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(192, 23);
this.button1.TabIndex = 10;
this.button1.Text = "Generate and copy to clip";
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(100, 16);
this.label1.TabIndex = 9;
this.label1.Text = "CustomerID";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(16, 80);
this.textBox2.Name = "textBox2";
this.textBox2.ReadOnly = true;
this.textBox2.Size = new System.Drawing.Size(192, 20);
this.textBox2.TabIndex = 8;
this.textBox2.Text = "";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(16, 32);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(192, 20
;);
this.textBox1.TabIndex = 7;
this.textBox1.Text = "Keygen by Ducky";
//
// panel2
//
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(this.label4);
this.panel2.Controls.Add(this.label3);
this.panel2.Location = new System.Drawing.Point(104, 155);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(224, 152);
this.panel2.TabIndex = 8;
//
// label3
//
this.label3.Font = new System.Drawing.Font("Times New Roman", 14.
25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing
.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)))
;
this.label3.Location = new System.Drawing.Point(24, 8);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(176, 24);
this.label3.TabIndex = 0;
this.label3.Text = "Digimoto 3.7 Keygen";
//
// label4
//
this.label4.Location = new System.Drawing.Point(0, 40);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(224, 88);
this.label4.TabIndex = 1;
this.label4.Text = "Digimoto is the ultimate solution for vehicle di
agnostics, dynamometer readings a" +
"nd statistical analysis. It uses the ELM32X Interface to read the vehic
le inform" +
"ations over OBD II";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(333, 312);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.pictureBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "Form1";
this.Text = "Digimoto 3.7 Keygen by Ducky";
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// Der Haupteinstiegspunkt für die Anwendung.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
public static string GetLicense(string PublicKey, string PrivateKey)
{
string str2 = string.Empty;
PublicKey = PublicKey.ToLower();
byte[] bs2 = new System.Text.ASCIIEncoding().GetBytes(PrivateKey);
byte[] bs1 = Crypto.Encrypt(PublicKey, bs2);
int i = 0;
do
{
string str3 = Convert.ToString(Convert.ToInt32(bs1[i]));
if (str3.Length == 0)
{
str3 = "000";
}
if (str3.Length == 1)
{
str3 = String.Concat("00", str3);
}
if (str3.Length == 2)
{
str3 = String.Concat("0", str3);
}
str2 = String.Concat(str2, str3);
i++;
}
while (i <= 7);
return KeyBuilder(str2);
}
public static string KeyBuilder(string License)
{
int[] nums = new int[25];
int j = 1;
do
{
nums[j - 1] = Convert.ToInt32(License.Substring(j-1, 1));
j++;
}
while (j <= 24);
string str4 = "";
j = 1;
do
{
str4 = String.Concat(str4, Convert.ToString(nums[j * 3 - 1]));
j++;
}
while (j <= 8);
string str2 = "";
j = 1;
do
{
int i = nums[j * 3 - 3] + nums[j * 3 - 2];
switch (i)
{
case 26:
str2 = String.Concat(str2, "b");
break;
case 27:
str2 = String.Concat(str2, "e");
break;
case 28:
str2 = String.Concat(str2, "l");
break;
case 29:
str2 = String.Concat(str2, "a");
break;
default:
str2 = String.Concat(str2, (char)(i + 65));
break;
}
j++;
}
while (j <= 8);
return String.Concat(str4, str2);
}
private void button1_Click(object sender, System.EventArgs e)
{
textBox2.Text = GetLicense(textBox1.Text,
34;digi36");
Clipboard.SetDataObject(textBox2.Text,true);
}
}
}
ducky.nfo:
╒════════════════════════════════════════════════════════════════════════╕
╞════════════════════════════════════════════════════════════════════════╡
│ │
│ Digimoto 3.7 Keygen │
│ │
│ úúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúú▄█▀úúúúúúúúúúúúúú │
│ ú ▀▀ ú │
│ ú supplier ú ducky file names ú digimoto.zip ú │
│ ú cracker ú ducky rls date ú may 13 2004
ú │
│ ú packed by ú ducky language ú english ú │
│ ú protection ú license platform ú winnt/2k/xp ú
│
│ ú rls type ú keyfilemaker disks ú 01 * 26mb ú
│
│ ú ú │
│ úúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúú │
│ │
╞══[ download ]══════════════════════════════════════════════════════════╡
│ │
│ URL:
http://www.d
igimoto.com │
│ │
╞══[ info ]══════════════════════════════════════════════════════════════╡
│ │
│ .NET Framework must be installed to run the keygen. if you install │
│ Digimoto, the framework will be installed too. │
│ │
╞══[ installation ]══════════════════════════════════════════════════════╡
│ │
│ start digimoto, run the keymaker, enter a CustomerID of your choice │
│ in lowercase letters, press the generate button. fill in your │
│ lowercase CustomerID in Digimoto and paste the Licence │
│ │
│ don't forget to buy this software if you liked it. │
│ │
╘════════════════════════════════════════════════════════════════════════╛