This script will only function with the following requirements met:
PHP 5.3+
SQLSRV api e.g PHP Driver 3.0+
Properly configured IIS 7.5+
Basic Knowledge of HTML/PHP
I will not be answering any questions and anything posted here-in will be provided on an as-is basis with the knowledge that you may have to make adaptations to the script to suit your specific needs.
I will not be held responsible for any failure to commit security precautions on your part.
This script is not and will never be perfect, remember to keep up with current trend articles on PHP and website safety in-general.
Don't bicker about thinking your methods are better or whatever, I don't care, use it or don't.
This script was initially designed for a user control panel but can easily be adapted to use <form> input
First using your fav text editor and open a new text file as we will need to create our database config
Code:
<?php
$database_ip = "";
$database_name = "";
$database_user = "";
$database_pass = "";
$sql_error ="There has been a connection error, please check db_config";
$connectionInfo = array( "Database"=>"$database_name", "UID"=>"$database_user", "PWD"=>"$database_pass");
$connect = sqlsrv_connect( $database_ip, $connectionInfo) or die($sql_error);
?>
Copy and paste the info into your new blank file, edit as needed and save as db_config.php!
Now open another new text file and copy and paste the below contents into it, modify as needed
Now save this file as ck_curpw.php and open a new file in your text editor and copy the below into it:
Code:
<?php
//Start Session
session_start();
// Database Connection Information
include("db_config.php");
//Define Session Variables
$username = $_SESSION['username'];
$new_pass = $_SESSION['new_pwd'];
$fin_new_pass = $_SESSION['fin_new_pwd'];
//Change Password
$query = "UPDATE dbo.Accounts SET password = '$fin_new_pass' WHERE login_name = '$username'";
$exec_query = sqlsrv_query($connect, $query);
if(!$exec_query){
echo "Error! The query has failed to execute REF: exec_query";
exit;
}
else{
sqlsrv_query($connect, $query);
echo "Your password has been successfully changed! <br/>";
echo "Your new password is: $new_pass <br/>";
echo "Don't forget to copy your new password or write it down!'";
}
?>
Now save the above as exec_cnpw.php
This script comes from an older itteration of a Redemption website, I will not support it and if you can't get it working with google then you do not need to be using it in the first place, but for those with basic php knowledge, enjoy.
--Disclaimer-- All coding used in the above script is the sole creation of iSmokeDrow
If you think this should be stickied you should pm
I looked through the script and wondered why I had used a <form> in ck_ I originally had thought I made it an automatic pass-through (where $_SESSION would have been a better route) but seeing as there was a <form> in ck_ I simply attached the username/new_pwd/fin_new_pwd as invisible inputs so now they get passed with the $_POST method (Sorry I do not prefer $_GET) I have not tested the update I just mentioned! If you find an error due to changes in the ck_ file please contact me via pm.
The GET request is marginally less secure than the POST request. Neither offers true bank-grade security by itself; using POST requests will not magically make your website secure against malicious attacks by a noticeable amount. However, using GET requests can make an otherwise secure application insecure.
The mantra that you "must not use GET requests to make changes" is still very much valid, but this has little to do with malicious behaviour. Login forms are the ones most sensitive to being sent using the wrong request type.
The GET request is marginally less secure than the POST request.
You know you jsut have to download a plugin for FF or chrome and you can easy change the value of the POST data as i say POST = the same security than GET
Actually I remember now why I had originally chosen to go with the $_SESSION method, it was because the form I had in ck_ was a dev form only mean't to inform me that everything had occurred correctly. So I have edited ck_ to just switch header location after it sessions the data. As $_SESSION variables are much safer than either post/get in most scenarios especially when shifting variables between several scripts.
Quote:
Originally Posted by Stack Overflow
Indeed, (assuming sensibility on behalf of the web programmer) it couldn't. The data for $_SESSION is kept on the server itself, and it's looked up by a key stored as a cookie. There's no way to actually permute data in $_SESSION itself, but a user could possibly guess the session ID of another session and send the appropriate session cookie. But for all intents and purposes, to you (the web programmer), they'd be exactly the same as the other user, so it's not your responsibility to protect against them anyway. Firesheep
[RELEASE] Simple SQLSRV Registration 11/26/2012 - Rappelz Private Server - 4 Replies Warnings!
This script will only function with the following requirements met:
PHP 5.3+
SQLSRV api e.g PHP Driver 3.0+
Properly configured IIS 7.5+
Basic Knowledge of HTML/PHP
I will not be answering any questions and anything posted here-in will be provided on an as-is basis with the knowledge that you may have to make adaptations to the script to suit your specific needs.
[RELEASE]: SQLSRV Rappelz Website... 06/11/2012 - Rappelz Private Server - 1 Replies Thanks to the FUNENTRY team for releasing the previuos version of this web site, here you can find its sqlsrv version...
Microsoft SQLSRV TechNote
Since mssql is going to be deprecated... enjoy this.
With regards,
Ska...
Automatic Password Changer 10/16/2008 - General Coding - 4 Replies Hallo,
mir ist vor langem eine Idee für ein sehr nützliches Programm gekommen. Ich hoffe sowas gehört hier rein ;)
Wäre es möglich ein Programm zu Coden das sich automatisch auf die BLizzard Seite einloggt und das Password von meinem Account ändert`?
Sowas wäre sehr hilfreich um zB bei einem Acc tausch möglichst schnell das pw zu ändern ohne die Seite zu öffnen etc.
<3 Password and Info Changer <3 06/13/2007 - Conquer Online 2 - 8 Replies Hey Guys,
Ive just had a little 'Brain Fart'. I've got a 130 archer on Mausoleum server and of course i make RB's for the Gems and occasionally people buy the RB's. Now - instead of having to go to the Conquer Online website and change the password and info manually, i would like to have a program which will do it for me. I assume it will be similar to the account creation tool i've seen knocking around. If someone can give me a hand with this i'd be very greatful :-)
Vertigo~