IvanGlinkin / 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
GNU General Public License v3.0
2.29k stars 315 forks source link

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

Open MAVProxyUser opened 2 months ago

MAVProxyUser commented 2 months ago

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/python@3.12/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

MAVProxyUser commented 2 months ago

GM_6x11WsAA9mXQ

berkutmraz commented 2 months ago

изображение_2024-05-09_005806939

IvanGlinkin commented 2 months ago

I don't know guys - it's better to ask TG about it. I may suggest they started banning accounts.

MAVProxyUser commented 2 months ago

Yeah... you probably should put a HUGE warning in the README. I used your tool for literally 20 seconds, and now I don't get to use Telegram any more. I'm not the only one.

IvanGlinkin commented 2 months ago

Yeah... you probably should put a HUGE warning in the README. I used your tool for literally 20 seconds, and now I don't get to use Telegram any more. I'm not the only one.

May I ask what kind of number did you use? As I can see on the other repository's issue - https://github.com/LonamiWebs/Telethon/issues/297 - TG bans only VOIP/virtual numbers and almost never physical ones. Thanks

MAVProxyUser commented 2 months ago

My personal physical number

IvanGlinkin commented 2 months ago

My personal physical number

sorry to hear that, man. but yeah, will update README definitely

levensonblaine commented 2 months ago

My personal physical number

sorry to hear that, man. but yeah, will update README definitely

try to use this bug https://github.com/LonamiWebs/Telethon/issues/4051#issuecomment-1491747149 to avoid bans, my accouns live longer after this

IvanGlinkin commented 2 months ago

Just to make it clear. Please correct me if I'm wrong.

  1. Telegram has a feature to find people nearby - https://telegram.org/faq#q-what-is-people-nearby
  2. Telegram has an official API to use this feature - https://core.telegram.org/api/nearby
  3. You are starting using TG's feature as it's intended
  4. You got Banned Did I miss anything?

Also. Just several rhetorical questions:

  1. If the official web-site says about 800 meters, why my phone showing 500 meters?
  2. if it's not accurate, why i found myself 100-150 meters away from the actual location?
  3. if it's only local search, how was I able to find people in the different countries? Screenshot 2024-05-09 at 10 34 11
ImMALWARE commented 2 months ago

My personal physical number

sorry to hear that, man. but yeah, will update README definitely

try to use this bug LonamiWebs/Telethon#4051 (comment) to avoid bans, my accouns live longer after this

Maybe its unrelated, but when i used telethon before, telegram always logged me out from all devices. No matter what script did (i was just sending automated messages to bot), even with this params. So its most probably impossible to use telethon without risk of ban.

Not only that, after logging in, all my messages that I send in 24 hours were deleted for everyone! Even messages that i sent manually. And with some chance, new messages just after loggin in are also being auto deleted for everyone.

Imagine how you would explain this to people that thought you got hacked by phishing :)

Maybe I'm very lucky that it just logged me out, not banned... Maybe its because of premium... We will never know this.

killer010599124 commented 1 month ago

[ * ] Start harvesting data: [ 1/9 ] Latitude 51.514, Longitude -0.1506 [ > ] Harvesting data finished [ > ] Updating JSON file...successfully Traceback (most recent call last): File "E:\Project\Matthew\telegramTracking\start.py", line 147, in result = client(functions.contacts.GetLocatedRequest( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\sync.py", line 39, in syncified return loop.run_until_complete(coro) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete return future.result() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\client\users.py", line 30, in call return await self._call(self._sender, request, ordered=ordered) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\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)

killer010599124 commented 1 month ago

I tried your code with several TG account. But all account was deleted. I used usa physical phone number in USA. I am not sure what is wrong.

levensonblaine commented 1 month ago

I used usa physical phone number in russia.

It’s your solving :) You have to use your country numbers or proxy

killer010599124 commented 1 month ago

one question,,, did you sccuess in this code?

MAVProxyUser commented 1 month ago

Queen - Another One Bites the Dust (Official Video)

Queen - Another One Bites the Dust

killer010599124 commented 1 month ago

?

MAVProxyUser commented 1 month ago

It will ban you with a 100% legit phone number in your own country too...

killer010599124 commented 1 month ago

thanks.. what is solution?

IvanGlinkin commented 1 month ago

one of the possible solution, as i can see: nevertheless, TG allows you to check other countries for at least 1-2 attempts. hence, need to try to increase delay between queries by 1 minute or even 2.

killer010599124 commented 1 month ago

don't understand well what is queries time?

IvanGlinkin commented 1 month ago

don't understand well what is queries time?

The time between queries. By default it's 30 seconds. Try to increase it like this:

Screenshot 2024-05-11 at 16 16 59
killer010599124 commented 1 month ago

this code is working fine in your side?

killer010599124 commented 1 month ago

what's your email? can we have direct chat?

IvanGlinkin commented 1 month ago

this code is working fine in your side?

so far yes. i set 61 seconds between queries, TG disconnected me, I logged in once again with an email and right now it's harvesting

Screenshot 2024-05-11 at 16 25 51

UPD: 25 queries just finished - everything worked fine with 61 seconds/request

MAVProxyUser commented 1 month ago

you should consider increasing the default to something longer, and instructing users that feel safe to decrease it. That way more people don't wind up on this post.... with a banned account. Seems like a better default would be responsible

IvanGlinkin commented 1 month ago

you should consider increasing the default to something longer, and instructing users that feel safe to decrease it. That way more people don't wind up on this post.... with a banned account. Seems like a better default would be responsible

You know, that could be a race between us and TG - we are increasing the time to avoid banning - they set another bottom line... repeat :) at the end - they will remove that feature and set it up as a bug (if it ever happen). but they can't set a huge time as it will brake the "find people nearby" feature Regarding banning - what are you suggested to do?

zaycad commented 1 month ago

https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#prevent-ban

from what I understand all accounts issued an API key are placed under immediate scrutiny. New or reused phone numbers even more. The current construction of the tool basically floods the TG API with repetitive requests at a constant interval. This type of behavior is incredibly detectable and conspicuous. CCTV is very public so it is likely telegram devs are monitoring the exploit as we speak.

You could try to send requests at a randomized interval. Perhaps the GPS coordinates could be altered within a reasonable tolerance between requests to mimic real traffic. Sending requests from a frequented location/IP and including your own location in your request may help as well. Anything to camouflage the traffic and make it look realistic will decrease your chance of ban.

Ultimately Telegram accounts with API access are very temperamental. The ideal vector for this would be to use 25 unique, aged accounts sending an individual request ( instead of one account sending 25 identical requests ).

IvanGlinkin commented 1 month ago

CCTV is very public so it is likely telegram devs are monitoring the exploit as we speak.

yeah, wanna say "hi" to TG developers) p.s. to be honest, TG is my only one messenger. I don't have WA, Viber, Signal, etc. And I really love how TG is making the product hence I wanna help to improve it's security.

UPD: btw, there are some scam TG channels which do not have anything common with me or this branch. Please be careful. TG team - if you read this, may I ask you please, to remove those channels? Thanks a lot

Screenshot 2024-05-14 at 13 18 47
ImMALWARE commented 1 month ago

CCTV is very public so it is likely telegram devs are monitoring the exploit as we speak.

yeah, wanna say "hi" to TG developers) p.s. to be honest, TG is my only one messenger. I don't have WA, Viber, Signal, etc. And I really love how TG is making the product hence I wanna help to improve it's security.

UPD: btw, there are some scam TG channels which do not have anything common with me or this branch. Please be careful. TG team - if you read this, may I ask you please, to remove those channels? Thanks a lot Screenshot 2024-05-14 at 13 18 47

They 100% won't read this and they totally don't care about users. They never read support emails and never explain why they ban telethon when allowing userbots :)

IvanGlinkin commented 1 month ago

They 100% won't read this and they totally don't care about users. They never read support emails and never explain why they ban telethon when allowing userbots :)

Man, if you watch Pavel's interview to Taker, he told he had around 30 people in his team and almost 1B users. Hence it's quite tough to manage customers when you have so few team members

ImMALWARE commented 1 month ago

They 100% won't read this and they totally don't care about users. They never read support emails and never explain why they ban telethon when allowing userbots :)

Man, if you watch Pavel's interview to Taker, he told he had around 30 people in his team and almost 1B users. Hence it's quite tough to manage customers when you have so few team members

I did watch it. But the thing is, they DO ANSWER some questions in Twitter. But not all. Its very strange. I asked them like 10 times about why my account isnt shown in search, no reply. I also saw some people asked about telethon bans, also no reply. But when somebody ask stupid question that can be googled, instant reply.

I understand its very hard to help people with such small team. But they totally ignore some questions. Thats why i think they dont actually care about users. Now, instead of optimizing their app, they add pointless features.

IvanGlinkin commented 1 month ago

I did watch it. But the thing is, they DO ANSWER some questions in Twitter. But not all. Its very strange. I asked them like 10 times about why my account isnt shown in search, no reply. I also saw some people asked about telethon bans, also no reply. But when somebody ask stupid question that can be googled, instant reply.

I understand its very hard to help people with such small team. But they totally ignore some questions. Thats why i think they dont actually care about users. Now, instead of optimizing their app, they add pointless features.

in that case, we are showing them flaws in a hard way, so the whole World knows about it ;)

keyreel commented 1 month ago

Спасибо за скрипт!

В контексте треда: При запуске скрипта запрашивается номер телефона ИЛИ токен бота. Это как-то может повлиять на ситуацию?

Сейчас ввожу номер и код, после этого скрипт не вываливается но и не продолжает работать - просто ничего не происходит (ранее, с другим номером, всё работало). Если остановить и запустить заново, то между номером и кодом выскакивает "Telegram is having internal issues AuthRestartError: Restart the authorization process (caused by SendCodeRequest)". Ввод кода снова не приводит ни к какому результату - скрипт не работает но и не вываливается. Как бороться?

В копилку кейсов - на свежем аккаунте, зарегистрированном на номер виртуального оператора, дал выполнить только одну задачу, при втором запуске сообщил что номер забанен.

keyreel commented 1 month ago

с ботом тоже не получилось: telethon.errors.rpcerrorlist.BotMethodInvalidError: The API access for bot users is restricted. The method you tried to invoke cannot be executed as a bot (caused by GetLocatedRequest)

killer010599124 commented 1 month ago

Hey keyreel. This code was mess. I had tried several times with this code. But all telegram account was banned or deleted. Don't use this code

keyreel commented 1 month ago

I've used a number of accounts, just 1 was banned - the number of a VOIP operator. The last one account not banned but do not work. I think that Ivan will find the proper way :)

bekha-io commented 1 month ago

финита ля комедия

keyreel commented 1 month ago

@IvanGlinkin any chance to avoid blocking?

keyreel commented 1 month ago

у всех всё работает? есть статистика или рекомендации чтобы блока избежать?

IvanGlinkin commented 1 month ago

Ребят, я иногда поражаюсь вашей наивности. Неужели вы думаете, что в телеграме сидят дураки и оставляют дыры открытыми? А еще, что мы можем написать 2-3 строчки кода, чтобы обойти блокировку телеграма, которую они делают не для галочки? И главный вопрос - так как код у нас open-source и все могут его прочитать и понять как он работает, а потом еще в issues написать как обойти блокировку, телега это НЕ ПРОЧИТАЕТ и через пару дней не примет контрмеры?

Основной обход блокировки который реализован - задержка по времени между запросами. Второй обход (он не реализован, если есть желание - велкам в конрибюторы) - сделать несколько аккаунтов и в несколько treads в параллель делать запросы. Пока телега не сделала капчу или что-то похожее - все это работает.

keyreel commented 1 month ago

Понял, спасибо! и респект за труды :)

CombainerA19 commented 3 weeks ago

Ребят, я иногда поражаюсь вашей наивности. Неужели вы думаете, что в телеграме сидят дураки и оставляют дыры открытыми? А еще, что мы можем написать 2-3 строчки кода, чтобы обойти блокировку телеграма, которую они делают не для галочки? И главный вопрос - так как код у нас open-source и все могут его прочитать и понять как он работает, а потом еще в issues написать как обойти блокировку, телега это НЕ ПРОЧИТАЕТ и через пару дней не примет контрмеры?

Основной обход блокировки который реализован - задержка по времени между запросами. Второй обход (он не реализован, если есть желание - велкам в конрибюторы) - сделать несколько аккаунтов и в несколько treads в параллель делать запросы. Пока телега не сделала капчу или что-то похожее - все это работает.

Есть ещё один вариант, поменять библиотеку c telethon на pyrogram.

С telethon замечены многочисленные проблемы при работе с API: выкидывает сессию, банит аккаунты.

Через pyrogram я парсил 50к аккаунтов без задержек, без банов.

Как ты отметил ранее, мы используем официальные инструменты телеграм: люди рядом и апи методы.

Банить не за что.

ImMALWARE commented 3 weeks ago

Ребят, я иногда поражаюсь вашей наивности. Неужели вы думаете, что в телеграме сидят дураки и оставляют дыры открытыми? А еще, что мы можем написать 2-3 строчки кода, чтобы обойти блокировку телеграма, которую они делают не для галочки? И главный вопрос - так как код у нас open-source и все могут его прочитать и понять как он работает, а потом еще в issues написать как обойти блокировку, телега это НЕ ПРОЧИТАЕТ и через пару дней не примет контрмеры? Основной обход блокировки который реализован - задержка по времени между запросами. Второй обход (он не реализован, если есть желание - велкам в конрибюторы) - сделать несколько аккаунтов и в несколько treads в параллель делать запросы. Пока телега не сделала капчу или что-то похожее - все это работает.

Есть ещё один вариант, поменять библиотеку c telethon на pyrogram.

С telethon замечены многочисленные проблемы при работе с API: выкидывает сессию, банит аккаунты.

Через pyrogram я парсил 50к аккаунтов без задержек, без банов.

Как ты отметил ранее, мы используем официальные инструменты телеграм: люди рядом и апи методы.

Банить не за что.

pyrogram банится так же часто, как telethon

robot-le commented 2 weeks ago

Второй обход (он не реализован, если есть желание - велкам в конрибюторы) - сделать несколько аккаунтов и в несколько treads в параллель делать запросы.

Изучал сейчас варианты использования нескольких аккаунтов. Правильно ли понимаю что многопоточность в данном случае предпочтительнее асинхронности только потому что легче интегрировать в синхронный код и не придётся переписывать весь код на аснхронный, или есть ещё какие-то подводные камни при использовании asyncio в этом контексте?