Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MAVProxyUser opened this issue May 7, 2024 · 44 comments
Open

Comments

@MAVProxyUser
Copy link

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

@MAVProxyUser
Copy link
Author

GM_6x11WsAA9mXQ

@berkutmraz
Copy link

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

@IvanGlinkin
Copy link
Owner

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

@MAVProxyUser
Copy link
Author

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
Copy link
Owner

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 - LonamiWebs/Telethon#297 - TG bans only VOIP/virtual numbers and almost never physical ones.
Thanks

@MAVProxyUser
Copy link
Author

My personal physical number

@IvanGlinkin
Copy link
Owner

My personal physical number

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

@levensonblaine
Copy link

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

@IvanGlinkin
Copy link
Owner

IvanGlinkin commented May 9, 2024

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
Copy link

ImMALWARE commented May 9, 2024

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
Copy link

[ * ] 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
Copy link

killer010599124 commented May 11, 2024

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
Copy link

I used usa physical phone number in russia.

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

@killer010599124
Copy link

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

@MAVProxyUser
Copy link
Author

Queen - Another One Bites the Dust (Official Video)

Queen - Another One Bites the Dust

@killer010599124
Copy link

?

@MAVProxyUser
Copy link
Author

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

@killer010599124
Copy link

thanks..
what is solution?

@IvanGlinkin
Copy link
Owner

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
Copy link

don't understand well
what is queries time?

@IvanGlinkin
Copy link
Owner

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
Copy link

this code is working fine in your side?

@killer010599124
Copy link

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

@IvanGlinkin
Copy link
Owner

IvanGlinkin commented May 11, 2024

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
Copy link
Author

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
Copy link
Owner

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
Copy link

zaycad commented May 14, 2024

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
Copy link
Owner

IvanGlinkin commented May 14, 2024

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
Copy link

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
Copy link
Owner

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
Copy link

ImMALWARE commented May 16, 2024

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
Copy link
Owner

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
Copy link

keyreel commented May 17, 2024

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

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

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

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

@keyreel
Copy link

keyreel commented May 17, 2024

с ботом тоже не получилось:
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
Copy link

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
Copy link

keyreel commented May 17, 2024

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
Copy link

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

@keyreel
Copy link

keyreel commented May 26, 2024

@IvanGlinkin any chance to avoid blocking?

@keyreel
Copy link

keyreel commented Jun 5, 2024

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

@IvanGlinkin
Copy link
Owner

IvanGlinkin commented Jun 5, 2024

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

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

@keyreel
Copy link

keyreel commented Jun 5, 2024

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

@CombainerA19
Copy link

CombainerA19 commented Jun 13, 2024

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

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

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

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

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

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

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

@ImMALWARE
Copy link

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

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

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

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

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

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

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

@robot-le
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests