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

Baru 1

The document contains a script for sending notifications via Telegram regarding user connection and disconnection events on a router. It retrieves various details such as user IP, uptime, service, and last disconnect reason, and formats this information into a message. The script executes two main functions: one for when a user connects and another for when a user logs out.

Uploaded by

dikayonko613
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)
43 views1 page

Baru 1

The document contains a script for sending notifications via Telegram regarding user connection and disconnection events on a router. It retrieves various details such as user IP, uptime, service, and last disconnect reason, and formats this information into a message. The script executes two main functions: one for when a user connects and another for when a user logs out.

Uploaded by

dikayonko613
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 nama "$user";

:local bot "8074368474:AAFw758Fr3pKijBOl2WMNLUM24BciPSNi40";


:local chat "7844528392";
: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 fup [/ppp secret get [find name=$nama] profile];
:local last [/ppp secret get [find name=$user] last-disconnect-reason];
:local active [/ppp active print count];
:local secret [/ppp secret print count];
:local off ($secret - $active);
/tool fetch url="https://api.telegram.org/bot$bot/sendMessage?chat_id=$chat &text=\
E2\9C\85 ROUTER CONNECTED %0AUser: $user%0AIP Client: $ips%0ACaller ID: $caller
%0AService: $service%0AUptime: $up%0APaket: $fup%0ALast Logout: $last%0ATotal PPPoE
Active: $active Client%0ATotal PPPoE Off: $off Client" mode=http keep-result=no;

:local nama "$user";


:local bot "8074368474:AAFw758Fr3pKijBOl2WMNLUM24BciPSNi40";
:local chat "7844528392";
:local service [/ppp secret get [find name=$nama] service];
:local local [/ppp secret get [find name=$nama] local];
:local remote [/ppp secret get [find name=$nama] remote];
:local profile [/ppp secret get [find name=$nama] profile];
:local last [/ppp secret get [find name=$nama] last-logged-out];
:local lastcall [/ppp secret get [find name=$nama] last-caller-id];
:local lastdic [/ppp secret get [find name=$nama] last-disconnect-reason];
/tool fetch url="https://api.telegram.org/bot$bot/sendMessage?chat_id=$chat&text=\
E2\9D\8C LOGOUT%0AUser: $user%0AService: $service %0ALocal Address: $local%0ARemote
Address: $remote%0AProfile: $profile%0ALast Logout: $last%0ALast Caller ID:
$lastcall %0ALast Disconnect Reason: $lastdic" mode=http keep-result=no;

You might also like