User File #12882383957282529

Upload All User Files

#12882383957282529 - Password calculator for F-Zero: Maximum Velocity

FZMVname.lua
1040 downloads
Uploaded 2/23/2014 3:26 AM by FatRatKnight (see all 245)
Go into name entry. Run script. Mess around in there. Tells you what password for any name you input as you're messing around.
I left a few notes in the code, if you need them.
local R1u= memory.readbyte

local PassChar= "0123456789A?CEFHJKLMNPQRTVWXY=-+"

local BitPos= {
[0]=0x01,0x02,0x03,0x04,0x05,0x06,  -- Left digit picks the bit.
    0x07,0x08,0x09,0x40,0x42,0x32,  -- Right digit picks the character.
    0x22,0x12,0x30,0x43,0x33,0x23,
    0x13,0x20,0x44,0x34,0x24,0x14,
    0x10,0x45,0x35,0x25,0x15,0x00,
    0x46,0x36,0x26,0x16,0x41,0x47,
    0x37,0x27,0x17,0x31,0x48,0x38,
    0x28,0x18,0x21,0x49,0x39,0x29
}

local XORMasks= {
[0]=0x09,0x1F,0x07,0x14,0x1E,0x06,0x19,0x09,0x0A,0x1E,0x03,0x00
}

local pass= {}
--*****************************************************************************
local function BasicHUD()
--*****************************************************************************
    for i= 0, 11 do pass[i]= 0 end
    for i= 0, 7 do
        local v= R1u(0x03002FF8+i)-0x20
        gui.text(0,i*7,string.format("%2X",v))

        for b= 0,5 do
            local n= BitPos[i*6+b]
            local c= n%16
            n= math.floor(n/16)

            local val= bit.band(bit.rshift(v,5-b),1)

            val= bit.lshift(val,n)
            pass[c]= bit.bor(pass[c],val)
        end
    end
    for i= 0, 11 do
        local c= bit.bxor(pass[i],XORMasks[i]) + 1
        gui.text(20+4*i,0,string.sub(PassChar,c,c))
    end

end
gui.register(BasicHUD)

--[[
   01234567 89ABCDEF

00 #!    &'     ,-./    Some info about the value of the name entry
10 01234567 89     ?    characters available. The # represents the
20  ABCDEFG HIJKLMNO    actual space, while blank areas are unavailable.
30 PQRSTUVW XYZ    _


ABCDEFGHIJKL   A reminder of what name entry looks like.
MNOPQRSTUVWX
YZ!?,.-'&_ /   The <> just moves the cursor, not actual < > characters.
0123456789<>

ABCDEFGHIJKLMNOPQRSTUVWXYZ    A reminder of what the password entry looks like.
abcdefghijklmnopqrstuvwxyz
0123456789!"#$%&'()*+,-./:
;<=>?@[ ]&_'{|}~
]]--