Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Dekaron > Dekaron Private Server
You last visited: Today at 06:13

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

Advertisement



[RELEASE] Simple login Script (with anti SQL inject)

Discussion on [RELEASE] Simple login Script (with anti SQL inject) within the Dekaron Private Server forum part of the Dekaron category.

Reply
 
Old   #1
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
[RELEASE] Simple login Script (with anti SQL inject)

Just a simple login script, nothing fancy about it,
but added with Anti SQL inject !

DO NOT USE THIS SCRIPT!

if you got a error, please reply with a error code
have fun !
@Mod this is not a double topic, its 2 different scripts so ... to prevent any confusion
@Everyone THIS IS MADE FOR DEKARON SO IAM POSTING IN THE RIGHT SECTION
janvier123 is offline  
Thanks
4 Users
Old 02/08/2010, 12:00   #2
 
gedimazs's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 863
Received Thanks: 197
you can make reg page with anti SQL injection
gedimazs is offline  
Old 02/08/2010, 12:06   #3
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
sure

EDIT:
tested and working
janvier123 is offline  
Thanks
3 Users
Old 08/08/2012, 20:23   #4
 
elite*gold: 0
Join Date: Aug 2009
Posts: 367
Received Thanks: 309
Hello janvier123 i need your help.
O.k lets me explain ( sorry for my bad language )
i have my own site ( I made it in Dreamweaver )
So i wanna insert a that login script
but they have much bugs lets me shows main orginal page:

and there is pic bugged ? can u fix it or explain me why this apear?
Problem pic:
Hesorio1u is offline  
Old 08/08/2012, 21:34   #5
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
what are you using as webserver ?
janvier123 is offline  
Old 08/09/2012, 00:21   #6
 
elite*gold: 0
Join Date: Aug 2009
Posts: 367
Received Thanks: 309
Currectly i'm using a xampp. While i finish the website .i'll do public.
Hesorio1u is offline  
Old 08/09/2012, 07:40   #7
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
i think you did not save the file as ".php"
janvier123 is offline  
Old 08/09/2012, 15:02   #8
 
elite*gold: 0
Join Date: Aug 2009
Posts: 367
Received Thanks: 309
I HAVE ALL FILES
Hesorio1u is offline  
Old 08/13/2012, 22:39   #9
 
elite*gold: 0
Join Date: Aug 2009
Posts: 367
Received Thanks: 309
hey javnier. u got Deathfront time script ?
Hesorio1u is offline  
Old 08/28/2013, 19:39   #10
 
elite*gold: 0
Join Date: Feb 2009
Posts: 2
Received Thanks: 0
i get this error code
Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\register.php on line 12
Scythey is offline  
Old 10/30/2014, 14:37   #11
 
elite*gold: 0
Join Date: Nov 2011
Posts: 84
Received Thanks: 1
true.. me too! at line 12
akosicamar2 is offline  
Old 10/30/2014, 16:21   #12
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,854
Received Thanks: 1,891
)
janvier123 is offline  
Thanks
1 User
Old 10/30/2014, 18:17   #13
 
elite*gold: 0
Join Date: Oct 2011
Posts: 149
Received Thanks: 34
Quote:
Originally Posted by Scythey View Post
i get this error code
Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\register.php on line 12
Line 12:
Code:
$CONFIG['conn']  = mssql_connect( $CONFIG['host'], $CONFIG['user'], $CONFIG['pass']);
Okay so what we have here is a array, the array is called CONFIG, the config has different stuff in it, for example $CONFIG['host'].

Think of an array as a box and you can put different stuff in it, and to access those stuff you need to specify it such as $CONFIG <- the box.
And the item you want for example $CONFIG['brain'], and if we take a closer look at your problems which i assume is HOST USER & PASS

They are being set at the top of the page.

$CONFIG['host'] = "localhost";
$CONFIG['user'] = "sa";
$CONFIG['pass'] = "server";


But the problem is not within the code its because you don't have the
right version of php or dll, since the code does not know how to read the function mssql_connect. this brings is to Janvier123's let me google that for you. I assume your too lazy to read but if you are, i found a youtube clip that might help you.


DONT FORGET TO THANK Janvier123!
DONT FORGET TO THANK Janvier123!
DONT FORGET TO THANK Janvier123!
DONT FORGET TO THANK Janvier123!
DONT FORGET TO THANK Janvier123!

I added some css to it, just in case someone is still working on their main website and wanna use the script meanwhile.



Code:
<style type="text/css">
* {
    padding: 0;
    margin: 0;
}

body {
    background-color: #444;
}

.big {
    width: 500px;
    padding: 10px;
    margin-top: 5px;
    border-radius: 2px;
    border: none;
}

.button {
    width: 150px;
    padding: 10px;
    margin-left: 175px;
    margin-top: 5px;
    border-radius: 3px;
    border: none;
}

fieldset {
    width: 500px;
    padding: 10px;
    margin: auto;
    margin-top: 200px;
}

legend {
    color: white;
    font-family: helvetica;
    font-size: 20px;
}

a {
    text-decoration: underline;
    color: white;

}

</style>
<?php
/*echo 'Current PHP version: ' . phpversion();
// Edit your mssql info here
// BEGIN MSSQL INFO
$CONFIG['host'] = "localhost";
$CONFIG['user'] = "sa";
$CONFIG['pass'] = "server";
// END MSSQL INFO

//----------------------------- DO NOT EDIT ANYTHING BELOW HERE !!!!! ------------------------------------

$CONFIG['conn']  = mssql_connect( $CONFIG['host'], $CONFIG['user'], $CONFIG['pass']);

function anti_injection($sql) {
   $sql = preg_replace(sql_regcase("/(from|select|insert|delete|where|drop table|show tables|#|\*|--|\\\\)/"),"",$sql);
   $sql = trim($sql);
   $sql = strip_tags($sql);
   $sql = addslashes($sql);
   return $sql;
}
//----------------------------------------------------------------------------------------------------------

if(isset($_GET['action']) && ($_GET['action'] == "login")){

    $user = anti_injection($_POST['user']);
    $pass = anti_injection($_POST['pass']);
    $crypt_pass = md5($pass);
        
    $result1 = mssql_query("SELECT * FROM account.dbo.user_profile WHERE user_id = '".$user."'"); 
    $count1 = mssql_num_rows($result1); 

    $result2 = mssql_query("SELECT user_pwd FROM account.dbo.user_profile WHERE user_id = '".$user."'"); 
    $row2 = mssql_fetch_row($result2); 

    if($count1 == '0') {
        echo '<br>This game account is not found in the database.';
    }
    elseif($row2[0] != $crypt_pass) {
        echo '<br>Wrong password. Try again.';
    }
    elseif($_GET['login'] != 'login' && $count1 == '0') {
        echo '<br>Login Error, Please login again.';
    } else {
    
    // Begin secure content 
        $_SESSION['user'] = $user;
        echo "<h3>Welcome, ".$_SESSION['user']."</h3>";
        echo "<br>";
        echo "Your content here";
    // Dont forget to and your session
    // session_destroy();
    // End secure content
    }
} else {
  */
echo '<fieldset><legend>Login By <a href="http://www.elitepvpers.com/forum/dekaron-private-server/452255-release-simple-login-script-anti-sql-inject.html">Janvier123</a></legend></br>
    <form name="" action="'.$_SERVER['php_self'].'?action=login" method="post"> 
        <input class="big" type="text" name="user" maxlength="16" placeholder="Username"><br /> 
        <input class="big" type="password" name="pass" maxlength="16" placeholder="Password"> <br />
        <input class="button" type="submit" value="Login!"> 
    </form></fieldset>';
//}
?>
fastswipe is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
[RELEASE] Register Script (with anti SQL inject)
07/16/2014 - Dekaron Private Server - 19 Replies
Register script with Anti SQL inject, no ODBC ! DO NOT USE THIS SCRIPT! Have fun :)
[RELEASE] Simple login Script (with anti SQL inject and reCAPATCHA)
07/01/2010 - Dekaron Private Server - 6 Replies
login.php (you can change the name) DO NOT USE THIS SCRIPT! if you got a error, please reply with a error code have fun ! @Mod this is not a double topic, its 2 different scripts so ... to prevent any confusion :) @Everyone THIS IS MADE FOR DEKARON SO IAM POSTING IN THE RIGHT SECTION :bandit:
[Release]12sky2 Simple Bot script Works for ALL versions so far :)
06/03/2010 - 12Sky2 Hacks, Bots, Cheats & Exploits - 5 Replies
12sky2 Simple Bot script Works for ALL versions so far :) It is just a script so it is small and is in a exe form and u click run the script it should open either winrar or zip-7 or your rar opener and run the script for u Hotkeys will be on the exe and more info is also in the .exe file Please thank if you have any questions post :) Link:http://www.megaupload.com/?d=36LQDXEO
[Release] Simple CoEmu V2 - Registration Script
03/07/2010 - CO2 PServer Guides & Releases - 39 Replies
http://i42.tinypic.com/1qlcnd.png Download Simply open settings.php and edit it to your settings, and it'll run smoothly.



All times are GMT +1. The time now is 06:13.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.