postuf/telegram-api-lib
Composer 安装命令:
composer require postuf/telegram-api-lib
包简介
Telegram scenario-based API aimed at OSINT
README 文档
README
Description
A lot of Telegram API libraries around, but none of them demonstrates how to execute complex scenarios like draining all photos from channels, monitor users presence or register new account. This projects aims to correct situation: now you can easily create new scenarios and one-click execute existing ones.
Using Telegram API from official Android client.
Rationale
Telegram protocol https://core.telegram.org/ has technically thorough and detailed documentation, but does not cover usage scenarios. Our goal is to make a library that implements some real-life OSINT usage scenarios, including:
- searching user in specific groups;
- parsing group members;
- monitoring user online status;
- downloading photos from channel;
- monitoring user profile changes (photo/bio/etc.);
- fetching messages by specific user.
Requirements
- PHP 7.4+
- Composer
- phpseclib
Docs
QuickStart
First of all, add library to your app user composer:
composer require postuf/telegram-api-lib
To check out usage examples, go to examples dir.
You need auth keys generated, run php registration.php to get this.
Now you are all set, you can run any of examples, for example, php parseGroupMembers.php, and check the output.
Verbose logging (all messages sent/received) is enabled by default, add --info to arguments to suppress it.
Docker container
docker build -t telegram-osint-lib .
docker run -d -t --name tg-osint-lib telegram-osint-lib
docker exec -it tg-osint-lib /bin/bash
php examples/registration.php
When you get AuthKey in registration script, you can use it the following way:
docker exec --env BOT=your-auth-key -i tg-osint-lib php examples/monitorNumbers.php -n 123123123
# if you save key to file
docker exec --env BOT=@auth-key-filename-in-docker -i tg-osint-lib php examples/monitorNumbers.php -n 123123123
Limitations
2FA not supported.
postuf/telegram-api-lib 适用场景与选型建议
postuf/telegram-api-lib 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.89k 次下载、GitHub Stars 达 313, 最近一次更新时间为 2019 年 12 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 postuf/telegram-api-lib 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 postuf/telegram-api-lib 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3.89k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 313
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-12-25