forked from itflow-org/itflow-misc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathITFlow Password Decryption Example.php
More file actions
27 lines (20 loc) · 1 KB
/
ITFlow Password Decryption Example.php
File metadata and controls
27 lines (20 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/*
* ###############################################################################################################
* ITFlow - Sample encrypted login (username/password) decryption code/tool
* ITFlow is distributed "as is" under the GPL License, WITHOUT WARRANTY OF ANY KIND.
* ###############################################################################################################
*/
// Specify your Master Encryption key here
// e.g. 'hITarkbAZgdW3WXz' - from /settings_backup.php
$site_encryption_master_key = '';
// Specify your encrypted username/password here from the login_username or login_password field
// e.g. "pI21VrOTAUnzEbwdozNOndql5BzRN08LHYvA7w=="
$full_ciphertext = '';
// Split ciphertext into IV and Ciphertext
$iv = substr($full_ciphertext, 0, 16);
$ciphertext = $salt = substr($full_ciphertext, 16);
// Decrypt
$decrypted_text = openssl_decrypt($ciphertext, 'aes-128-cbc', $site_encryption_master_key, 0, $iv);
// Show
echo "$decrypted_text";