WMS Lite Auto Login Script Generator

Wifi Managed Service

last updated date
/system script
add dont-require-permissions=yes name=Auto-Login-WMS policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
\_Daftar Variable\r\
\n:local user \"yousheid\"\r\
\n:local pass \"12345678\"\r\
\n:local gwid \"WAG-D5-KBU\"\r\
\n:local ether \"wlan1\"\r\
\n:local wlan \"SLOSOP01234-N/TLK-CI-65432:YOUSHE\"\r\
\n:local wms \"@wms.1213XXXXXX.000\"\r\
\n:local redirect \"http://www.msftconnecttest.com/redirect\"\r\
\n# Akhir Variable\r\
\n\r\
\n:log info \"Menjalankan Auto Login ...\"\r\
\n:local ip [/ip address get [/ip address find interface=\"\$ether\"] address];\r\
\n:local ip [put [:pick \$ip 0 [:find \$ip \"/\"]]];\r\
\n:if ([:len \$ip] = 0) do={\r\
\n\t:log error (\"Interface \$ether tidak mendapatkan alamat ip --- mencoba mendapatkan...\");\r\
\n\t/ip dhcp-client release [find interface=\"\$ether\"];\r\
\n};\r\
\ndelay 1s\r\
\n\r\
\n:local mac [/interface get [find name=\"\$ether\"] mac-address];\r\
\n:local gateway [/ip dhcp-client get [find interface=\"\$ether\"] gateway\
];\r\
\n:log warning \"IP Address : \$ip\"\r\
\n:log warning \"MAC Address : \$mac\"\r\
\n:log warning \"IP Gateway : \$gateway\"\r\
\n\r\
\n:log info \"Menghubungkan ...\"\r\
\n\r\
\n:local num1 [:pick [/system clock get time] 0] \r\
\n:local num2 [:pick [/system clock get time] 1] \r\
\n:local num3 [:pick [/system clock get time] 3] \r\
\n:local num4 [:pick [/system clock get time] 6] \r\
\n:local char1 [:pick \"abcdefghijklmnopqrstuvwxyz\" \"\$num1\$num2\"]\r\
\n:local char2 [:pick \"abcdefghijklmnopqrstuvwxyz\" \"2\$num2\"]\r\
\n:local char3 [:pick \"abcdefghijklmnopqrstuvwxyz\" \"1\$num4\"]\r\
\n:local user \"\$user.\$char3\$char1\$char2\$wms\"\r\
\n\r\
\n:do {\r\
\n\t:tool fetch mode=https http-header-field=\"Content-Type: application/x\
-www-form-urlencoded; charset=UTF-8,User-Agent: Mozilla/5.0 (Windows NT 10\
.0; Win64; x64) AppleWebKit/537.36,Referer: https://welcome2.wifi.id/login\
/\?gw_id=\$gwid&client_mac=\$mac&wlan=\$wlan&sessionid=0902PPPP78030FB3-60\
E77FB1&redirect=\$redirect\" http-method=post http-data=\"username=\$user&\
password=\$pass\" url=\"https://welcome2.wifi.id/wms/auth/authnew/autologi\
n/quarantine.php\\\?ipc=\$ip&gw_id=\$gwid&mac=\$mac&redirect=\$redirect&wl\
an=\$wlan\" dst-path=wms.txt;\r\
\n\t:if ([/ping address=\$gateway interface=\"\$ether\" count=2] = 0) do={\
\r\
\n\t\t:log error \"Login gagal... \";\r\
\n\t\t/ip dhcp-client release [find interface=\"\$ether\"];\r\
\n\t}\r\
\n\t:if ([/ping address=\$gateway interface=\"\$ether\" count=2] != 0) do\
={\r\
\n\t\t:log info \"Login sukes...\"\r\
\n\t\t:local iRes [/file get wms.txt contents];\r\
\n\t\t:log warning \$iRes\r\
\n\t\tdelay 1s\r\
\n\t\t:file remove wms.txt\r\
\n\t}\r\
\n}\r\
\n#:log warning \"\$user.\$char3\$char1\$char2\$wms\""


/system scheduler
add disabled=yes interval=1m name=AutoLogiWMS on-event=":if ([:ping 8.8.8.8 co\
unt=5]=0) do={\r\
\n :ip dhcp-client renew [:ip dhcp-client find interface=wlan1];\r\
\n delay 10s\r\
\n :system script run Auto Login WMS;\r\
\n}\r\
\n:if ([:ping 8.8.8.8 count=5]=5) do={\r\
\n :log info \"Koneksi Aman\"\r\
\n}" policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=jun/26/2022 start-time=05:16:00

Tutorial Auto Login Wifi Managed Service