Crack that code!!!!

Hi Everyone - :D,

Wonder if you can help - I have inherited a site written in php, and its giving some headaches - I am a basic programmer in visual and not php.

The site is old, and thinking of taking it down - but need to provide support for software still out there…problem is the site provided a registration code to each member to unlock the CDs…

The problem with the site at the moment is when I go to the register side of the website - and press continue (with any 8 digit and 4 digit) - I get a “Your request could not be fulfilled - Please try again”

The 8 digit is created by the program on install - the 4 digit is just a random on the CD box (but is not used to unlock).

SO 1st: attached is the code I am having problems with:

And 2nd: - Crack that code…
I understand by my basic php that the user entered 8 digit program code is *(3987654321/1000000000), and the additional numerics of 9900900 is used in the sequence.
Thereafter the sequence of numbers is arranged according to the code sequence attached -
I have been able to understand 90% of it, but numeric 15 I cannot find…

Here is some registration codes and unlock keys:

8-Digit code program Registration Code
12345678 2900360240999290
34175866 2300890431996590
61734518 1100770745996990
48578266 7300120893993390
54756367 3600430519998490
53815156 5300990616994290
18231813 7600070972992190
37526567 6700470542999990
86238468 8900890849993190
11626232 3900640341996390
65221876 0900850962990290

Thanks!!!


Register Code.php.txt (5.54 KB)

@Graham

Theirs nothing to crack, unless you’re trying to reverse engineer the Registration Code. From my understanding…

  1. Customers Buy a CD Box - That comes with an 8 digit code and an unlock code.
  2. Customers type that information into a website…
  3. The website spits out a registration code.
  4. The customer types that code in their new program that came with the CD Box and it unlocks…
  5. You want to replace the old registration screen with something else and I’m guessing it’s in VB.NET and that’s what you mean by “Visual”
  6. And what you really need is the PHP code you provided translated into VB.NET? And that’s what you mean by cracking the code?

Hi Topcoder -

You 100% correct with your analysis - I am trying to reverse engineer the registration code to provide support for the product when I close the website - thats it in a nutshell.

I am able to reverse 90% of the code - but 1 numeric keeps hunting me and the help I need to decipher the php to completely understand what I am missing…

So basically, what you are asking for is this…

[code]function getRegistrationCode(byval vEightDigitCode as integer, byVal vFourDigitCode as integer) as long

 dim lngRegistration code as long = 0

   'Coverted PHP algro to .Net 

 return lngRegistrationCode

end function
[/code]

Seems do-able, I don’t have the time right this second to attempt convert it. But, maybe if you post your 90% I can fill in the last 10% for you.

I am a .net Programmer :slight_smile:

CRACKED!!!

Very simple conversion, that PHP code did redundant stuff and had extra code it didn’t need. Below is the conversion for VB.NET.

[code]
Function getRegistrationCode(ByVal vEightDigitCode As Integer) As Long

    Dim lngRegistrationcode As Long = 0
    Dim input As Long = 0
    Dim icount As Integer = 0
    Dim strKey As String = ""
    Dim intHash As Integer = 0
    Dim strShuffle As String = ""

    input = Math.Floor(vEightDigitCode * (3987654321 / 1000000000))

    strKey = input.ToString.Substring(input.ToString.Length - 8)
    strKey += "9900900"

    For icount = 0 To strKey.Length - 1
        intHash = intHash + strKey.Substring(icount, 1)
    Next icount
    strKey += intHash.ToString.Substring(intHash.ToString.Length - 1)

    strShuffle += strKey.Substring(2, 1)
    strShuffle += strKey.Substring(6, 1)
    strShuffle += strKey.Substring(14, 1)
    strShuffle += strKey.Substring(3, 1)
    strShuffle += strKey.Substring(7, 1)
    strShuffle += strKey.Substring(11, 1)
    strShuffle += strKey.Substring(15, 1)
    strShuffle += strKey.Substring(0, 1)
    strShuffle += strKey.Substring(2, 1)
    strShuffle += strKey.Substring(4, 1)
    strShuffle += strKey.Substring(8, 1)
    strShuffle += strKey.Substring(12, 1)
    strShuffle += strKey.Substring(1, 1)
    strShuffle += strKey.Substring(5, 1)
    strShuffle += strKey.Substring(9, 1)
    strShuffle += strKey.Substring(13, 1)

    lngRegistrationcode = strShuffle

    Return lngRegistrationcode
End Function[/code]

Thats AWESOME!!!
Thank you ;D

The help was much appreciated.

Sponsor our Newsletter | Privacy Policy | Terms of Service