Re: How do I stop my software from getting cracked?



Why can they not just be changing the '!=' to a '==' not work? They're only
changing their own code so authorised account not working wouldn't be a
problem would it?

One of the things I like to do in my own code is use the registration
code/user ID/etc in as many places in the program as possible. Then after
they work around the need for registration the code is set up to crash on
invalid codes in various other methods.

For example, the code bellow is easily modified to not throw an exception
when 'RegID' is not correctly obtained from your registration process, but
the other uses of 'RegID' are not as easy to find in the first place. The
more places the registration code are used the harder it is to crack.

class Registration
{
static int RegID = 0;

public static void RegisterUser()
{
// Attempt to obtain a registration ID

// Fail registration if registration ID is invalid
if (RegID == 0) // EASILY WORKED AROUND
throw new Exception();
}

public static void SaveSettings()
{
if ((RegID & 16) != 16)
throw new Exception();
// Actually save data
}

public static void LoadSettings()
{
if (RegID < 125)
throw new Exception();
// Actually load settings
}
}

The crack isn't just to change the != to a ==, because otherwise
accounts that are authorized wouldn't work, and such is not the case.


.


Loading