Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Guides & Releases
You last visited: Today at 21:04

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[RELEASE] Secure PHP Web Change Password Script

Discussion on [RELEASE] Secure PHP Web Change Password Script within the Shaiya PServer Guides & Releases forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
abrasive's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 262
Received Thanks: 809
Thumbs up [RELEASE] Secure PHP Web Change Password Script

This is a secure password change script meant for Shaiya private servers.

I noticed a lot of private servers do not allow regular users to change passwords. Be warned, this script is a double-edged sword in a way, ESPECIALLY since most servers do not allow for password recovery via email or some other method. By implementing this script players who have shared their account credentials with other players can now get their password changed unknowingly (and thus their account is now "stolen"). It is up to you to determine how to handle this.

I put the CAPTCHA in this to prevent other players from using a bot to brute-force passwords from other accounts.

Also some error messages are purposely generic to prevent users from verifiably guess account names from this script.

I commented these scripts fairly verbosely, so please read the comments! They are meant to tell you useful stuff.

There are seven scripts you will need to make this work:
changepassword.php
changepassword.view.php
success.view.php
db.php
db.config.php
recaptchalib.config.php
recaptchalib.php (From Google: )

You can get success.view.php, db.php, db.config.php, recaptchalib.config.php, and recaptchalib.php from this post:

[changepassword.php] (Edit the SQL in this file if needed)

[changepassword.view.php] (Re-style the display in this file)
abrasive is offline  
Thanks
18 Users
Old 02/15/2011, 11:20   #2
 
ProfNerwosol's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 449
Received Thanks: 644
HINT:

Those willing to add password retrieval through email can use PHPMailer. It's a PHP script meant to send email without having to install SMTP servers and such.
ProfNerwosol is offline  
Thanks
1 User
Old 02/15/2011, 15:45   #3
 
nevak's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 69
Received Thanks: 49
Hi Abrasive! Thanks for this script, I really appreciate your work =)

I have a question regarding security: are the passwords (old and new) with this script sent to the server in plain text? If so, how risky is that?
I also read that client side password encrypting is not that useful since anyone with the encrypted password could use it if there are not other security measures server side...
How could we work around this? https?

Maybe I'm getting the point totally wrong, if so, please excuse me ^^

Cheers and thanks again =)
nevak is offline  
Old 02/15/2011, 16:53   #4
 
abrasive's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 262
Received Thanks: 809
Yes, it is sent in plain text, but someone would need to be on the same internal network as you or the server to be able to sniff your password. If they can do that, then they can probably sniff the password when you log into the game server anyways though.

Https would encrypt the password so it would not be sniffable, but I didn't think was worth the time investment to try to implement it. You can also encrypt the password with javascript before sending it to the server, but then if someone has javascript turned off, it will not work.

By "secure" in this context, I meant it was not vulnerable to SQL injection like so many other scripts.
abrasive is offline  
Old 11/08/2011, 00:53   #5
 
elite*gold: 0
Join Date: Aug 2011
Posts: 119
Received Thanks: 32
can you make a video tutorial of this plz ><?
benoli105 is offline  
Old 08/27/2013, 21:03   #6
 
ferrox1's Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 114
Received Thanks: 72
changing password error

Hey all anyone can help me when i tried to change pass at some acc i got this error
Fatal error: Call to undefined function mssql_escape_string() in C:\xampp\htdocs\reg\changepass.php on line 6

where is mistake
ferrox1 is offline  
Old 08/27/2013, 23:26   #7
 
castor4878's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 717
Received Thanks: 3,359
According to:
Code:
Fatal error: Call to [B]undefined function[/B] mssql_escape_string()
you are using an undefined function.

"mssql_escape_string" is a "mssql" function (!) and if it is undefined it is because you don't load the mssql module (!).

to repeat myself, XAMPP can be a nice tool when the user knows why he's using it and how to use it (it then allows portable installation, and so easy setup of an illimited number of configurations).
but when it is used "because it's easy", "because I can't spend 10mn to read the guide" or any other (bad) reason that leads to not know or try to understand what has been installed, it's a bad tool.

the mistake is your setup.
castor4878 is offline  
Old 08/27/2013, 23:57   #8
 
ferrox1's Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 114
Received Thanks: 72
Castor but other my scripts as register or pvp ranks working fine and only passwordchange don't working
ferrox1 is offline  
Old 08/28/2013, 05:13   #9
 
castor4878's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 717
Received Thanks: 3,359
ok, error in "bla foo, line 6" let me think that it was the first mssql_xx function call.
if you have several pages that work fine with the mssql-wrapper-for-php, the module is (of course) installed.

the "mysql_escape_string" still exists in the MySQL module, but may be the equivalent function was removed from the mssql module; if the page generating the issue was posted 2 or 3 years ago it's more than certain, if it's a 2 months release, it's a bit puzzling...

you can provide your own function and rename all occurences to "mssql_escape_string" by your function's name. knowning that the sole purpose of these escape functions is to replace each single-quote by two-single-quote (not a double-quote), you will provide:

Code:
function my_escape_function($inStr){
   return str_replace("'", "''", $inStr);
}
castor4878 is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[RELEASE] Secure PHP Web Registration Script
10/08/2019 - Shaiya PServer Guides & Releases - 208 Replies
This is technically obsolete now, and I'd recommend using my newer script instead. This is a secure registration script meant for Shaiya private servers. I noticed a lot of private servers were using sandolkakos's registration script, which is very dangerous since it is vulnerable to SQL injection. Ideally your UserUID column in the table PS_UserData.dbo.Users_Master should be set to auto-increment. If this is not the case, you will need to adjust this script, or ideally fix your...
[Release] Secure BHop Script
08/08/2010 - Counter-Strike Hacks, Bots, Cheats & Exploits - 5 Replies
You can't get banned for using this Script because it's only presses the Space button = no injection into the game = No VAC Ban + it's secured. Btw it's an Private BHop script so when you leech it please give the credits. Info: How to use press "^" to start and "^" to stop Virus Scan:
[wanted Release] Change Password Script (with recapcha and working)
01/10/2010 - EO PServer Hosting - 7 Replies
well guys a lot of persones want this kind of script and here it is then it worked for me and now you can use it to and if i can ask please leave credits or give atleast a thank you for fixing it :P please note :
[Help]Change Password page Script
12/23/2009 - EO PServer Hosting - 0 Replies
Hi all, I need your help, to make a password change page script for my website .. who knows how to make it?
[REQUEST]change password script...
02/25/2009 - EO PServer Hosting - 14 Replies
hi can anyone post a script for changing password?



All times are GMT +2. The time now is 21:04.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.