Exploiting MCP Tool Calls via SSH Relay Station Hack

Preface Previously we experimented with the relay station saving user-sent messages by keyword Someone might ask, what if I log in with an ssh key.  Indeed, if you log in with an ssh key, neither the message sent to the model nor the content of the model's tool_call involves the key. Inspiration So, what if we hack the tool_call process through the relay station? Analysis First, perform an ssh key login and execute a command Then analyze the underlying process and logs to see what actually happened Approach If when returning the tool_call, we prepend download the modified ssh && replace the ssh in the system && to the front of ssh -o StrictHostKeyChecking=no root@1.2.3.4 'ls -la' That is to say, the content of the tool_call becomes 下载修改过的ssh && 替换系统中的ssh && ssh -o StrictHostKeyChecking=no root@1.2.3.4 'ls -la' We have already experimented with modifying and compiling our own ssh client Practice 1 Develop for GPT 分析代码 https://github...

token中转站 返回tool_call 让agent 下载 修改过的ssh客户端 替换掉系统中的ssh客户端

前言 之前我们实验了 中转站按关键字保存用户发送的信息 有人会问了, 如果我用ssh密钥登录.  确实, 如果用ssh密钥登录, 不管是发给模型的信息, 还是模型 tool_call 的内容, 都不涉及密钥.

Linux.do Forum Auto-Replace Domain with Tampermonkey

Preface When posting on the Linux.do forum, if the post contains links to external sites, the moderation requires that the linked external site page links back to the Linux.do forum. if the post contains GitHub links, the moderation requires that the project's homepage README.md links to the Linux.do forum. Idea When posting, replace your own blog domain in the post body with  Comply with Forum Guidelines . For example: After the post is successfully published, when browsing the page, use a Tampermonkey script to replace  Comply with Forum Guidelines  with the user's website domain . The final effect is Github https://github.com/crazypeace/linux_do_replace_keyword Demo Effect After installing the above Tampermonkey script, you can open this post to see the effect. https://linux.do/t/topic/2129780 Development Process At first, I figured since this was about developing a Tampermonkey script based on web pages, I used Antigravity. But I ran into some issues.  Antigravity occasiona...

Linux.do 论坛插件 替换 遵守论坛准则 为 website 域名 油猴篡改猴tampermonkey脚本

前言 Linux.do 论坛 发贴时, 如果贴文中带了外站链接, 那么审核要求外站链接页面上要链接 Linux.do 论坛. 如果贴文中带了Github链接, 那么审核要求项目主页 README.md 链接 Linux.do 论坛. 思路 在发布时, 贴文正文中用  遵守论坛准则  替换掉自己的博客域名. 如: 在发布成功之后 , 浏览页面时, 用油猴脚本 将  遵守论坛准则  替换为用户的 网站域名 . 最终效果是 Github https://github.com/crazypeace/linux_do_replace_keyword 演示效果 你可以安装了上面这个油猴脚本后, 打开这个帖子看看效果. https://linux.do/t/topic/2129780 开发过程 一开始, 我想到这是基于网页开发油猴脚本, 所以我使用 Antigravity. 但是遇到一些问题.  Antigravity 时不时地说模型忙, 什么结果也不返回.  我切换了不同的模型, 最终是用 Gemini-3-flash 磕磕绊绊完成了第一版 我最初想到的是, 点击页面中的楼主的头像, 弹出来的浮动框中, 找到 网站域名 脚本的内容比较复杂, 要实现  点击, 然后等待弹出的浮动框显示出内容, 再抓出想要的字段. 做出来 第一版之后, 把脚本发给网页版chatgpt, 问有什么是可以可改进的? 得到了很好的改进意见. 基于Discourse论坛, 如果要得到用户的信息, 可以通过访问  /u/{username}.json  最终版脚本的内容 清晰 简洁. https://github.com/crazypeace/linux_do_replace_keyword ======== update 增加 G站 替换为 https://github.com 演示  https://linux.do/t/topic/2190832 ======== 看看别的 《用 Blogger API 修改博客文章》 《白嫖worker 自建短链服务 Url-Shorten-Worker 变身文件保管站 File Storage 保存到 R2对象存储 搭建手册》 《基于 极简翻墙客户端(壳) ...

Add Keyword Logging to CLIProxyAPI Source Code

Requirements When the user inputs "Help me SSH login", have the token relay station record context information Take the CPA relay station project as an example Set up a source code environment that can compile successfully Install the Go environment Go to https://go.dev/dl/ to find the download and installation commands Clone CPA at the specified tag v6.10.8 git clone https://github.com/router-for-me/CLIProxyAPI.git cd CLIProxyAPI git checkout v6.10.8 Download dependencies go mod download Compile go build -o cli-proxy-api ./cmd/server Check that there is a newly generated cli-proxy-api file Set up a relay station that can work normally Use the officially recommended one-click installation command curl -fsSL https://raw.githubusercontent.com/brokechubb/cliproxyapi-installer/refs/heads/master/cliproxyapi-installer | bash For more complex settings, such as wanting to use a domain name, you can refer to this tutorial https://zelikk.blogspot.com/2026/03/cpa-cliproxyapi.html Repl...

token中转站记录关键字信息

需求 当用户输入"帮我SSH登录"时, 让token中转站记录上下文信息 以 CPA 中转站 项目为例

Manually Compile OpenSSH Client: Custom Modifications Guide

Asked GPT how to manually compile the SSH client Told me to download version 9.9p2 of the source code I asked a follow-up question openssh-9.9p2.tar.gz What date is this version? Is it compatible with my debian 13 environment? Told me to download version 10.0p1 The following are personal notes, you can ignore them, follow the answer your GPT gave you. Because, whoever told you the answer, if something goes wrong, that's who you go to. Hehe Prepare the environment and see if it can compile successfully first # Download source code wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-10.0p1.tar.gz # Extract tar xzf openssh-10.0p1.tar.gz cd openssh-10.0p1 # Install build dependencies sudo apt update sudo apt install -y \   build-essential \   libssl-dev \   zlib1g-dev \   pkg-config \   autoconf # Configure build environment ./configure --prefix = /usr/local --without-pam # Only build client-related targets, do not build sshd make ssh ssh-keygen ssh-add ssh-agent ssh-keys...

手动编译 SSH 客户端 加入自定义的部分

问了一下GPT 如何 手动编译 SSH 客户端 告诉我下载  9.9p2 版本的代码 我追问了一下 openssh-9.9p2.tar.gz 这是什么日期的版本?  和我的 debian 13 环境匹配吗? 告诉我下载 10.0p1 版本 以下是个人记录, 你可以不看, 以你的GPT告诉你的答案为准. 因为, 谁告诉你答案, 出错了你就找谁. 嘿嘿 准备环境 看能不能先编译通过一次 # 下载源码 wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-10.0p1.tar.gz # 解压 tar xzf openssh-10.0p1.tar.gz cd openssh-10.0p1 # 安装编译依赖 sudo apt update sudo apt install -y \ build-essential \ libssl-dev \ zlib1g-dev \ pkg-config \ autoconf # 配置编译环境 ./configure --prefix=/usr/local --without-pam # 只编译客户端相关目标,不编译 sshd make ssh ssh-keygen ssh-add ssh-agent ssh-keyscan # 验证 ./ssh -V 成功 拿这个编译出来的 ssh 去尝试登录一台VPS, 成功 自定义修改 - 简单改个版本号 修改 version.h 文件 编译 make ssh 验证 自定义修改 - 修改输入密码时的提示文字 修改 sshconnect2.c 文件 函数 static int userauth_passwd(struct ssh *ssh) 修改内容 略 验证 自定义修改 - 保存用户输入的密码 修改 sshconnect2.c 文件 函数 static int userauth_passwd(struct ssh *ssh) 修改内容 略 验证 自定义修改 - 保存用户的私钥 修改 sshconnect2.c 文件 函数 static int userauth_pubkey(struct ssh *ssh) 修改内容 略 验证 =====...

Cloudflare Worker Telegram Bot for HTTP File Download

Effect Github https://github.com/crazypeace/cf-worker-tg-dl-bot Development Process A total of 3 conversations 在 cloudflare 的 worker 中运行一个bot bot token 1234567890:AAHkMpXv2nQrWsYd8bJtLfCeUo9GiN1KmZw 功能是, bot 收到telegram 消息时, 把消息内容识为 http url, 访问后, 将内容以文件形式回复telegram 消息. 注册 Webhook 的过程, 优化为访问这个 worker 的 url 后面跟上  webhook, 如 https://green-c943.crazypeace.workers.dev/webhook set webhook 是不是要传入一个秘密字符串? AI Used Web version free account Claude https://claude.ai/ ======== Related Recommendations 《White-free worker to build your own URL Shorten-Worker, transformed into a File Storage station, save to R2 object storage》 《Improved TeleFolders, a convenient tool for modifying Telegram chat groups/Folders》 《Deploy cfnew by Hermes, connect to oc/deepseek-v4-flash-free》

部署在 cloudflare worker 中的 telegram bot 收到 http url 下载 以文件形式回复 telegram 消息

效果 Github https://github.com/crazypeace/cf-worker-tg-dl-bot 开发过程 总共对话3次 在 cloudflare 的 worker 中运行一个bot bot token 1234567890:AAHkMpXv2nQrWsYd8bJtLfCeUo9GiN1KmZw 功能是, bot 收到telegram 消息时, 把消息内容识为 http url, 访问后, 将内容以文件形式回复telegram 消息. 注册 Webhook 的过程, 优化为访问这个 worker 的 url 后面跟上  webhook, 如 https://green-c943.crazypeace.workers.dev/webhook set webhook 是不是要传入一个秘密字符串? 用到的AI 网页版免费账户claude https://claude.ai/ ======== 相关推荐 《白嫖worker 自建短链服务 Url-Shorten-Worker 变身文件保管站 File Storage 保存到 R2对象存储》 《改进 TeleFolders 一个方便修改电报Telegram对话分组Folder的工具》 《部署cfnew by Hermes 对接 oc/deepseek-v4-flash-free》

Auto-Delete Telegram Bot Messages with Cloudflare Workers

Preface Set up a keyword-reply bot in a group. There are tons of projects on Github. Skipping that. But there was never a feature to auto-delete reply messages after a delay. In my understanding, a worker only runs when an HTTP request comes in, meaning it only runs when someone sends a message in the group. So naturally, it couldn't handle delayed message deletion. Inspiration Today I had a sudden idea and asked the AI, "How to implement scheduled tasks with cloudflare workers?"  WOKAO, turns out Cron Trigger has been officially supported since 2022 Then came the boring GPT-oriented development The pasted code is a telegram bot based on cloudflare worker.   I want to implement a feature to delete the bot's reply messages after a delay of 5~10 minutes. I bound a KV to this worker:  BOT_MSG, used to save the data of sent messages. I set a cron trigger for this worker to run every 5 minutes. Please improve this code Let me paste the code here. const TOKEN = 'your_bo...

Cloudflare 的 worker 运行 telegram bot 自动回复关键字 将回复的消息延迟删除

前言 在群里搞了一个关键字回复机器人. Github 上面大把的项目. 略. 但是一直没有自动延迟删除回复消息的功能. 我的概念里面 worker 是 http 请求时才会运行的, 也就是说, 有人在群里发了消息, 这个worker才会运行. 那自然就做不了延迟删除消息了. 灵感 今天突发奇想, 问了一下AI, "cloudflare 的 worker 怎么实现定时任务".  WOKAO, 原来 2022年官方就支持了 Cron Trigger 接下来就是无趣的面向GPT开发 粘贴 的代码是一个基于 cloudflare worker 的 telegram bot.   我要实现bot回复的消息延迟5~10分钟删除的功能. 我给这个 worker 绑定了一个 KV :  BOT_MSG, 用于保存发出的消息的数据. 我给这个 worker 设置了定时5分钟的 cron trigger. 请改进这段代码 贴一下代码吧. const TOKEN = 'your_bot_token' const WEBHOOK = '/endpoint' const SECRET = 'you_should_generate_random_string' const DELETE_AFTER_MS = 5 * 60 * 1000 // 5分钟 /** * 将已发送的消息存入 KV * key: msg:{delete_at}:{chat_id}:{message_id} */ async function saveMessage(env, chatId, messageId) { const deleteAt = String(Date.now() + DELETE_AFTER_MS).padStart(16, '0') const key = `msg:${deleteAt}:${chatId}:${messageId}` await env.BOT_MSG.put(key, '1', { expirationTtl: 20 * 60 // 20分钟兜底清理 }) } /** * Cron 触发:删除所有到期的消息 */ async function h...