Advertisement
Spocoman

Stupid Password Generator

Oct 7th, 2023 (edited)
1,359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function stupidPasswordGenerator(input) {
  2.     let n = Number(input[0]);
  3.     let l = Number(input[1]);
  4.     let output = "";
  5.  
  6.     for (let a = 1; a <= n; a++) {
  7.         for (let b = 1; b <= n; b++) {
  8.             for (let c = 97; c < 97 + l; c++) {
  9.                 for (let d = 97; d < 97 + l; d++) {
  10.                     for (let e = Math.max(a, b) + 1; e <= n; e++) {
  11.                         output += `${a}${b}${String.fromCharCode(c)}${String.fromCharCode(d)}${e} `;
  12.                     }
  13.                 }
  14.             }
  15.         }
  16.     }
  17.  
  18.     console.log(output);
  19.     return;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement