黑帽联盟

 找回密码
 会员注册
查看: 1606|回复: 0

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

[复制链接]

906

主题

38

听众

3375

积分

管理员

Rank: 9Rank: 9Rank: 9

  • TA的每日心情
    无聊
    18 小时前
  • 签到天数: 1697 天

    [LV.Master]伴坛终老

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


    截图
    TeleShellBot.gif

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

    1、安装
    1. git clone https://github.com/marknote/TeleShellBot.git
    2. cd TeleShellBot
    3. npm install
    复制代码

    2、配置
    根据Telegram instructions去创建一个机器人的UserID,然后将UserID和BOT token放到config.js里面。
    1. module.exports = {
    2.     config:function(){
    3.         return (
    4.             {
    5.                 adminUsers:[ADMIN_ID], //admin users' telegram id, should be numbers
    6.                 botToken: 'YOUR_BOT_TOEKN', // bot token

    7.             }
    8.         );
    9.     }
    10. };
    复制代码
    3、运行
    1. npm start 或者 nohup npm start &(放入后台运行)
    2. or
    3. node index.js
    复制代码
    您需要登录后才可以回帖 登录 | 会员注册

    发布主题 !fastreply! 收藏帖子 返回列表 搜索
    回顶部