• 欢迎访问爱玩吧
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏爱玩吧

[教程]TeleShellBot:通过Telegram机器人远程执行shell命令

实用教程 aiwanyule 3年前 (2021-05-12) 已收录
文章目录[隐藏]

简介

TeleShellBot是我脑洞大开的时候写的一个简单的telegram机器人,可以帮你远程执行shell命令,从而让你可以在手机上操作你的服务器。

截图

[教程]TeleShellBot:通过Telegram机器人远程执行shell命令

教程

Github地址:https://github.com/marknote/TeleShellBot

1、安装

git clone https://github.com/marknote/TeleShellBot.git
cd TeleShellBot
npm install

gitnpm安装请参考:Debian/Ubuntu/CentOS安装最新版的Node.js和NPM教程Debian/Ubuntu/CentOS安装Git教程

2、配置
根据Telegram instructions去创建一个机器人的UserID,然后将UserIDBOT token放到config.js里面。

module.exports = {
    config:function(){
        return (
            {
                adminUsers:[ADMIN_ID], //admin users' telegram id, should be numbers
                botToken: 'YOUR_BOT_TOEKN', // bot token

            }
        );
    }
};

3、运行

npm start

or

node index.js

原文地址:https://www.v2ex.com/t/394208


爱玩吧 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:[教程]TeleShellBot:通过Telegram机器人远程执行shell命令
喜欢 (0)