Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} catch (e){
console.log(e);
console.log("Login failed from cookie | Remove incorrect cookie".red);
return "removeCookie";
};
//Open DB
const adapter = new FileSync("./db/"+(process.env.IG_USERNAME).toLowerCase()+".json");
const db = low(adapter);
db.defaults({likes: [], follows: []}).write()
ig.shortid = shortid;
ig.db = db;
return ig;
}).catch(Api.IgCheckpointError, async () => {
console.log(ig.state.checkpoint);
await ig.challenge.auto(true); //Sms it was me
console.log(ig.state.checkpoint); //Challenge info here
let code = await inquirer.prompt([
{
type: 'input',
name: 'code',
message: 'Enter code',
},
]);
// Code is an object, lets parse the content
code = code.code;