//include_once('func.php'); $title =@$_REQUEST['title']; $decrypted =@$_REQUEST['decrypted']; $url =@$_REQUEST['url']; $decryptedhidden =@$_REQUEST['decryptedhidden']; $encrypted =@$_REQUEST['encrypted']; $confirmation =@$_REQUEST['confirmation']; $submit =@$_REQUEST['submit']; $pw =@$_REQUEST['pw']; ?>
if ($pworig=='' & $submit=='Decrypt It') { echo "password not correct $decryptedorig ";} ?> function md5_encrypt($plain_text, $password, $iv_len = 16) { $plain_text .= "\x13"; $n = strlen($plain_text); if ($n % 16) $plain_text .= str_repeat("\0", 16 - ($n % 16)); $i = 0; $enc_text = get_rnd_iv($iv_len); $iv = substr($password ^ $enc_text, 0, 512); while ($i < $n) { $block = substr($plain_text, $i, 16) ^ pack('H*', md5($iv)); $enc_text .= $block; $iv = substr($block . $iv, 0, 512) ^ $password; $i += 16; } return base64_encode($enc_text); } function md5_decrypt($enc_text, $password, $iv_len = 16) { $enc_text = base64_decode($enc_text); $n = strlen($enc_text); $i = $iv_len; $plain_text = ''; $iv = substr($password ^ substr($enc_text, 0, $iv_len), 0, 512); while ($i < $n) { $block = substr($enc_text, $i, 16); $plain_text .= $block ^ pack('H*', md5($iv)); $iv = substr($block . $iv, 0, 512) ^ $password; $i += 16; } return preg_replace('/\\x13\\x00*$/', '', $plain_text); } function get_rnd_iv($iv_len) { $iv = ''; while ($iv_len-- > 0) {$iv .= chr(mt_rand() & 0xff);} return $iv; } ?>| ".$chr10."$title".$chr10; $line2=" | $encrypted$chr10$chr10";
// Loop through our array, show HTML source as HTML source; and line numbers too.
foreach ($lines as $line_num => $line) {
if ($bfound==2){$bfound=3;}
if ($line=="".chr(10)) {$bfound=2;}
if ($line=="".chr(10)) {$bfound=1;}
if ($bfound==1) {}
if ($bfound==2){if ($submit !='Delete It'){$thelines= $thelines.$line1.$line2;}}
if ($bfound==0 || $bfound==3) {$thelines= $thelines.$line;}
//echo "Line #{$line_num}$bfound$deleteit : " . htmlspecialchars($line) . " \n"; } if ($bfound==0){if ($deleteit !='y'){$thelines= $thelines.$line1.$line2.$line3;}} ?> if ($submit=='Encrypt It' || ($submit=='Delete It' & $bfound !=0)) { //echo $thelines; if ($pworig !='' || 1==12 || $bfound==0) { $fp = fopen('../decrypted.php', 'w'); // CHANGE THIS TO YOUR LOCAL PATH fwrite($fp, $thelines); fclose($fp); } else { if ($submit=='Encrypt It') { echo "please decrypt before reencrypting $decrypted || $decryptedorig || $pworig"; } else { echo "please decrypt before deleting $decrypted || $decryptedorig || $pworig"; } } } include('../decrypted.php'); // CHANGE THIS TO YOUR LOCAL PATH ?> |