kiedtink

Mikrotik Telegram Hotspot

Jan 21st, 2021 (edited)
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.46 KB | None | 0 0
  1. :local chat "XXXXXXXX";
  2. :local bot "XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  3. :local mac $"mac-address";
  4. :local nama "$user";
  5. :local datetime "$[/system clock get date] Jam: $[/system clock get time]";
  6. :local uptime [/ip hotspot user get [find name="$nama"] uptime];
  7. :local host [/ip dhcp-server lease get [find mac-address="$mac"] host-name];
  8. :local profile [/ip hotspot user get [find name="$nama"] profile];
  9. :local loby [/ip hotspot active get [find user="$nama"] login-by];
  10. :local bin [/ip hotspot user get [find name="$nama"] bytes-in];
  11. :local bout [/ip hotspot user get [find name="$nama"] bytes-out];
  12. :local limit [/ip hotspot user get [find name="$nama"] limit-bytes-total];
  13. :local totq [(($limit)/1048576)];
  14. :local qterpakai [((($bin)+($bout))/1048576)];
  15. :local sisa [($totq-($bin+$bout)/1048576)];
  16. :local exp [/ip hotspot user get [find name="$nama"] comment];
  17. :local active [/ip hotspot active print count-only];
  18. /tool fetch url="https://api.telegram.org/bot$bot/sendMessage\?chat_id=$chat&text================================%0A                     DEVICE LOGIN      %0A=============================== %0A- Kode Voucher : $nama%0A- Waktu Login : $datetime %0A- IP Address : $address%0A- Mac Address : $mac%0A- Device : $host%0A- Login By : $loby%0A- Paket : $profile%0A- Waktu Terpakai : $uptime%0A- Jumlah Kuota : $totq Mb%0A- Kuota Terpakai : $qterpakai Mb%0A- Sisa Kuota : $sisa Mb%0A- Expired : $exp%0A- Users Online : $active Users" mode=http keep-result=no
  19.  
Add Comment
Please, Sign In to add comment