0% found this document useful (0 votes)
47 views1 page

Script Wms

This document contains variables and commands for connecting a device to a WiFi network. It sets logging to true, identifies the wireless interface and network details like the gateway ID, WLAN ID, and user credentials. It flushes the DNS cache, releases the DHCP client from the interface, and delays before making an HTTP POST request with authentication parameters to log in to the network, saving the response. If debugging is on, it logs the response before removing the temporary file.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views1 page

Script Wms

This document contains variables and commands for connecting a device to a WiFi network. It sets logging to true, identifies the wireless interface and network details like the gateway ID, WLAN ID, and user credentials. It flushes the DNS cache, releases the DHCP client from the interface, and delays before making an HTTP POST request with authentication parameters to log in to the network, saving the response. If debugging is on, it logs the response before removing the temporary file.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

#LOGGING, true/false#

:local iDebug "true"


#WLAN INTERFACE#
:local iFace "wlan1"
#GW ID#
:local gwId "WAG-D2-JT"
#WLAN ID#
:local wlanId "BKSKLB00173-N/TLK-CX-38906:[email protected]"
#USERNAME, note: word sebelum @freeMS di bagian fetch itu random / acak, terserah
mau diganti / tidak.#
:local userId "XXX"
#PASSWORD#
:local passId "XXX"

:if ($iDebug = "true") do={:log warning "init, 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/quarantine.php\?
ipc=$ipAddr&gw_id=$gwId&mac=$macAddr&redirect=&wlan=$wlanId&landURL=&username_=$use
rId&username=$userId.1BWl@freeMS&password=$passId")
/tool fetch http-method=post http-header-field="user-agent: Mozilla/5.0"
url="$iUrl" dst-path=wms.txt
:delay 5
:if ($iDebug = "true") do={
:local iRes [/file get wms.txt contents];
:log warning $iRes
:file remove wms.txt
} else={:file remove wms.txt};

You might also like