Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as PHP by PHP ( 11 years ago )
<form method="post" acti>
<p>
<table width="851" border="0">
<tr>
<td width="176" height="24"><span class="style7">Judul</span></td>
<td width="28"><div align="center"><span class="style7"> : </span></div></td>
<td width="247"><input type="text" name="judul" value=""></td>
<td colspan="2" rowspan="5"> </td>
<td width="215" rowspan="5"> </td>
</tr>
<tr>
<td><span class="style7">Username</span></td>
<td><div align="center"><span class="style7"> : </span></div></td>
<td><input type="text" name="username" value=""></td>
</tr>
<tr>
<td height="24"><span class="style7">Password</span></td>
<td><div align="center"><span class="style7"> : </span></div></td>
<td><input type="text" name="password" value=""></td>
</tr>
<tr>
<td height="24"><span class="style7">Key</span></td>
<td><div align="center"><span class="style7"> : </span></div></td>
<td><input type="password" name="key" value=""></td>
</tr>
<tr>
<td height="30" colspan="2"><input type="submit" name="Submit" value="Simpan"></td>
<td><input type="button" value='Reset'></td>
</tr>
</table>
<p>
</form>
<?php
$dir = $_SESSION['id'];
if(isset($_POST) && !empty($_POST)){
$cipherKey = empty($_POST['key']) ? '' : $_POST['key'];
$judul = empty($_POST['judul']) ? '' : $_POST['judul'];
$username = empty($_POST['username']) ? '' : $_POST['username'];
$password = empty($_POST['password']) ? '' : $_POST['password'];
$namafile = $_POST['judul'];
include("DESAlgorithm.php");
$des = new DES($cipherKey);
$huruf = strlen($cipherKey);
if ($judul == "")
{
echo '[removed]
alert ("Isi Judul anda");
[removed]';
}
else if ($username == "")
{
echo '[removed]
alert ("Isi username anda");
[removed]';
}
else if ($password == "")
{
echo '[removed]
alert ("Isi password anda");
[removed]';
}
else if($cipherKey == "")
{
echo '[removed]
alert ("Key Masih Kosong, Masukkan Key ");
[removed]';
}
else if($huruf < 8)
{
echo '[removed]
alert ("Key kurang dari 8 Karakter");
[removed]';
}
else if (file_exists($dir."/".$namafile.".txt"))
{
echo '[removed]
alert ("Maaf,Judul Sudah Ada");
[removed]';
} else {
//$tgl_isi =date('d-m-y');
$file = @fopen($dir."/".$namafile.".txt","a");
$isinya = array("judul"=>$judul,"username"=>$username,"password"=>$password, "key"=>$cipherkey);
//enkrip aes
//$encryptedtext = encrypt("<b>judul : </b>".$judul." <b>username : </b>".$username." <b>password : </b>".$password."Key : ".$cipherKey, $cipherKey);
//$enrypted = xxtea_encrypt($isinya,$cipherKey);
$enrypted = $des->encrypt($isinya,$cipherKey);
$judul_encrypt = base64_encode($encrypted['judul']);
$username_encrypt = base64_encode($encrypted['username']);
$password_encrypt = base64_encode($encrypted['password']);
$key_encrypt = base64_encode($encrypted['key']);
$isinya_encrypt = array("judul"=>$judul_encrypt,"username"=>$username_encrypt,"password"=>$password_encrypt, "key"=>$key_encrypt);
fputs($file, base64_encode (json_encode($isinya_encrypt)));
fclose($file);
echo '[removed]
window. () { alert ("File Telah Tersimpan dan Terenkripsi");}
[removed]';
}
}
?>
Revise this Paste
Parent: 78747