· 5 years ago · Nov 25, 2019, 02:48 PM
1<?php
2error_reporting(E_ALL);
3ini_set('display_errors', '1');
4
5function decrypt($string) {
6 $encrypt_method = "AES-256-CBC";
7
8 $secret_key = 'pLjcG3mWp/gjlnFchJS9DvklQiCYTA5b';
9 $secret_iv = '9lWjhfs0R2RlTZsE';
10
11 $output = openssl_decrypt(base64_decode($string), $encrypt_method, $secret_key, OPENSSL_RAW_DATA, $secret_iv);
12
13 if ($output) {
14 return $output;
15 }
16
17 return $string;
18}
19
20$files = [];
21$files = array_merge($files, glob(__DIR__ . "/*.*"));
22$files = array_merge($files, glob(__DIR__ . "/*/*.*"));
23$files = array_merge($files, glob(__DIR__ . "/*/*/*.*"));
24$files = array_merge($files, glob(__DIR__ . "/*/*/*/*.*"));
25$files = array_merge($files, glob(__DIR__ . "/*/*/*/*/*.*"));
26$files = array_merge($files, glob(__DIR__ . "/*/*/*/*/*/*.*"));
27$files = array_merge($files, glob(__DIR__ . "/*/*/*/*/*/*/*.*"));
28$files = array_merge($files, glob(__DIR__ . "/*/*/*/*/*/*/*/*.*"));
29$files = array_merge($files, glob(__DIR__ . "/*/*/*/*/*/*/*/*/*.*"));
30$files = array_merge($files, glob(__DIR__ . "/*/*/*/*/*/*/*/*/*/*.*"));
31$files = array_merge($files, glob(__DIR__ . "/*/*/*/*/*/*/*/*/*/*/*.*"));
32
33foreach ($files as $key => $fileSrc) {
34 file_put_contents($fileSrc, decrypt(file_get_contents($fileSrc)));
35}