PluginProbe
UpdraftPlus: WP Backup & Migration Plugin / 1.0.6
UpdraftPlus: WP Backup & Migration Plugin v1.0.6
1.26.7 1.26.6 1.26.5 1.26.4 1.26.3 1.9.19 1.9.25 1.9.26 1.9.30 1.9.31 1.9.32 1.9.4 1.9.40 1.9.41 1.9.42 1.9.43 1.9.44 1.9.45 1.9.46 1.9.5 1.9.50 1.9.51 1.9.60 1.9.62 1.9.63 All 371 releases
updraftplus / example-decrypt.php

example-decrypt.php in UpdraftPlus: WP Backup & Migration Plugin 1.0.6, at example-decrypt.php

42 lines 977 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4
5 To dump the decrypted file using the given key on stdout, call:
6
7 rijndael_decrypt_file( '../path/to/file.crypt' , 'mykey' );
8
9 Thus, here are the easy instructions:
10
11 1) Add a line like the above into this PHP file (not inside these comments, but outside)
12 e.g.
13 rijndael_decrypt_file( '/home/myself/myfile.crypt' , 'MYKEY' );
14
15 2) Run this file (and make sure that includes/Rijndael.php is available, if you are moving this file around)
16 e.g.
17 php /home/myself/example-decrypt.php >output.sql.gz
18
19 3) You may then want to gunzip the resulting file to have a standard SQL file.
20 e.g.
21 gunzip output.sql.gz
22
23 */
24
25 function rijndael_decrypt_file($file, $key) {
26
27 require_once(dirname(__FILE__).'/includes/Rijndael.php');
28
29 $rijndael = new Crypt_Rijndael();
30 $rijndael->setKey($key);
31 $in_handle = fopen($file,'r');
32 $ciphertext = "";
33 while (!feof ($in_handle)) {
34 $ciphertext .= fread($in_handle, 16384);
35 }
36 fclose ($in_handle);
37 print $rijndael->decrypt($ciphertext);
38
39 }
40
41 ?>
42