Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var request = null;
- try {
- request = require('request');
- } catch (err){
- console.log("You need to install the request module: 'npm i request'.");
- process.exit();
- }
- const regex = /(\d{2,})/;
- var cookieString = 'lumerico=eyJpZCI6IjU2YTdhYjMzLWQ0YjAtNDY5Zi05ZmNlLTY1M2Y3ZDgyYTMwMiIsImF1dGhlbnRpY2F0ZWQiOnRydWUsInVzZXIiOnsidXNlcm5hbWUiOiJNSmltZW5leiIsInJvbGUiOiJhZG1pbiJ9LCJzdGVwIjo0LCJ1bmxvY2tlZCI6MX0=; lumerico.sig=l-TvvNXxlntAzdzcWqPkaXzy2f4';
- var firstOptions = {
- url: 'https://lumerico.mx/api/',
- headers: { Cookie: cookieString },
- json: {
- "jsonrpc": "2.0",
- "method": "exec",
- "params": ["payload"],
- "id": 1
- }
- };
- var secondOptions = {
- url: 'https://lumerico.mx/api/',
- headers: { Cookie: cookieString },
- json: {
- "method": "exec",
- "step": 4,
- "message": "Activation Code: ",
- "params": ["U2FsdGVkX1+vupppZksvRf5pq5g5XjFRIipRkwB0K1Y96Qsv2Lm+31cmzaAILwytX/z66ZVWEQM/ccf1g+9m5Ubu1+sit+A9cenDxxqkIaxbm4cMeh2oKhqIHhdaBKOi6XX2XDWpa6+P5o9MQw=="]
- }
- }
- request.post(firstOptions, commandSent);
- function commandSent(error, response, body) {
- request.post(secondOptions, codeSent);
- }
- function codeSent(error, response, body) {
- try {
- var message = response.body.result.message;
- console.log(regex.exec(message)[0]);
- } catch (error) {
- console.log("timeout (small error, should be back soon)");
- }
- request.post(firstOptions, commandSent);
- }
Add Comment
Please, Sign In to add comment