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

Script Bot Telegram PPP ONOFF

This script contains code to send login and logout notifications from a PPPoE server to a Telegram chat. When a user logs in, it retrieves information like IP address, uptime, caller ID, etc and sends it to the chat. On logout, it sends information like last disconnect reason, last logout time, last caller ID. Both login and logout messages include the date, time, username, total active clients and server name. The script uses the Telegram Bot API to send messages programmatically to a chat.

Uploaded by

intanmegasari
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)
269 views1 page

Script Bot Telegram PPP ONOFF

This script contains code to send login and logout notifications from a PPPoE server to a Telegram chat. When a user logs in, it retrieves information like IP address, uptime, caller ID, etc and sends it to the chat. On logout, it sends information like last disconnect reason, last logout time, last caller ID. Both login and logout messages include the date, time, username, total active clients and server name. The script uses the Telegram Bot API to send messages programmatically to a chat.

Uploaded by

intanmegasari
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

SCRIPT ON LOGIN PPP

:local nama "$user";


:local bot "BOT-ID";
:local chat "CHAT-ID";
:local server "NAMA-SERVER";
:local ips [/ppp active get [find name=$nama] address];
:local up [/ppp active get [find name=$nama] uptime];
:local caller [/ppp active get [find name=$nama] caller-id];
:local service [/ppp active get [find name=$nama] service];
:local active [/ppp active print count];
:local datetime "Tanggal: $[/system clock get date] %0AJam: $[/system clock get
time]";
:local lastdisc [/ppp secret get [find name=$user] last-disconnect-reason];
:local lastlogout [/ppp secret get [find name=$user] last-logged-out];
:local lastcall [/ppp secret get [find name=$user] last-caller-id];
/tool fetch
url="https://api.telegram.org/bot6098462287:AAGT72vM4gKwjfBI4XJhbVClfSa7OjSyzrA/
sendMessage?chat_id=2145990985$chat &text=\E2\9C\85 PPPoE LOGIN%0A$datetime%0AUser:
$user%0AIP Client: $ips%0ACaller ID: $caller%0AUptime: $up%0ATotal Active: $active
Client%0AService: $service%0ALast Disconnect Reason: $lastdisc %0ALast Logout:
$lastlogout %0ALast Caller ID: $lastcall %0AServer: $server" mode=http keep-
result=no;

SCRIPT OFF LOGIN PPP

:local nama "$user";


:local bot "BOT-ID";
:local chat "CHAT-ID";
:local server "NAMA-SERVER";
:local lastdisc [/ppp secret get [find name=$user] last-disconnect-reason];
:local lastlogout [/ppp secret get [find name=$user] last-logged-out];
:local lastcall [/ppp secret get [find name=$user] last-caller-id];
:local active [/ppp active print count];
:local datetime "Tanggal: $[/system clock get date] %0AJam: $[/system clock get
time]";
/tool fetch
url="https://api.telegram.org/bot6098462287:AAGT72vM4gKwjfBI4XJhbVClfSa7OjSyzrA/
sendMessage?chat_id=2145990985$chat&text=\E2\9D\8CPPPOE-LOGOUT %0A$datetime%0AUSER:
$user%0ALast Disconnect Reason: $lastdisc %0ALast Logout: $lastlogout %0ALast
Caller ID: $lastcall %0ATotal active: $active Client %0AServer: $server" keep-
result=no;

You might also like