GenerateInitialPassword.js
· 515 B · JavaScript
Неформатований
(function () {
let prefix = 'PassWord@!.'
let max = 9999
let printTimes = 30
for (let i = 0; i < printTimes; i++) {
let index = i + 1 < 10 ? `0${i + 1}` : `${i + 1}`
let random = Math.round(Math.random() * max + 999)
if (random > max) {
// console.log("leaked random", random)
random -= Math.round(random - max + Math.random() * 999)
// console.log("fixed random", random)
}
console.log(index, prefix + random)
}
})();
| 1 | (function () { |
| 2 | let prefix = 'PassWord@!.' |
| 3 | let max = 9999 |
| 4 | let printTimes = 30 |
| 5 | |
| 6 | for (let i = 0; i < printTimes; i++) { |
| 7 | let index = i + 1 < 10 ? `0${i + 1}` : `${i + 1}` |
| 8 | let random = Math.round(Math.random() * max + 999) |
| 9 | if (random > max) { |
| 10 | // console.log("leaked random", random) |
| 11 | random -= Math.round(random - max + Math.random() * 999) |
| 12 | // console.log("fixed random", random) |
| 13 | } |
| 14 | console.log(index, prefix + random) |
| 15 | } |
| 16 | })(); |