Basic Use
const provoker = require('provoker');
provoker.provoke(['Username:-', 'Password:-'], (results) => {
console.log(results);
process.exit();
});
The 'process.exit();' line
The process.exit(); line is extremely important since the function keeps running if you dont put it. Nothing runs after the function without causing distubance, so it is recommended to not use any other code post the function
Advanced use
If using for commands and more, It is recommended to create the main code in another file and export it as in the code below:
//File1(Or the function file)
const MainFunction = (results)=>{
console.log(results)
}
module.export = MainFunction
const provoker = require('provoker');
const MainFunction = require('./function')
provoker.provoke(['Username:-', 'Password:-'], (results) => {
MainFunction(results);
process.exit();
});