Update README.md #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .github/workflows/main.yml | |
| name: Generate Username Lists | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: # Allows manual triggering | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Generate Username Lists | |
| run: | | |
| node -e ' | |
| const fs = require("fs"); | |
| // --- Data Sources (mirrors the HTML file) --- | |
| const firstNames = ["john", "david", "alex", "maria", "anna", "marco", "antonio", "daniel", "andrea", "laura", "ali", "jose", "sandra", "sara", "carlos", "michael", "jessica", "chris", "emily", "james", "robert", "mary", "linda"]; | |
| const lastNames = ["smith", "jones", "williams", "brown", "davis", "miller", "wilson", "moore", "taylor", "anderson", "thomas", "jackson", "white", "harris", "martin", "garcia", "martinez", "rodriguez", "lopez"]; | |
| const commonWords = ["shadow", "killer", "master", "dragon", "monkey", "sunshine", "baseball", "football", "gamer", "ninja", "warrior", "king", "queen", "wolf", "angel", "devil", "ghost", "hacker", "dream"]; | |
| const adjectives = ["cool", "happy", "dark", "epic", "silent", "super", "mad", "lazy", "lucky", "lone", "alpha", "omega", "red", "blue"]; | |
| const systemAndRole = ["admin", "root", "test", "user", "info", "sales", "support", "guest", "administrator", "billing", "marketing", "hr", "office", "webmaster", "postmaster", "contact", "manager"]; | |
| // --- Generator Functions --- | |
| function getRandomElement(arr) { | |
| return arr[Math.floor(Math.random() * arr.length)]; | |
| } | |
| function generateNameBased() { | |
| const fname = getRandomElement(firstNames); | |
| const lname = getRandomElement(lastNames); | |
| const pattern = Math.random(); | |
| const year = 1980 + Math.floor(Math.random() * 30); | |
| const num = Math.floor(Math.random() * 999); | |
| if (pattern < 0.25) return `${fname}${lname}`; | |
| if (pattern < 0.5) return `${fname}.${lname}`; | |
| if (pattern < 0.7) return `${fname}${lname}${year}`; | |
| if (pattern < 0.85) return `${fname.charAt(0)}${lname}`; | |
| return `${fname}${num}`; | |
| } | |
| function generateLexical() { | |
| const adj = getRandomElement(adjectives); | |
| const word = getRandomElement(commonWords); | |
| const num = Math.floor(Math.random() * 9999); | |
| const pattern = Math.random(); | |
| if (pattern < 0.4) return `${adj}${word}`; | |
| if (pattern < 0.8) return `${word}${num}`; | |
| return `${adj}${word}${num}`; | |
| } | |
| function generateNumeric() { | |
| const pattern = Math.random(); | |
| if (pattern < 0.33) return String(Math.floor(100000 + Math.random() * 900000)); | |
| if (pattern < 0.66) return ["123456", "123456789", "111111", "qwerty", "password"][Math.floor(Math.random() * 5)]; | |
| return "abc" + String(Math.floor(100 + Math.random() * 900)); | |
| } | |
| // --- Main Generation Logic --- | |
| function generateList(size) { | |
| const usernames = new Set(); | |
| while (usernames.size < size) { | |
| const randomChoice = Math.random(); | |
| let username; | |
| if (randomChoice < 0.45) username = generateNameBased(); | |
| else if (randomChoice < 0.85) username = generateLexical(); | |
| else if (randomChoice < 0.95) username = generateNumeric(); | |
| else username = getRandomElement(systemAndRole); | |
| usernames.add(username); | |
| } | |
| return Array.from(usernames).join("\n"); | |
| } | |
| console.log("Generating lists..."); | |
| fs.writeFileSync("usernames_small.txt", generateList(1000)); | |
| fs.writeFileSync("usernames_medium.txt", generateList(10000)); | |
| fs.writeFileSync("usernames_large.txt", generateList(100000)); | |
| console.log("Lists generated successfully."); | |
| ' | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: username-lists | |
| path: | | |
| usernames_small.txt | |
| usernames_medium.txt | |
| usernames_large.txt |