<?php /************************************************ PHP SOURCE CODE ENCRYPTER BY ReZEN of XORCREW WHAT IT DOES: Takes ANY php source file and encrypts it. You take the encrypter give it a file it then encrypts the file and spits out a new file with the encrypted source. When you try to access the new file your asked for a username and pass. You can use ANY username you want but the pass has to be the same password you used to encrypt it if you give it the right pass it then decrypts the file and you are able to access it. WHY YOUD USE IT: You would use this to hide any PHP tools on the server that you've hacked that you don't want other hackers to have access to. You could also use it to encrypt an entire forum so incase you do get hacked theyd have to know the password to even get to the config files. Anyways its just a cool tool. HAPPY VALENTINES DAY TO ALL MY VALENTINES BITCHES: ************************************************/ if(!isset($_POST['submit'])){ echo '<table><form action="'.$PHP_SELF.'" method="post">' .'<tr><td><b>File:</b></td><td><input name="file" type="text" size="38"></td></tr>' .'<tr><td><b>Password For File:</b></td><td><input name="auth" type="password" size="38"></td></tr>' .'<tr><td><input type="submit" name="submit" value="Encrypt It!"></form></td></tr></table>'; }else{ function easy_crypt($string, $key){ $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_CBC); $iv = mcrypt_create_iv($iv_size, MCRYPT_DEV_URANDOM); $string = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $string, MCRYPT_MODE_CBC, $iv); return array(base64_encode($string), base64_encode($iv)); } function easy_decrypt($cyph_arr, $key){ $out = mcrypt_decrypt(MCRYPT_BLOWFISH, $key, base64_decode($cyph_arr[0]), MCRYPT_MODE_CBC, base64_decode($cyph_arr[1])); return trim($out); } $file = $_POST['file']; $contents = file_get_contents($file); $contents = str_replace('<'.'?php','<'.'?',$contents); $contents = '?'.'>'.trim($contents).'<'.'?'; $code = $_POST['auth']; $pass = sha1($_POST['auth']); $cyph = easy_crypt($contents, $code); $source = " <?php function easy_decrypt($cyph_arr, $key){ $out = mcrypt_decrypt(MCRYPT_BLOWFISH, $key, base64_decode($cyph_arr[0]), MCRYPT_MODE_CBC, base64_decode($cyph_arr[1])); return trim($out); } if (!isset($_SERVER['PHP_AUTH_USER'])) { header('WWW-Authenticate: Basic realm="Encrypted File"'); header('HTTP/1.0 401 Unauthorized'); echo 'Maybe Next Time Skid.'; exit; }else{ $code = $_SERVER['PHP_AUTH_PW']; $cyph[0] = "".$cyph[0].""; $cyph[1] = "".$cyph[1].""; $dec_string = easy_decrypt($cyph, $code); eval($dec_string); } ?>
©2011, copyright BLACK BURN
Need add...
ReplyDelete$name = explode(".", $file);
$encfile = "enc-".$name[0].".php";
$f = fopen($encfile, 'w+') or die("Error!!");
fwrite($f, $source);
fclose($f);
echo "File ".$encfile." Encrypted Successfully!";