Giter Site home page Giter Site logo

alirezaprog / telegram-osint-lib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from postuf/telegram-osint-lib

0.0 1.0 0.0 1.91 MB

Telegram scenario-based API aimed at OSINT

License: MIT License

PHP 99.81% Shell 0.03% JavaScript 0.05% Dockerfile 0.11%

telegram-osint-lib's Introduction

Telegram OSINT scenario library

Build Status codecov

Description

Telegram API from official mobile 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.3+
  • Composer
    • phpseclib

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 123123123
# if you save key to file
docker exec  --env BOT=@auth-key-filename-in-docker -i tg-osint-lib php examples/monitorNumbers.php 123123123

Limitations

We currently use Europe/CIS DC, see src/LibConfig.php for details/to change your DC, see also: https://core.telegram.org/method/help.getNearestDc .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.