Giter VIP home page Giter VIP logo

ivanglinkin / cctv Goto Github PK

View Code? Open in Web Editor NEW
2.3K 30.0 321.0 649 KB

Close-Circuit Telegram Vision revolutionizes location tracking with its open-source design and Telegram API integration. Offering precise tracking within 50-100 meters, users can monitor others in real-time for logistics or safety, redefining how we navigate our surroundings

License: GNU General Public License v3.0

Python 5.80% CSS 1.89% JavaScript 91.80% HTML 0.51%

cctv's Introduction

CCTV

Close-Circuit Telegram Vision revolutionizes location tracking with its open-source design and Telegram API integration. Offering precise tracking within 50-100 meters, users can monitor others in real-time for logistics or safety, redefining how we navigate our surroundings. PLEASE BE AWARED TELEGRAM STARTED BANNING ACCOUNTS FOR USING "FIND PEOPLE NEARBY" FEATURE

Usage example:

  1. Installation
git clone https://github.com/IvanGlinkin/CCTV.git
cd CCTV
pip install -r requirements.txt
  1. Registering Telegram creds
visit https://my.telegram.org/auth web-site
input your phone number
input the confirmation/login code
follow "API development tools" link
register the application
get App's api_id, api_hash, title and name
  1. Settings
    Upon first launch script will create config.yaml file and request all needed settings.
    This settings can be manually changed later:
api_config:
  api_hash: ***
  api_id: 00000000
  phone: "+123456789000"
location:
  lat: 51.51404
  lon: -0.15063
  meters: 1200
misc:
  speed_kmh: 50
  timesleep: 30
  1. Launch
python3 start.py
  1. Read the data by opening ./reports-html/_combined_data.html

Help message:


 ██████╗██╗      ██████╗ ███████╗███████╗     ██████╗██╗██████╗  ██████╗██╗   ██╗██╗████████╗                      
██╔════╝██║     ██╔═══██╗██╔════╝██╔════╝    ██╔════╝██║██╔══██╗██╔════╝██║   ██║██║╚══██╔══╝                      
██║     ██║     ██║   ██║███████╗█████╗█████╗██║     ██║██████╔╝██║     ██║   ██║██║   ██║                         
██║     ██║     ██║   ██║╚════██║██╔══╝╚════╝██║     ██║██╔══██╗██║     ██║   ██║██║   ██║                         
╚██████╗███████╗╚██████╔╝███████║███████╗    ╚██████╗██║██║  ██║╚██████╗╚██████╔╝██║   ██║                         
 ╚═════╝╚══════╝ ╚═════╝ ╚══════╝╚══════╝     ╚═════╝╚═╝╚═╝  ╚═╝ ╚═════╝ ╚═════╝ ╚═╝   ╚═╝                         
                                                                                                                   
████████╗███████╗██╗     ███████╗ ██████╗ ██████╗  █████╗ ███╗   ███╗    ██╗   ██╗██╗███████╗██╗ ██████╗ ███╗   ██╗
╚══██╔══╝██╔════╝██║     ██╔════╝██╔════╝ ██╔══██╗██╔══██╗████╗ ████║    ██║   ██║██║██╔════╝██║██╔═══██╗████╗  ██║
   ██║   █████╗  ██║     █████╗  ██║  ███╗██████╔╝███████║██╔████╔██║    ██║   ██║██║███████╗██║██║   ██║██╔██╗ ██║
   ██║   ██╔══╝  ██║     ██╔══╝  ██║   ██║██╔══██╗██╔══██║██║╚██╔╝██║    ╚██╗ ██╔╝██║╚════██║██║██║   ██║██║╚██╗██║
   ██║   ███████╗███████╗███████╗╚██████╔╝██║  ██║██║  ██║██║ ╚═╝ ██║     ╚████╔╝ ██║███████║██║╚██████╔╝██║ ╚████║
   ╚═╝   ╚══════╝╚══════╝╚══════╝ ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝      ╚═══╝  ╚═╝╚══════╝╚═╝ ╚═════╝ ╚═╝  ╚═══╝

usage: start.py [-h] [-lat LATITUDE] [-long LONGITUDE] [-m METERS] [-t TIMESLEEP] [-s SPEED_KMH] [-tn TELEGRAM_NAME] [-ti TELEGRAM_API_ID]
                [-th TELEGRAM_API_HASH]

Custom settings for script launch

optional arguments:
  -h, --help            show this help message and exit
  -lat LATITUDE, --latitude LATITUDE
                        Latitude setting
  -long LONGITUDE, --longitude LONGITUDE
                        Longitude setting
  -m METERS, --meters METERS
                        Meters setting
  -t TIMESLEEP, --timesleep TIMESLEEP
                        Timesleep setting
  -s SPEED_KMH, --speed_kmh SPEED_KMH
                        Speed setting
  -tn TELEGRAM_NAME, --telegram_name TELEGRAM_NAME
                        Telegram session name
  -ti TELEGRAM_API_ID, --telegram_api_id TELEGRAM_API_ID
                        Telegram API ID
  -th TELEGRAM_API_HASH, --telegram_api_hash TELEGRAM_API_HASH
                        Telegram API hash

Media mentions: (so many, just google it "close-circuit telegram vision")

  1. English language:
  1. Russian language:
  1. Italian language:
  1. Spanish language:

Video example:

Close-Curcuit Telegram Vision PoC Banned by YouTube

https://github.com/IvanGlinkin/media_support/raw/main/CCTV_Github.mp4

Screenshots:

cctv's People

Contributors

anijackich avatar ask0n avatar codi33 avatar ivanglinkin avatar jaebee2 avatar khoirulaksara avatar paracosm17 avatar prudhvichakravarthy avatar spmedia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cctv's Issues

who is it tracking?

Hello!
Your tracking app does it track me or people from my contacts in telegram ?
I just don't quite understand :)

2fa

Приветствую.
Правильно понимаю, что при включенном в Telegram 2fa работать не будет?

git clone https://github.com/IvanGlinkin/CCTV.git cd CCTV pip install -r requirements.txt

██████╗██╗ ██████╗ ███████╗███████╗ ██████╗██╗██████╗ ██████╗██╗ ██╗██╗████████╗
██╔════╝██║ ██╔═══██╗██╔════╝██╔════╝ ██╔════╝██║██╔══██╗██╔════╝██║ ██║██║╚══██╔══╝
██║ ██║ ██║ ██║███████╗█████╗█████╗██║ ██║██████╔╝██║ ██║ ██║██║ ██║
██║ ██║ ██║ ██║╚════██║██╔══╝╚════╝██║ ██║██╔══██╗██║ ██║ ██║██║ ██║
╚██████╗███████╗╚██████╔╝███████║███████╗ ╚██████╗██║██║ ██║╚██████╗╚██████╔╝██║ ██║
╚═════╝╚══════╝ ╚═════╝ ╚══════╝╚══════╝ ╚═════╝╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝

████████╗███████╗██╗ ███████╗ ██████╗ ██████╗ █████╗ ███╗ ███╗ ██╗ ██╗██╗███████╗██╗ ██████╗ ███╗ ██╗
╚══██╔══╝██╔════╝██║ ██╔════╝██╔════╝ ██╔══██╗██╔══██╗████╗ ████║ ██║ ██║██║██╔════╝██║██╔═══██╗████╗ ██║
██║ █████╗ ██║ █████╗ ██║ ███╗██████╔╝███████║██╔████╔██║ ██║ ██║██║███████╗██║██║ ██║██╔██╗ ██║
██║ ██╔══╝ ██║ ██╔══╝ ██║ ██║██╔══██╗██╔══██║██║╚██╔╝██║ ╚██╗ ██╔╝██║╚════██║██║██║ ██║██║╚██╗██║
██║ ███████╗███████╗███████╗╚██████╔╝██║ ██║██║ ██║██║ ╚═╝ ██║ ╚████╔╝ ██║███████║██║╚██████╔╝██║ ╚████║
╚═╝ ╚══════╝╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝

usage: start.py [-h] [-lat LATITUDE] [-long LONGITUDE] [-m METERS] [-t TIMESLEEP] [-s SPEED_KMH] [-tn TELEGRAM_NAME] [-ti TELEGRAM_API_ID]
[-th TELEGRAM_API_HASH]

Custom settings for script launch

optional arguments:
-h, --help show this help message and exit
-lat LATITUDE, --latitude LATITUDE
Latitude setting
-long LONGITUDE, --longitude LONGITUDE
Longitude setting
-m METERS, --meters METERS
Meters setting
-t TIMESLEEP, --timesleep TIMESLEEP
Timesleep setting
-s SPEED_KMH, --speed_kmh SPEED_KMH
Speed setting
-tn TELEGRAM_NAME, --telegram_name TELEGRAM_NAME
Telegram session name
-ti TELEGRAM_API_ID, --telegram_api_id TELEGRAM_API_ID
Telegram API ID
-th TELEGRAM_API_HASH, --telegram_api_hash TELEGRAM_API_HASH
Telegram API hash

AttributeError: 'PeerSelfLocated' object has no attribute 'distance'

What i get when i run the code
i tried different OS but still same problem

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/gehrman/Downloads/CCTV-main/start.py", line 174, in <module>
    if peer_located.distance == 500:
       ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PeerSelfLocated' object has no attribute 'distance'

Impossible to get a combined file

In the end, after successful json and html, he writes that the combined file has been successfully created, but he does not throw me anywhere, as shown in the video, and no link and no files are given anywhere.

The user has been deleted/deactivated (caused by GetLocatedRequest)

Traceback (most recent call last):
File "/Users/x/Desktop/CCTV/start.py", line 144, in
result = client(functions.contacts.GetLocatedRequest(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/telethon/sync.py", line 39, in syncified
return loop.run_until_complete(coro)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/telethon/client/users.py", line 30, in call
return await self._call(self._sender, request, ordered=ordered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.12/site-packages/telethon/client/users.py", line 87, in _call
result = await future
^^^^^^^^^^^^
telethon.errors.rpcerrorlist.UserDeactivatedBanError: The user has been deleted/deactivated (caused by GetLocatedRequest)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/x/Desktop/CCTV/start.py", line 151, in
except FloodWaitError as e:
^^^^^^^^^^^^^^
NameError: name 'FloodWaitError' is not defined

'PeerSelfLocated' object has no attribute 'distance'

After successfully adding my coordinates (I'm hiding them unless necessary, but they are well-located) and logging into Telegram through the app, I get the following error:

[ * ] Harvesting information based on the next coordinates:
        [ * * ] Latitude:  -34.XXX
        [ * * ] Longitude: -58.XXXX
        [ * * ] Country:   Argentina
        [ * * ] City:      [Hidden]
        [ * * ] Town:      

[ * ] Overall steps to be performed: 25 , with overall diameter 2000 meters

[ * ] Telegram client initialization...successfully

[ * ] Start harvesting data:
        [ 1 ] Latitude -34.XXXX, Longitude -58.XXXX
Traceback (most recent call last):
  File "/home/lucas/CCTV/start.py", line 156, in <module>
    if peer_located.distance == 500:
       ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PeerSelfLocated' object has no attribute 'distance'

Thanks in advance!

struct.error: 'i' format requires -2147483648 <= number <= 2147483647

While running the script I am getting the following error (followed instructiond as per README)
struct.error: 'i' format requires -2147483648 <= number <= 2147483647
what might be the issue causing this?

Detailed error

Telegram client initialization...Request caused struct.error: 'i' format requires -2147483648 <= number <= 2147483647: InvokeWithLayerRequest(layer=173, query=InitConnectionRequest(api_id=6981635625, device_model='arm64', system_version='23.4.0', app_version='1.34.0', system_lang_code='en', lang_pack='', lang_code='en', query=GetConfigRequest(), proxy=None, params=None))
Traceback (most recent call last):
File "/path/CCTV/start.py", line 108, in <module>
with TelegramClient(telegram_name, telegram_api_id, telegram_api_hash) as client:

where to create `config.yaml` ?

I put the file 'config.yaml' in the root directory with 'start.py'

I also noticed that my Telegram API prompts 'It is forbidden to pass this value to third parties.'

I don't know what to do next?

[root@XXXXX CCTV]# python3 start.py
Traceback (most recent call last):
File "start.py", line 12, in
from backend.banners import (
File "/root/CCTV/backend/banners.py", line 1, in
from .functions import get_location_details
File "/root/CCTV/backend/functions.py", line 8, in
import yaml
ModuleNotFoundError: No module named 'yaml'

Версия Python?

Какая версия Python должна быть, чтобы запустить код?

Telegram client initialization...

[ * ] Telegram client initialization...Attempt 1 at connecting failed: TimeoutError:
Attempt 2 at connecting failed: TimeoutError:
Attempt 3 at connecting failed: TimeoutError:
Attempt 4 at connecting failed: TimeoutError:
image

Bug or feature?

Обнаружил, что на карту попадают люди, у которых есть премиум аккаунт и они в профиле указали свою локацию.
Для премиум аккаунтов была добавлена возможность превратить свой аккаунт в бизнес-аккаунт. И одна из возможностей это указать расположение в профиле. Так вот, на карту попадают люди, которые указали у себя в профиле искомое нами место.

Для примера я взял координаты 16.971753, 7.987384. Это страна Нигер, город Агадес.
image

Как-то много людей с русскими никнеймами для Нигера.
Походил по их профилям, заметил, что их всех объединяет, что у них просто указан Нигер в профиле.
image
image
Тут тоже "Чёрная пещера" открывает на картах город Агадес
image

Как это фиксить у меня пока нет идей и не знаю надо ли вообще это фиксить. Как минимум бы помечать на карте как-то этих людей, что это не их точная локация из "люди рядом", а это они сами у себя в профиле указали.
Может быть можно как-то отдельно подтягивать из апи информацию о профиле, вытягивать от туда локацию если есть и под конец сверять то что мы получили и то что в профиле указано. Хотя я не видел в апи чтобы возвращалась эта информация

AttributeError: 'UserProfilePhotoEmpty' object has no attribute 'photo_id'

Hi,

Your tool likes very cool...i would like to test it. But, I have this message after with all config OK. What can i do ?

Traceback (most recent call last):
File "/home/myID/tools/telegram/CCTV/start.py", line 153, in
"photo_id": user_info.photo.photo_id if user_info.photo else None,
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'UserProfilePhotoEmpty' object has no attribute 'photo_id'

OperationalError: database is locked

Добрый день! Не подскажете, почему выдает дакую ошибку?
Что в colab, что в Spyder (на Anaconda) не хочет работать:

colab

spyder

Html-файл

Всем привет! не генерирует html-файл с картой почему-то :( только json

[ * ] Harvesting information based on the next coordinates:
	[ * * ] Latitude:  51.51404
	[ * * ] Longitude: -0.15063
	[ * * ] Country:   United Kingdom
	[ * * ] City:	   London
	[ * * ] Town:	   

[ * ] Overall steps to be performed: 25 , with overall diameter 2400 meters

[ * ] Telegram client initialization...successfully
[ ! ] Configured timesleep 30s is too low to cover all points with configured speed 50 km/h
[ ! ] Adjusting sleep time to 43s according to calculated distances

[ * ] Start harvesting data:
	[ 1/25 ] Latitude 51.514, Longitude -0.1506
		[ > ] Harvesting data finished
		[ > ] Updating JSON file...successfully

Баг?

Приветствую, сканировал Москву, корды центра высота 140 метров, дальше все стандартно. В итоге при открытии мозилы "файл не существует". Посмотрел куда он сохранил, по пути тоже не открывает.
image
image

Скорость и другие параметры

Иван, подскажите пожалуйста значение параметра скорость. Что он определяет ? Это фильтр и отбираются только те пользователи, которые двигаются меньше / больше этой скорости? Как это определяется? Между двумя замерами объект должен перемещаться с такой скоростью или между всеми 25? Можно подробнее пожалуйста по этому параметру, а также по двум другим:

  • задержка в секундах - я так понимаю, это для снижения вероятности блокировки аккаунта?
  • радиус (диаметр) в метрах - как работает данный параметр? Все, что выходит за данный радиус/диаметр (? какой вариант), не попадает в выборку?

Спасибо за инструмент!

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.