alan216

Auto Login Wifi.id

Feb 28th, 2020
1,485
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. * system schedule auto login wifi.id komunitas dan regular *
  2.  
  3. - bikin system schedule
  4. - interval 00:00:30
  5. - sesuaikan parameternya
  6.  
  7. on even untuk regular wifi.id :
  8. :if ([/ping address=8.8.8.8 count=2] = 0) do={
  9. /ip dns cache flush
  10. /ip dhcp-client release [find interface=namainterfacewlan]
  11. log warning ("NEW DHCP CLIENT")
  12. delay 10
  13. log error ("@wifi.id is down --- trying to reconnect ......")
  14. :local ip [/ip address get [/ip address find interface="namainterfacewlan"] address];
  15. :local mac [/interface wireless get [ find default-name=namainterfacewlan ] mac-address];
  16. :local ip [put [:pick $ip 0 [:find $ip "/"]]];
  17. /tool fetch http-method=post http-data="username=isidenganusernamenya@spin2&password=isidenganpasswordnya" url=("https://welcome2.wifi.id/authnew/login/check_login.php\?ipc=$ip&gw_id=isidengangw_idparameter&client_mac=$mac&wlan=isidenganwlanparameter:%40wifi.id") keep-result=no;
  18. } else {
  19. log warning ("@wifi.id is UP")
  20. }
  21.  
  22. on event untuk wifi.id komunitas kampus :
  23. :if ([/ping address=8.8.8.8 count=2] = 0) do={
  24. /ip dns cache flush
  25. /ip dhcp-client release [find interface=namainterfacewlan]
  26. log warning ("NEW DHCP CLIENT")
  27. delay 10
  28. log error ("@wifi.id is down --- trying to reconnect ......")
  29. :local ip [/ip address get [/ip address find interface="namainterfacewlan"] address];
  30. :local mac [/interface wireless get [ find default-name=namainterfacewlan ] mac-address];
  31. :local ip [put [:pick $ip 0 [:find $ip "/"]]];
  32. /tool fetch http-method=post http-data="username=isidenganusernamenya@komunitas.ut&password=isidenganpasswordnya" url=("https://welcome2.wifi.id/authnew/login/check_login.php\?ipc=$ip&gw_id=isidengangw_idparameter&client_mac=$mac&wlan=isidenganwlanparameter:%40wifi.id") keep-result=no;
  33. } else {
  34. log warning ("@wifi.id is UP")
  35. }
  36.  
  37. on event WMS :
  38. :if ([/ping address=gatewaywms count=2] = 0) do={
  39. /ip dns cache flush
  40. /ip dhcp-client release [find interface=namainterfacewlan]
  41. log warning ("NEW DHCP CLIENT")
  42. delay 10
  43. log error ("@WMS is down --- trying to reconnect ......")
  44. :local ip [/ip address get [/ip address find interface="namainterfacewlan"] address];
  45. :local mac [/interface wireless get [ find name=namainterfacewlan ] mac-address];
  46. :local ip [put [:pick $ip 0 [:find $ip "/"]]];
  47. /tool fetch http-method=post http-data="username=isidenganusernamenya[titik]3digitrandom@freeMS&password=isidenganpasswordnya" url=("https://welcome2.wifi.id/wms/auth/authnew/autologin/quarantine.php\?ipc=$ip&gw_id=isidengangw_idparameter&client_mac=$mac&wlan=isidenganwlanparameter:VENUE%20WMS") keep-result=no;
  48. } else {
  49. log warning ("@WMS is UP")
  50. }
RAW Paste Data