├── README.md ├── LICENSE └── index.js /README.md: -------------------------------------------------------------------------------- 1 | # opengen-bot 2 | Generate Netflix, Spotify, NordVPN & Disney+ accounts. 3 | 4 | ## Installation 5 | Github: 6 | ``` 7 | git clone https://github.com/I2rys/opengen-bot 8 | ``` 9 | 10 | NpmJS: 11 | ``` 12 | npm i axios fs 13 | ``` 14 | 15 | ## Usage 16 | ``` 17 | node index.js 18 | ``` 19 | + accountType - The type of the account to generate. 20 | + amount - The amount of accounts to generate. 21 | + outputFile - The output file of the generated accounts. 22 | 23 | ## License 24 | MIT © I2rys -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2022 I2rys 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | // Dependencies 4 | const axios = require("axios") 5 | const fs = require("fs") 6 | 7 | // Variables 8 | const args = process.argv.slice(2) 9 | 10 | var openGenBot = { 11 | grabIndex: 0, 12 | max: 0, 13 | results: [] 14 | } 15 | 16 | // Functions 17 | async function grab(accountType){ 18 | try{ 19 | if(openGenBot.grabIndex === openGenBot.max){ 20 | console.log(`Finished grabbing ${openGenBot.max} ${accountType} accounts.`) 21 | console.log(`Saving the results to ${args[2]}`) 22 | fs.writeFileSync(args[2], openGenBot.results.join("\n"), "utf8") 23 | return console.log(`Results successfully saved to ${args[2]}`) 24 | } 25 | 26 | console.log(`Grabbing ${accountType} accounts. Index: ${openGenBot.grabIndex}`) 27 | 28 | var response = await axios(`https://opengen.dpkghub.com/api/generate.php?type=${accountType}`) 29 | response = response.data 30 | 31 | if(openGenBot.results.includes(response)){ 32 | console.log(`Unable to grab ${accountType} account, due to duplicate/error. Index: ${openGenBot.grabIndex}`) 33 | console.log("Retrying...") 34 | return grab(accountType) 35 | } 36 | 37 | openGenBot.results.push(response) 38 | 39 | openGenBot.grabIndex++ 40 | grab(accountType) 41 | }catch{ 42 | console.log(`Unable to grab ${accountType} account, due to duplicate/error. Index: ${openGenBot.grabIndex}`) 43 | console.log("Retrying... Please wait for 2 seconds.") 44 | 45 | setTimeout(()=>{ 46 | grab(accountType) 47 | }, 2000) 48 | } 49 | } 50 | 51 | //Main 52 | if(!args.length) return console.log(`Account Types: Netflix, Spotify, NordVPN & Disney(Disney plus). 53 | node index.js `) 54 | 55 | if(isNaN(args[1])) return console.log("amount is not a number.") 56 | if(!args[2]) return console.log("Invalid output.") 57 | 58 | args[0] = args[0].toLowerCase() 59 | openGenBot.max = parseInt(args[1]) 60 | 61 | switch(args[0]){ 62 | case "netflix": 63 | grab("Netflix") 64 | break 65 | case "spotify": 66 | grab("Spotify") 67 | break 68 | case "nordvpn": 69 | grab("NordVPN") 70 | break 71 | case "disney": 72 | grab("Disney") 73 | break 74 | default: 75 | console.log("Invalid accountType.") 76 | break 77 | } --------------------------------------------------------------------------------