Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need help creating my first keygen for a CrackMe

Featured Replies

Posted

So I just cracked my first CrackMe and found out how the program computes the registration number and now I wanna write a keygen for it.


 


What program should I use to write the keygen and could anyine get me started on the code?


 


The algorithm the CrackMe uses to create the correct keygen is:


 


Get hex value of each letter in username


Add each letter in hex together


Multiply the value by 539


Output as decimal


 


Thanks to anyone who can help :)


VB .NET 2010



Public Class frmKeygen
Private name As String = ""
Dim character As Long = 0
Private sum As Integer Private Sub txtInput_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtInput.TextChanged
name = txtInput.Text
Try
For i = 0 To name.Length - 1
character = character + Asc(name.Substring(i, 1))
Next
character = character * 539
txtOutput.Text = character.ToString
Catch ex As Exception
MessageBox.Show("The result of multiplication is too high.", "Try less characters for the name.", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End Try End Sub
End Class

Project.7z

Keygen.7z

C# .Net 3.5 - Console App - compile with SharpDevelop/VisualStudio/MonoDevelop/...



using System;
using System.IO;
using System.Linq;
using System.Reflection; namespace Keygen
{
class Program
{
static void Main( string[] args )
{
if( args.Length == 0 )
{
string thisExe = Path.GetFileName( Assembly.GetExecutingAssembly().GetName().Name );
Console.WriteLine( "Use {0}.exe USERNAME", thisExe );
return;
} // first prog argument
string username = args[ 0 ]; // call/invoke Generate-Method
decimal key = Generate( username ); // show result, Output as decimal
Console.WriteLine( "Key: '{0}'", key );
} // easy to understand Method
static decimal Generate( string username )
{
decimal result = 0; //Get hex value of each letter in username
foreach( char letter in username )
{
//Add each letter in hex together
result = result + (byte)letter;
} //Multiply the value by 539
result = result * 539; return result;
} // pro variant
static decimal ProGenerate( string username )
{
return username.Aggregate<char, decimal>( 0, ( current, letter ) => current + (byte)letter ) * 539;
}
}
}

Howdy.
Did Someone Forget other none .NET Languages?

 

Here is one for Delphi 7 (this is just the function that generates the key)

function MakeMyKey(UserName: string): string;var  intCounter, intHolder: Integer;  strFinalKey: string;begin  if (Length(UserName) < 1) then  begin    ShowMessage('Hey Cutie, Don' + 't be ' + 'shy :(' + sLineBreak +      'Please give me a Name');  end  else  begin    intHolder := 0;    for intCounter := 1 to (Length(UserName)) do    begin      intHolder := intHolder + Ord(UserName[intCounter]);    end;    strFinalKey := IntToStr(intHolder * 539);    Form1.edtSerial.Text := strFinalKey;  end;end;

Attached is the Keygen and its Full Source.

 

Lukesc1993 Keygen.zipLukesc1993 Src.zip

Howdy.

Did Someone Forget other none .NET Languages?

 

Did you mean this?

#include <iostream>#include <string>using namespace std;int main(){    int suma, lungime;	string nume;	cout << "Simple translation to C++ by GIV\n";	cout << "Please enter your name: "<<endl;    cin >> nume;    lungime = nume.length();	suma = 0;for (unsigned int i = 0; i < nume.size(); i++){     suma += nume[i];}cout << "The final calculus is:"<<endl;		cout << suma*539 << endl;     system("pause");    return 0;}

C++.7z

Did someone forget about the non-high-level languages? ;)



Generate proc hWnd:HWND invoke GetDlgItemText, hWnd, IDC_NAME, addr NameBuffer, 17 ; Cap name length to 17
mov edi,offset NameBuffer
invoke lstrlen,edi
mov esi,eax
xor ecx,ecx
xor eax,eax cmp esi, 01h ; Jump if no name entered
jl BADERROR xor eax, eax
xor edx, edx @@: mov dl, byte ptr [NameBuffer + ecx]
add eax, edx inc ecx
cmp ecx, esi
jnz @b mov ecx, 21Bh ; 21Bh = 539d
mul ecx invoke wsprintf, addr SerialBuffer, addr FormatControl, eax
invoke SetDlgItemText, hWnd, IDC_SERIAL, addr SerialBuffer BADERROR: xor eax, eax
ret Generate endp

Lukesc1993.zip


Edited by Office Jesus

 Did someone forget about script language? :D:banana::worthy: :worthy: :worthy:



username = raw_input('Name -->')
serial = 0
for i in username:
serial+=ord(i)
serial*=539
print serial

keygen.py.tar.gz

Edited by Levis

So many options to choose from :cc_confused:


c610481b619b34f7d1fcc2e7c392d8359a396b2c


Why not AutoIT? lol



#include <MsgBoxConstants.au3> Example()
Func Example()
Local $i, $output
Local $Input = InputBox("Input","", "", "") For $i=0 to StringLen($input)
$output = $output + Asc(StringMid($input,$i,1))
Next $output = $output * 539 MsgBox($MB_SYSTEMMODAL, "", $output) EndFunc ;==>Example

I am to late.


No new code from my side


only a bit shorter ASM code of Office Jesus



Generate proc hWnd:HWND invoke GetDlgItemText, hWnd, IDC_NAME, addr NameBuffer, 17 ; Cap name length to 17
.if eax
lea edi, NameBuffer
xor eax,eax
and edx,0
.repeat
mov dl,byte ptr [edi]
add eax, edx
inc edi
.until byte ptr[edi] == 0
imul eax,eax,21Bh
invoke wsprintf, addr SerialBuffer, addr FormatControl, eax
invoke SetDlgItemText, hWnd, IDC_KEY, addr SerialBuffer
.endif ret Generate endp


of course it can be done shorter.


(btw. i was to lazy, so i used OfficeJesus own code snippet.)


 


@Lukesc1993 Crackme name?

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.