Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.04 KB | None | 0 0
  1. :local iDebug "true"
  2. :local iFace "wlan1"
  3. :local gwId "WAG-D4-GBL"
  4. :local wlanId "PTPAT00014-N/TLK-CI-28687:HM"
  5. :local userId "bunga"
  6. :local passId "2105465154"
  7.  
  8. :if ($iDebug = "true") do={
  9.  :log error ("Auto Login Init")
  10.  :log error ("Release DHCP Client...")
  11. };
  12. /ip dns cache flush
  13. /ip dhcp-client release [find interface=$iFace];
  14. :delay 10
  15. :local ipAdd [/ip address get [/ip address find interface=$iFace] address];
  16. :local ipAddr [put [:pick $ipAdd 0 [:find $ipAdd "/"]]];
  17. :local macAddr [/interface wireless get [find default-name=$iFace] mac-address];
  18.  
  19. :local iUrl ("https://welcome2.wifi.id/wms/auth/authnew/autologin-free/quarantine.php\?ipc=$ipAddr&gw_id=$gwId&mac=$macAddr$redirect=&wlan=$wlanId");
  20. :local iData ("{\"username\": \"$macAddr@freeMS.pass\", \"password\": \"$passId\"}");
  21.  
  22. :if ($iDebug = "true") do={:log error ("Login...")};
  23. /tool fetch http-method=post url=("$iUrl") http-data=("$iData") http-header-field="content-type:application/json, user-agent:mozilla/5.0" keep-result=no
  24. :if ($iDebug = "true") do={:log error ("OK")};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement