Thanks to visit codestin.com
Credit goes to www.scribd.com

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

Bot

The document contains a script that retrieves and formats information about a user's hotspot session. It collects data such as the user's voucher code, login time, IP address, MAC address, device name, profile, usage statistics, and expiration details. This information is then sent as a message to a specified Telegram chat using a bot API.

Uploaded by

Dian Abdillah
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)
66 views1 page

Bot

The document contains a script that retrieves and formats information about a user's hotspot session. It collects data such as the user's voucher code, login time, IP address, MAC address, device name, profile, usage statistics, and expiration details. This information is then sent as a message to a specified Telegram chat using a bot API.

Uploaded by

Dian Abdillah
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

:local chat "55XXXXXX";

:local bot "965670373:XXX";


:local mac $"mac-address";
:local nama "$user";
:local datetime "Tanggal: $[/system clock get date] %0A Jam: $[/system clock get
time]";
:local uptime [/ip hotspot user get [find name="$nama"] uptime];
:local host [/ip dhcp-server lease get [find mac-address="$mac"] host-name];
:local profile [/ip hotspot user get [find name="$nama"] profile];
:local bin [/ip hotspot user get [find name="$nama"] bytes-in];
:local bout [/ip hotspot user get [find name="$nama"] bytes-out];
:local limit [/ip hotspot user get [find name="$nama"] limit-bytes-total];
:local totq [(($limit)/1048576)];
:local qterpakai [((($bin)+($bout))/1048576)];
:local sisa [($totq-($bin+$bout)/1048576)];
:local exp [/ip hotspot user get [find name="$nama"] comment];
:local active [/ip hotspot active print count-only];
/tool fetch url="https://api.telegram.org/bot$bot/sendMessage?
chat_id=$chat&text================================%0A DEVICE
LOGIN %0A=============================== %0A- Kode Voucher : $nama%0A- Tanggal
: $datetime %0A- IP Address : $address%0A- Mac Address : $mac%0A- Device : $host
%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 Yang Online : $active Users" mode=http keep-result=no

You might also like