Cara Monitoring User Yang Sedang Mengakses Router Menggunakan RouterOS via Telegram
:local CHID "-38169xxxx";
:local BotID "103298xxxx:AAHKpiAqlEoaA1ntvWXXsN46s0MH9YYOiFk";
:local output
:foreach activeIndex in=[/user active find] do={
:local Informasi "User yang sedang mengakses Router %0A";
:local activeUser ("*Nama User:* ".[/user active get value-name="name" $activeIndex]."%0A")
:local activeAddress ("*Alamat IP User:* ".[/user active get value-name="address" $activeIndex]."%0A")
:local activeVia ("*Diakses Via:* ".[/user active get value-name="via" $activeIndex]."%0A")
:local activeWhen ("*Diakses Jam dan Tanggal:* ".[/user active get value-name="when" $activeIndex]."%0A")
:local activeGroup ("*Jenis Group:* ".[/user active get value-name="group" $activeIndex]."%0A")
:set output ($output.$Informasi.$activeUser.$activeAddress.$activeVia.$activeWhen.$activeGroup."%0A")
}
/tool fetch url="https://api.telegram.org/bot$BotID/sendmessage\?chat_id=$CHID&text=$output";
Semoga Bermanfaat
Penulis : Een Pahlefi,S.Kom
0 Response to "Cara Monitoring User Yang Sedang Mengakses Router Menggunakan RouterOS via Telegram"
Post a Comment