{"id":13640129,"url":"https://github.com/Forichok/TelegramOnlineSpy","last_synced_at":"2025-04-20T02:32:47.676Z","repository":{"id":37997024,"uuid":"220019475","full_name":"Forichok/TelegramOnlineSpy","owner":"Forichok","description":"Simple telegram online spy logger bot","archived":false,"fork":false,"pushed_at":"2022-05-22T06:08:00.000Z","size":152,"stargazers_count":368,"open_issues_count":28,"forks_count":82,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-08-03T01:16:15.013Z","etag":null,"topics":["bot","logger","monitoring","online","spy","telegram","telethon","tracker"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Forichok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-06T14:44:56.000Z","updated_at":"2024-07-31T13:31:40.000Z","dependencies_parsed_at":"2022-07-12T17:04:23.304Z","dependency_job_id":null,"html_url":"https://github.com/Forichok/TelegramOnlineSpy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Forichok%2FTelegramOnlineSpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Forichok%2FTelegramOnlineSpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Forichok%2FTelegramOnlineSpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Forichok%2FTelegramOnlineSpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Forichok","download_url":"https://codeload.github.com/Forichok/TelegramOnlineSpy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223816427,"owners_count":17207857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","logger","monitoring","online","spy","telegram","telethon","tracker"],"created_at":"2024-08-02T01:01:08.048Z","updated_at":"2024-11-09T10:30:51.091Z","avatar_url":"https://github.com/Forichok.png","language":"Python","funding_links":[],"categories":["Understanding OSINT Fundamentals, according to [VEEXH](https://wondersmithrae.medium.com/a-beginners-guide-to-osint-investigation-with-maltego-6b195f7245cc):","[↑](#contents) Tools"],"sub_categories":[],"readme":"#  Telegram online status logger bot.\n\n\u003e \"I solemnly swear that I am up to no good.\"\n\u003e \n\u003e ~ Harry Potter Universe\n\n  Uses Telethon library to check online status and if it was changed. \n  If changes are detected, a bot will send you a message.\n\n---\n\n## How it works\n\n The `spy.py` will host a bot that you can interact with.\n On Telegram you chat with the bot and through the bot commands you add/remove users on the monitoring list.\n\n![bot-screenshot-1.png](bot-screenshot-1.png)\n\n The bot will message you, if any of the users on the list changed their online status.\n\n![bot-screenshot-2.png](bot-screenshot-2.png)\n\n## Install\n\n` pip install telethon`\n \n## Setup\n\nCreate your telegramm application on https://my.telegram.org/apps and replace API_HASH, API_ID with yours.\n\n```\nAPI_HASH = 'your api hash'\nAPI_ID = 'yuor api id'\nBOT_TOKEN = \"your bot token\"\nUSER_NAME = \"your user name\"\n```\n\nCreate bot in your telegram client (write a message to @BotFather) and copy bot token into app.\n\n## Run\n\n  `python3 spy.py`\n  \n  Then input **your telegram account number** which will be sending requests to get users online status. Do not enter a bot token as this will not work.\n  \n  Input  code in console from telegram.\n  \n### Commands\n  \n  Write /help to your bot to see usage information.\n\n```\n/start - start online monitoring \n/stop - stop online monitoring \n/help - show help \n/add - add user to monitoring list \"/add +79991234567 UserName\"\n/list - show added users\n/clear - clear user list\n/remove - remove user from list with position in list (to show use /list command)\"/remove 1\"\n/setdelay - set delay between user check in seconds\n/logs - display command log\n/clearlogs - clear the command log file\n/cleardata - reset configuration\n/disconnect - disconnect bot\n/getall - status\n```\n\n---\n\n### Crontjob\n\nHandy cronjob makros\n\n- start background process:\n\n#!/bin/bash\ncd /home/DIRECTORY/TelegramOnlineSpy\nnohup python3 spy.py \u003e nohupper.log \u0026\n\n- check if background process is still running\n\n```bash\n#!/bin/bash\ncd /home/DIRECTORY/TelegramOnlineSpy\nminimum_finds=2\nfound=$(ps aux | grep \"python3 spy.py\" | wc -l)\nif ((found \u003c minimum_finds)); then\n   # DO SOMETHING WHEN YOUR SPY IS OFFLINE\n   # eg. alert the user or restart the spy\nfi\n```\n\ncheck if spy is running every hour\n\n```bash\n32 * * * * /home/DIRECTORY/TelegramOnlineSpy/checkrunning.sh\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FForichok%2FTelegramOnlineSpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FForichok%2FTelegramOnlineSpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FForichok%2FTelegramOnlineSpy/lists"}