RMX OS Password crypting

Started by RazorBlack, October 18, 2014, 02:18:54 pm

Previous topic - Next topic

RazorBlack

Do exist any easy way to turn off crypting in RMX OS? Becouse i've done small registration script in php but that crypting ;|

Soulshaker3

Instead of turning off just crypt the passwords like RMX - OS does... there must be the code somewhere in there
Hellow?

RazorBlack

Even if i find it for sure i won't be able to do anything with this. Can someone be very nice to me and say me what i need to insert in my code

Spoiler: ShowHide
<?php

if($_GET['sk']=='adduser')
{
echo "<div style='border:1px solid silver;background:#FFFFCC;'>";
echo "<div style='margin-left:10px;margin-right:10px;margin-top:2px:margin-bottom:5px'>";
echo "<div style='border:1px solid silver;background:#CCCCCC;'>";
echo "<div style='margin-left:10px;margin-right:10px;margin-top:2px:margin-bottom:5px'>";
echo "<b>Registration</b>";
echo "</div>";
echo "</div>";
echo "<div style='margin-top:5px;'></div>";


if(!isset($_GET['a']))
{
echo "<form action='rej.php?sk=adduser&a=insert' method='POST' />";
echo "<table>";
echo "<tr>";
echo "<td>";
echo "Username";
echo "</td>";
echo "<td>";
echo "<input type='text' name='username' id='username' >";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "Password";
echo "</td>";
echo "<td>";
echo "<input type='password' id='password' name='password' />";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan='2'>";
echo "<input type='submit' value='Register'>";
echo "</td>";
echo "</tr>";
echo "</table>";

echo "</form>";

}
else if($_GET['a']=='insert')
{
$username = $_POST['username'];
$password = $_POST['password'];




@mysql_query("insert into users set username='$username', password='$password'") or die ("Error<a href='rej.php?sk=adduser'><button>Back</button></a>");
echo "Succesfull!";
echo "<a href='index.php'><button>Continue</button></a>";
}
}

?>

Soulshaker3

Why are you using "echo" on every html tag why don't you just open <html> and <body> in the whole document? Also never worked with RMX-OS but the encryptation must be there somehwere, wait for the awnser of a more informed person of RMX-OS
Hellow?

Blizzard

Uhm, you seriously shouldn't disable this encryption. It literally prevents 99.9% of all noob hackers to get your users' passwords. Every freaking idiot with any network listening tool will be able to hack the accounts of any of your users if you disable this.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

I believe you just need to use the PHP "crypt()" method. It will crypt the passwords like Ruby does. Don't forget to remove the salt.

RazorBlack

Something like that?
$mdp = $_POST['password'];
$salt = 'XS';
$mdp = crypt($mdp, $salt);
$mdp = substr($mdp,2);

ForeverZer0

Are you trying to make a game that many will not want to play due to the security being taken away?
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

RazorBlack

It's something wrong with my last script?

G_G

Quote from: RazorBlack on October 19, 2014, 05:14:27 am
Something like that?
$mdp = $_POST['password'];
$salt = 'XS';
$mdp = crypt($mdp, $salt);
$mdp = substr($mdp,2);



Yes, if I remember right, that's what I used when I created my web registration system.

And what ForeverZer0 meant is that you'd be stupid to take out the security in your game. He's basically going off of what you requested in the first post.

RazorBlack

Ok, but now when I try to log in to account that I created on the web I've got disconnect

G_G

I ran into that same issue. You need to have PHP create some addition data in the database. I think it's under the table "player data". You have to put an entry in with the user id and a timestamp of any kind. I can't really remember, it's been ages since I've worked with RMX-OS.

RazorBlack

And now i don't know what i should do :/

Soulshaker3

I would help you if I had worked with RMX-OS before but study that table "player_data" and see what it does, you might find the awnser if you look closely
Hellow?

RazorBlack

I have no idea what should i do :|
Spoiler: ShowHide

G_G

In your PHP script, when you go to put the new player in the users table, you also need to add an entry to the "user_data" table.

RazorBlack


G_G

The same way you add new users into the "users" table. It doesn't sound like you're very familiar with PHP and MySQL which means it's going to make this difficult for you. When you add new data to the "users" tab, it'll return the user id that was injected since "user_id" is an auto increment if I recall correctly. You use that user id and insert a new row into "user_data". If you don't understand how to do this, then I think you need to look into PHP and MySQL a bit more before attempting to finish your web registration page.

RazorBlack

I think i will go and learn more about PHP and MySQL. Maybe then i will find solution.

Blizzard

Yes, you will have to learn some SQL. But all in all it's pretty simple. All you have to do is call crypt on the password and then call an SQL INSERT on that. (AYou might wanna check first if the username doesn't already exist though.)
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

RazorBlack

I know how to add data to "users" but I have problems with "user_data" now.

Blizzard

If you want, you can check the server code of RMX-OS. There you will see what default data is inserted when somebody is registered.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.