Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :local iDebug "true"
- :local iFace "wlan1"
- :local gwId "WAG-D4-GBL"
- :local wlanId "PTPAT00014-N/TLK-CI-28687:HM"
- :local userId "bunga"
- :local passId "2105465154"
- :if ($iDebug = "true") do={
- :log error ("Auto Login Init")
- :log error ("Release DHCP Client...")
- };
- /ip dns cache flush
- /ip dhcp-client release [find interface=$iFace];
- :delay 10
- :local ipAdd [/ip address get [/ip address find interface=$iFace] address];
- :local ipAddr [put [:pick $ipAdd 0 [:find $ipAdd "/"]]];
- :local macAddr [/interface wireless get [find default-name=$iFace] mac-address];
- :local iUrl ("https://welcome2.wifi.id/wms/auth/authnew/autologin-free/quarantine.php\?ipc=$ipAddr&gw_id=$gwId&mac=$macAddr$redirect=&wlan=$wlanId");
- :local iData ("{\"username\": \"$macAddr@freeMS.pass\", \"password\": \"$passId\"}");
- :if ($iDebug = "true") do={:log error ("Login...")};
- /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
- :if ($iDebug = "true") do={:log error ("OK")};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement