Jump to content

Pistolebob

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by Pistolebob

  1. Hmm.

    When a player logins:

    function performLogin( source, token, isPasswordAuth, ip ) 
        if source and ( isPasswordAuth or not triedTokenAuth[ source ] ) then 
            triedTokenAuth[ source ] = true 
            if token then 
                if #token == 80 then 
                    local info = exports.sql:query_assoc_single( "SELECT userID, username, banned, activationCode, SUBSTRING(LOWER(SHA1(CONCAT(userName,SHA1(CONCAT(password,salt))))),1,30) AS salts, userOptions FROM wcf1_user WHERE CONCAT(SHA1(CONCAT(username, '%s')),SHA1(CONCAT(salt, SHA1(CONCAT('%s',SHA1(CONCAT(salt, SHA1(CONCAT(username, SHA1(password)))))))))) = '%s' LIMIT 1", getPlayerHash( source, ip ), getPlayerHash( source, ip ), token ) 
                    p[ source ] = nil 
                    if not info then 
                        if isPasswordAuth then 
                            triggerClientEvent( source, getResourceName( resource ) .. ":loginResult", source, 1 ) -- Wrong username/password 
                        end 
                        return false 
    

    You could let them login with PHP, and then takes the SHA1 hash of the password, then compare it to the hash value in the MySQL database.

  2. -- generate a salt (SHA1)

      
    local salt = '' 
    local chars = { 'a', 'b', 'c', 'd', 'e', 'f', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } 
    for i = 1, 40 do 
    salt = salt .. chars[ math.random( 1, #chars ) ] 
    end 
    

    And then it does this:

      
    exports.sql:query_free( "INSERT INTO wcf1_user (username,salt,password) VALUES ('%s', '%s', SHA1(CONCAT('%s', SHA1(CONCAT('%s', '" .. sha1( password ) .. "')))))", username, salt, salt, salt ) 
    

    So I think it stores the SHA1 hash of the password.

    Seems like the salt is random.....

  3. Don't add them to the ACL...

    Add them in the MySQL database to the administrators group.

    The 'wcf1_user_to_groups' table.

    And yes you probably DID use character names, not account names.

    It looks like your account name is 'jamiem', not 'Jamie_Mews' or 'Jamie Mews'.

  4. he didnt say that he want to sell your script (if this was actually made by you, not by drake for you)

    He has FTP access to my server.

    2 days ago, I did make exactly this script.

    I'll just wait for a reply from drake.. :twisted:

  5. I can make it but not for free

    Donate some money.

    If you want help give me your script with error.

    What?

    You are selling him my script, that you get from my FTP?

  6. I'm also going to make a wanted level, I can post some code here when I get home.

    When someone enters a car, that he/she does not own, the script should setElementData (player, "wantedlevel", value) to the old value + 30 for example.

×
×
  • Create New...