CrackMe® Practices for Newbies
PROJECT 6: caveman by Ghiribizzo

Re: checksum generator...
Thursday, 04-Mar-99 00:01:08

    Greetings snakebyte__

    In case you are interested, her is a liittle humble Qbasic checksum little program. It will generate the checksum for any name entered. It adds the "$" automatically so no need to confuse the operator with a "$" at the end. I did it all in basic without the use of assembly to show how thigs like this may be done in hier programing languages. The same approach should work in C. Take alook and let me know what you think. I have another version of the program which will generate the same checksum number for any name and it works with Caveman too.
    The program is below.

    Best regards,

    Joseph

    CLS
    INPUT "Enter your name"; name$
    name1$ = name$ + "$"
    namelen = LEN(name1$)
    ahx = 2 ^ 16
    alx = 2 ^ 8
    ax = 0
    FOR i = 1 TO namelen
    al = ASC(MID$(name1$, i, 1))
    all = al * &H100
    IF all > ahx THEN all = all MOD ahx
    ax = ax + all
    ax = ax + al
    IF ax > ahx THEN ax = ax MOD ahx
    FOR in = 1 TO 3
    ax = ax * 2
    IF ax > ahx THEN
    axo = INT(ax / ahx)
    axr = ax MOD ahx
    ax = axo + axr
    END IF
    NEXT in
    IF i < namelen THEN
    al = ax MOD &H100
    ax = ax - al
    END IF

    NEXT i
    CLS
    PRINT
    PRINT
    PRINT " This copy of CaveMan is registered to "; name$
    PRINT " The checksum number is: "; HEX$(ax)
    END



    Joseph


Message thread:

snakebyte's thread (snakebyte__@hotmail.com) (20-Feb-99 09:08:43)

Back to main board