Hased passwords for samp
#1

I get my passwords for registerd people in hash how can I fix it? to normal letters?
Reply
#2

remove the hashing functions..

we cant help without script.
Reply
#3

Quote:
Originally Posted by Dare Devil.....
Посмотреть сообщение
I get my passwords for registerd people in hash how can I fix it? to normal letters?
Why do you actually want to remove that? Seems kind of weird to me to remove security premeasurements.
Reply
#4

well here is the script
pawn Код:
{
    switch (dialogid)
    {
        case 1: // Register
        {
            if(!response) {
                SendClientMessage(playerid, COLOR_GREY,"    Thanks for coming...");
                Kick(playerid);
            }
            else if(response) {
                if(!strlen(inputtext)) return ShowDialog(playerid, 1, DIALOG_PASS, "Hi there, Welcome to College ", "Hello new citizen!\n\nWelcome to Supernatural College, where crime doesn't pay.\nPlease register.", "Register", "Exit");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File, "Password", udb_hash(inputtext));
                INI_WriteInt(File, "Admin", 0);
                INI_WriteInt(File, "Origin", 0);
                INI_WriteInt(File, "Gender", 0);
                INI_WriteInt(File, "Age", 0);
                INI_WriteFloat(File, "sPosX", 194.485778);
                INI_WriteFloat(File, "sPosY", 1103.993408);
                INI_WriteFloat(File, "sPosZ", 16.347635);
                INI_WriteFloat(File, "sPosA", 30.403614);
                INI_WriteFloat(File, "sHealth", 100);
                INI_WriteFloat(File, "sArmor", 0);
                INI_WriteInt(File, "Money", 2000);
                INI_WriteInt(File, "BankBalance", 20000);
                INI_WriteInt(File, "BankPin", 0);
                INI_WriteInt(File, "Cellphone", 0);
                INI_WriteInt(File, "HouseID", 0);
                INI_WriteInt(File, "CarID", 0);
                INI_WriteInt(File, "Gun1", 0);
                INI_WriteInt(File, "Gun2", 0);
                INI_WriteInt(File, "Gun3", 0);
                INI_WriteInt(File, "Gun4", 0);
                INI_WriteInt(File, "Gun5", 0);
                INI_WriteInt(File, "Gun6", 0);
                INI_WriteInt(File, "Gun7", 0);
                INI_WriteInt(File, "Gun8", 0);
                INI_WriteInt(File, "Gun9", 0);
                INI_WriteInt(File, "Gun10", 0);
                INI_WriteInt(File, "Gun11", 0);
                INI_WriteInt(File, "Gun12", 0);
                INI_WriteInt(File, "Gun13", 0);
                INI_WriteInt(File, "WTChannel", 0);
                INI_WriteInt(File, "Faction", 0);
                INI_WriteInt(File, "FLeader", 0);
                INI_WriteInt(File, "Job", 0);
                INI_WriteInt(File, "sInterior", 0);
                INI_WriteInt(File, "sVW", 0);
                INI_WriteInt(File, "Skin", 1);
                INI_WriteInt(File, "Muted", 0);
                INI_WriteInt(File, "nMute", 0);
                INI_WriteInt(File, "Helper", 0);
                INI_WriteInt(File, "Developer", 0);
                INI_WriteInt(File, "Wolf",0);
                INI_WriteInt(File, "RentingID", 0);
                INI_Close(File);
                INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                ResetPlayerMoney(playerid);
                GivePlayerMoney(playerid, PlayerInfo[playerid][Money]);
                ClearScreen(playerid);
                SendClientMessage(playerid, COLOR_WHITE, "Principal: Thank you for registering in our College.");
                SendClientMessage(playerid, COLOR_WHITE, "We now require you to fill out some basic identification!");
                SetPlayerCameraPos(playerid, -2828.9058,-397.5271,7.1875);
                SetPlayerCameraLookAt(playerid, -2828.9058,-397.5271,7.1875);
                SetPlayerVirtualWorld(playerid, 0);
                ShowDialog(playerid, 3, DIALOG_INFO, "College Identification", "Are you a male or female?", "Male", "Female");
            }
            return 1;
        }
        case 2: //Login
        {
            if(!response) {
                SendClientMessage(playerid, COLOR_LIGHTRED, "    Come back soon...");
                Kick(playerid);
            }
            if(response) {
                if(udb_hash(inputtext) == PlayerInfo[playerid][Password])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    SetPlayerHealth(playerid, PlayerInfo[playerid][sHealth]);
                    SetPlayerArmour(playerid, PlayerInfo[playerid][sArmor]);
                    ResetPlayerMoney(playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][Money]);
                    ClearScreen(playerid);
                    SendClientMessage(playerid, COLOR_WHITE, "SERVER: You've logged into College Of Supernatural Roleplay.");
                    SetSpawnInfo(playerid, 0, 0,-2828.9058,-397.5271,7.1875,357.3467, 0, 0, 0, 0, 0, 0);
                    SpawnPlayer(playerid);
                }
                else {
                    SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: Incorrect password. Kicked, please try again!");
                    Kick(playerid);
                }
            }
            return 1;
        }
I think thats enuff
Reply
#5

Код:
                INI_WriteInt(File, "Password", udb_hash(inputtext));
There's the hashing function, I'd recemend you to keep it, why should someone be able to see the players passwords?
anyway this is the non hashed password putin:
Код:
                INI_WriteInt(File, "Password", inputtext);
Hope I helped ^^
Reply
#6

If you change that at the registration form, you also need to remove it from the login form.
Reply
#7

Quote:
Originally Posted by Dare Devil.....
Посмотреть сообщение
I get my passwords for registerd people in hash how can I fix it? to normal letters?
There's absolutely NO reason for why you would do that... If you need to compare passwords for f.ex. for logging in players, hash the password the player sends to the server (in /login f.ex) and use strcmp to compare that against the one stored in the db.
Reply
#8

Removing the hashed passwords is invading the registered players privacy. I suggest you leave that function in the script to keep it secure. Why would you want to remove that anyway ? That would be wrong looking at other peoples passwords.. Your choice.
Reply
#9

Thats my choice what passwords info to keep for my server you better can help so do it or fuck off.
Reply
#10

Quote:
Originally Posted by Dare Devil.....
Посмотреть сообщение
Thats my choice what passwords info to keep for my server you better can help so do it or fuck off.
He is right why would you want to see there passwords? and no need to swear at him he is just pointing out a good fact!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)