-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdecrypt.js
More file actions
26 lines (21 loc) · 903 Bytes
/
decrypt.js
File metadata and controls
26 lines (21 loc) · 903 Bytes
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
const CryptoJS = require('crypto-js');
// The secret key from the superadminAuth.ts file
const SECRET_KEY = '7a1f6b5c8d3e2a4f0';
// Encrypted credentials from the superadminAuth.ts file
const ENCRYPTED_EMAIL = 'U2FsdGVkX1+ZF+CVgJ8XqtJsR5/btO9d8BwEqOc/QiPtKQPqHj5TBs+JCc0eZmKx';
const ENCRYPTED_PASSWORD = 'U2FsdGVkX1/5ySxJv8KJbFzqIX9ycZOLkqyLMtxF/4YyXjbdRU52QQWyNDwJUTlT';
// Function to decrypt the credentials
const decryptCredential = (encryptedValue) => {
try {
const bytes = CryptoJS.AES.decrypt(encryptedValue, SECRET_KEY);
return bytes.toString(CryptoJS.enc.Utf8);
} catch (error) {
console.error('Decryption error:', error);
return '';
}
};
// Decrypt and print credentials
const email = decryptCredential(ENCRYPTED_EMAIL);
const password = decryptCredential(ENCRYPTED_PASSWORD);
console.log('Superadmin Email:', email);
console.log('Superadmin Password:', password);