Script & Cara Setting Auto Login WMS Lite Terbaru

Halo sobat youshe, tutorial kali ini saya akan membahas tentang cara setting auto login wms lite menggunakan mikrotik. 

Santai saja, kalian tidak perlu pusing tinggal copy paste aja script yang saya berikan, dijamin aman. 

Ok masuk ke mikrotik terlebih dahulu. Setalah itu pilih menu system, pilih script kemudian tekan tanda +. Dibagian name isi bebas tp disini saya kasih contoh :
 
Name : AutoLogin
Don't request permision : yes
policy : centang semua kecuali dude
sorce : copy script di bawah ini lalu paste

# Daftar Variable

:local user "XXXXX"

:local pass "XXXXX"

:local gwid "XXXXX"

:local ether "wlan1"

:local wlan "XXXXX"

:local wms "XXXXX"

:local redirect "https://www.youtube.com/c/youshe"

# Akhir Variable


:log info "Menjalankan Auto Login ..."

:local ip [/ip address get [/ip address find interface="$ether"] address];

:local ip [put [:pick $ip 0 [:find $ip "/"]]];

:if ([:len $ip] = 0) do={

:log error ("Interface $ether tidak mendapatkan alamat ip --- mencoba mendapatkan...");

/ip dhcp-client release [find interface="$ether"];

};

delay 1s


:local mac [/interface get [find name="$ether"] mac-address];

:local gateway [/ip dhcp-client get [find interface="$ether"] gateway];

:log warning "IP Address     : $ip"

:log warning "MAC Address : $mac"

:log warning "IP Gateway    : $gateway"


:log info "Menghubungkan ..."


:local num1 [:pick [/system clock get time] 0] 

:local num2 [:pick [/system clock get time] 1] 

:local num3 [:pick [/system clock get time] 3] 

:local num4 [:pick [/system clock get time] 6] 

:local char1 [:pick "abcdefghijklmnopqrstuvwxyz" "$num1$num2"]

:local char2 [:pick "abcdefghijklmnopqrstuvwxyz" "2$num2"]

:local char3 [:pick "abcdefghijklmnopqrstuvwxyz" "1$num4"]

:local user "$user.$char3$char1$char2$wms"


:do {

: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=XXXXX&redirect=$redirect" http-method=post http-data="username=$user&password=$pass" url="https://welcome2.wifi.id/wms/auth/authnew/autologin/quarantine.php\?ipc=$ip&gw_id=$gwid&mac=$mac&redirect=$redirect&wlan=$wlan" dst-path=wms.txt;

:if ([/ping address=$gateway interface="$ether" count=2] = 0) do={

:log error "Login gagal... ";

/ip dhcp-client release [find interface="$ether"];

}

:if ([/ping address=$gateway  interface="$ether" count=2] != 0) do={

:log info "Login sukes..."

:local iRes [/file get wms.txt contents];

:log warning $iRes

delay 1s

:file remove wms.txt

}

}

#:log warning "$user.$char3$char1$char2$wms"



Langkah terakhir masuk ke system pilih scheduler tekan tombol + :
Name : Bebas kasih nama
Start Time : startup
Interval : 00:00:10
Policy : centang semua kecuali dude
On ovent : copy script dibawah ini lalu paste:


:if ([:ping 8.8.8.8 count=5]=0) do={

    :ip dhcp-client renew [:ip dhcp-client find interface=wlan1];

    delay 10s

    :system script run AutoLogin;

}

:if ([:ping 8.8.8.8 count=5]=5) do={

  :log info "Koneksi Aman"

}


Catatan: lihat di bagian script ini:
  :system script run AutoLogin;
Kata AutoLogin berati menjalankan script AutoLogin harus sesuai dengan Name discript.

Untuk mendapatkan yang berwarna biru (XXXXX) kalian bisa lihat di video dibawah ini:

Video Tutorial Cara Setting Auto Login WMS Lite Lengkap
© YOUSHE. All rights reserved. YOUSHE V1.0