-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexperiments.js
31 lines (22 loc) · 923 Bytes
/
experiments.js
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
28
29
30
31
/* eslint-disable */
const md5 = require('./md5');
const toBase64 = (str) => Buffer.from(str, 'utf8').toString('base64');
const toUtf8 = (str) => Buffer.from(str, 'base64').toString('utf8');
const shift = (str, i) => str.split('').map(c => String.fromCharCode(c.charCodeAt(0) + i)).join('');
const test = (email, rsB64) => {
const md5Mail = md5(email);
const result = toUtf8(rsB64);
for (let i = 19500; i < 21700; i++) { // 20550; i < 20650
const val = shift(md5Mail, i);
if (val === result) return console.log('Found !', i);
console.log(i, val);
}
console.log(99999, result);
return;
};
test(
'5YOv5YK55YOu5YOo5YOs5YOi5YOi5YK+5YOt5YOt5YOq5YK/5YOq5YOs5YK+5YOi5YOi5YK45YOj5YOt5YK/5YOp5YOj5YOp5YOr5YOq5YOv5YK65YK/5YK95YOr5YK5',
);
// const TM = require('./main');
// const email1 = new TM('temp-email'); // It will create an address like "[email protected]"