Advertisement
Guest User

Untitled

a guest
Feb 17th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. const request = require('request');
  2. const naglowki = require('./naglowki.json');
  3.  
  4. function czas(){
  5. var data = Date.now() / 1000;
  6. return Math.round(data*100)/100;
  7. }
  8.  
  9. var token = 0;
  10. var ev = 0;
  11.  
  12. function sendZap(a,b,callback){
  13.  
  14. var options = {
  15. uri: "http://telawel.margonem.pl/engine?t="+a+"&aid=8840913",
  16. method: "POST",
  17. headers: naglowki
  18. }
  19.  
  20. request(options, function (error, response, body){
  21.  
  22. var seba = JSON.parse(body);
  23. console.log(seba);
  24.  
  25. if(b==1337){
  26. token = seba.browser_token;
  27. }
  28.  
  29. if (typeof callback === "function") {
  30. callback();
  31. }
  32. } );
  33.  
  34. }
  35. sendZap("init&initlvl=1&clientTs="+czas()+"&mucka="+Math.random(),1337,()=>{
  36. sendZap("init&initlvl=2&mucka="+Math.random()+"&browser_token="+token,2,()=>{
  37. sendZap("init&initlvl=3&mucka="+Math.random()+"&browser_token="+token,2,()=>{
  38. sendZap("init&initlvl=4&mucka="+Math.random()+"&browser_token="+token,2,()=>{
  39.  
  40. });
  41. });
  42. });
  43. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement