# telegram

```
登录telegram
访问https://telegram.me/botfather，发送消息
```

![image](https://raw.githubusercontent.com/xiaoy-sec/Pentest_Note/master/img/296.png)

```
创建一个bot
```

![image](https://raw.githubusercontent.com/xiaoy-sec/Pentest_Note/master/img/297.png)

```
创建完成后返回一个token
>pip install telepot
>pip install requests
>git clone https://github.com/blazeinfosec/bt2.git
编辑bt2.py
粘贴token和chatid进脚本
Chat_id的获取方式
https://api.telegram.org/bot<token>/getUpdates
```

![image](https://raw.githubusercontent.com/xiaoy-sec/Pentest_Note/master/img/298.png) ![image](https://raw.githubusercontent.com/xiaoy-sec/Pentest_Note/master/img/299.png)

```
当有受控机上线时会列出功能
```

![image](https://raw.githubusercontent.com/xiaoy-sec/Pentest_Note/master/img/300.png) ![image](https://raw.githubusercontent.com/xiaoy-sec/Pentest_Note/master/img/301.png)

```
Windows
https://github.com/sf197/Telegra_Csharp_C2
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.heresecurity.wiki/nei-wang-he-yu/ming-ling-yu-kong-zhi/telegram.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
