Repository: I2rys/opengen-bot Branch: main Commit: ace511e5cb3c Files: 3 Total size: 3.6 KB Directory structure: gitextract_9r_b4bsi/ ├── LICENSE ├── README.md └── index.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2022 I2rys Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # opengen-bot Generate Netflix, Spotify, NordVPN & Disney+ accounts. ## Installation Github: ``` git clone https://github.com/I2rys/opengen-bot ``` NpmJS: ``` npm i axios fs ``` ## Usage ``` node index.js ``` + accountType - The type of the account to generate. + amount - The amount of accounts to generate. + outputFile - The output file of the generated accounts. ## License MIT © I2rys ================================================ FILE: index.js ================================================ "use strict"; // Dependencies const axios = require("axios") const fs = require("fs") // Variables const args = process.argv.slice(2) var openGenBot = { grabIndex: 0, max: 0, results: [] } // Functions async function grab(accountType){ try{ if(openGenBot.grabIndex === openGenBot.max){ console.log(`Finished grabbing ${openGenBot.max} ${accountType} accounts.`) console.log(`Saving the results to ${args[2]}`) fs.writeFileSync(args[2], openGenBot.results.join("\n"), "utf8") return console.log(`Results successfully saved to ${args[2]}`) } console.log(`Grabbing ${accountType} accounts. Index: ${openGenBot.grabIndex}`) var response = await axios(`https://opengen.dpkghub.com/api/generate.php?type=${accountType}`) response = response.data if(openGenBot.results.includes(response)){ console.log(`Unable to grab ${accountType} account, due to duplicate/error. Index: ${openGenBot.grabIndex}`) console.log("Retrying...") return grab(accountType) } openGenBot.results.push(response) openGenBot.grabIndex++ grab(accountType) }catch{ console.log(`Unable to grab ${accountType} account, due to duplicate/error. Index: ${openGenBot.grabIndex}`) console.log("Retrying... Please wait for 2 seconds.") setTimeout(()=>{ grab(accountType) }, 2000) } } //Main if(!args.length) return console.log(`Account Types: Netflix, Spotify, NordVPN & Disney(Disney plus). node index.js `) if(isNaN(args[1])) return console.log("amount is not a number.") if(!args[2]) return console.log("Invalid output.") args[0] = args[0].toLowerCase() openGenBot.max = parseInt(args[1]) switch(args[0]){ case "netflix": grab("Netflix") break case "spotify": grab("Spotify") break case "nordvpn": grab("NordVPN") break case "disney": grab("Disney") break default: console.log("Invalid accountType.") break }