Advertisement
Guest User

xxx

a guest
Jan 30th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. const fetch = require("node-fetch");
  2.  
  3. let b = 0;
  4.  
  5. async function aktivirajInternet() {
  6. let a = await fetch("http://10.5.50.1/login", {
  7. credentials: "omit",
  8. headers: {
  9. accept:
  10. "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
  11. "accept-language": "en-US,en;q=0.9",
  12. "cache-control": "max-age=0",
  13. "content-type": "application/x-www-form-urlencoded",
  14. "upgrade-insecure-requests": "1"
  15. },
  16. referrerPolicy: "no-referrer-when-downgrade",
  17. body: "username=username&password=password&dst=www.id-s.ba",
  18. method: "POST",
  19. mode: "cors"
  20. });
  21. console.log(a.status, b++);
  22. }
  23.  
  24. setInterval(() => {
  25. aktivirajInternet();
  26. }, 10000);
  27.  
  28. aktivirajInternet();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement