BackBox Indonesia

Full Version: Membuat password enc sendiri
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
PHP Code:
<?php
error_reporting
();
session_start();

$password "ec:550dfdef89bed03f550dfdef89bed03f"// 123

function login($key,$password){
$jum_key strlen($key);
$enc md5($key);
$jum_key substr(md5($jum_key),0,2);
$enc_1 substr($enc18);
$enc_2 substr($enc0,17);
$hasil "$jum_key:".substr(md5($enc_1),0,16).substr(md5($enc_1),0,16);
if(
$hasil==$password){
return 
true;
}else{
return 
false;
}
}

if(
$_POST['Passalt7']){
$cek login($_POST['password'],$password);
if(
$cek){
$_SESSION["login"]=$_POST['password'];
header('Location: ?');
}else{
echo 
"gagal";
}
}

if(!isset(
$_SESSION["login"])){
?>
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
</head>
<body>
<form action="" method="post">
<input type="text" name="password">
<input type="submit" name="Passalt7">
</form>
</body>
</html>
<?php
}else{
echo 
"HALOOO";
}
?>
di atas adalah salah satu password enc modifan yang di ambil dari enc md5 dan biasa di kreasikan lagi sesuai dengan suasana hati.