Skip to content

Instantly share code, notes, and snippets.

@therusetiawan
Last active June 1, 2025 07:01
Show Gist options
  • Select an option

  • Save therusetiawan/cc6271610be1512772742fcbf1011e0c to your computer and use it in GitHub Desktop.

Select an option

Save therusetiawan/cc6271610be1512772742fcbf1011e0c to your computer and use it in GitHub Desktop.
Script to monitor hotspot user log
### On Login Script
:put (",,0,,,,Disable,");{
:local key "KEY DARI WINBOT";
:local noHP "NO HP TUJUAN";
:local mac $"mac-address";
:local device [/ip dhcp-server lease get [find mac-address="$mac"] host-name];
:local activeCount [/ip hotspot active print count-only];
/tool fetch url="https://api.mikrotik-winbot.com/api/v1/whatsapp/send_message/$noHP/$key/LOG-IN USER $user -enter-IP Address : $address -enter-Mac Address : $mac -enter-Device : $device -enter-Online : $activeCount Users " mode=http keep-result=no}
### On Logout Script
:local key "KEY DARI WINBOT";
:local noHP "NO HP TUJUAN";
/tool fetch url="https://api.mikrotik-winbot.com/api/v1/whatsapp/send_message/$noHP/$key/LOGOUT USER $user -enter-IP Address : $address" mode=http keep-result=no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment