带 gpg 加密的机器人

发布于 2024-12-29 09:00:07 字数 320 浏览 1 评论 0原文

我正在 python 上创建一些机器人,我想从不同的即时消息客户端(例如 Miranda IM、QIP 等)向他发送加密消息。对于这个问题,我使用 python-gnupg 用于生成公钥和私钥的库。据我了解,有必要将公钥发送给远程用户。我不能简单地将这个密钥发送给用户,因为我不知道哪个用户连接到机器人。因此,我认为,最好将公钥发送到机器人连接的服务器,例如 jabber.org、icq.com 等。 我该怎么做呢?或者说,还有其他方法吗?

I am creating some bot on python and I want to send encrypted message him from different instant messaging clients, e.g Miranda IM, QIP etc. For this issue I use python-gnupg library for generating public and private keys. As I understand it is necessary to send public key to remote users. I can't simply send this key to an user, because i don't know which user connect to the bot. So, I think, it would be good to send the public key to servers where the bot is connected to, for example, jabber.org, icq.com etc.
How can I do it? Or, are there any other ways?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

苍白女子 2025-01-05 09:00:07

您可以将您的公钥上传到 MIT 公钥服务器 (http://pgp.mit.edu/)。它们不提供 API,但可以使用 urllib 和一些简单的正则表达式搜索从 Python 轻松驱动 HTML 界面。

You could upload your public key to the MIT public key server (http://pgp.mit.edu/). They do not provide an API, but the HTML interface would be quite easy to drive from Python using urllib and some simple regexp searching.

分開簡單 2025-01-05 09:00:07

您可以使用 Jabber 的 vCard 系统在其自己的 vCard 中发布其身份,该 vCard 可从所有 XMPP 客户端的 XMPP 服务器目录获取。
例如,您可以将其放在 vCard 的“关于”字段中,

您可以从中激发自己的灵感
http://yabfog.com/blog/2009/06/03 /xmpp-vcard-python-脚本

You could use the vCard system of Jabber to publish its identity in its own vCard available from the XMPP server directory for all XMPP clients.
You might put it in the 'About' field of the vCard for example

You can inspire yourself from that
http://yabfog.com/blog/2009/06/03/xmpp-vcard-python-script

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文