Open RedMaxwell145 opened 1 week ago
Same problem, waiting for a fix from the developer.
Apologies for the delay, just saw these issues. I havn't been able to recreate them on my end, but I believe they are due to some changes to Python on how EventLoops/Asyncio work.
I suggest replacing the launcher.py code with the following and seeing if that fixes the problem. If it works for you, I'll push the changes to live.
import asyncio
from telethon.sync import TelegramClient
from colorama import init, Fore, Style
# Initialize colorama
init(autoreset=True)
# Function to stop any existing asyncio event loop
def stop_event_loop():
try:
loop = asyncio.get_event_loop() # This line may raise a warning
if loop.is_running():
loop.stop() # Stop the running loop
except Exception as e:
# If there's no current event loop, create and set a new one
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
# Launcher code
print(
f'{Fore.CYAN} __________________________________________________________________'
)
print(
f'{Fore.CYAN} _______ ______ _ ______ _____ ______ _____ ____ _ _ '
)
print(Fore.CYAN + r' |__ __| ____| | | ____| __ \| ____/ ____/ __ \| \ | | ')
print(Fore.CYAN + r' | | | |__ | | | |__ | |__) | |__ | | | | | | \| | ')
print(
f'{Fore.CYAN} | | | __| | | | __| | _ /| __|| | | | | | . ` | '
)
print(Fore.CYAN + r' | | | |____| |____| |____| | \ \| |___| |___| |__| | |\ | ')
print(Fore.CYAN + r' |_| |______|______|______|_| \_\______\_____\____/|_| \_| v2.1')
print(
f'{Fore.CYAN}___________________________________________________________________'
)
print(Style.RESET_ALL)
print(f'{Fore.YELLOW} ')
print(f'{Fore.YELLOW}Welcome to Telerecon, a scraper and reconnaissance framework for Telegram')
print("")
print(f'{Fore.YELLOW}Please select an option:')
print(Style.RESET_ALL)
# Available options for the user
options = {
'Get user information': 'userdetails.py',
'Check user activity across a list of channels': 'recon.py',
'Collect user messages from a target channel': 'userscraper.py',
'Collect user messages from a list of target channels': 'usermultiscraper.py',
'Scrape all messages within a channel': 'channelscraper.py',
'Scrape all t.me URL’s from within a channel': 'urlscraper.py',
'Scrape forwarding relationships into target channel': 'channels.py',
'Scrape forwarding relationships into a list of target channel': 'channellist.py',
'Identify possible user associates via interaction network map': 'network.py',
'Parse user messages to extract selectors/intel': 'selector.py',
'Extract GPS data from collected user media': 'metadata.py',
'Create visualization report from collected user messages': 'frequency.py',
'Extract named entities from collected user messages': 'ner.py',
'Conduct a subscriber census across a list of target channels': 'census.py',
'Parse user messages to extract ideological indicators': 'indicators.py',
'Parse user messages to extract indicators of capability and violent intent': 'assessment.py'
}
# Function to display options to the user
def display(options):
for idx, option in enumerate(options.keys(), start=1):
print(f"{idx}. {option}")
# Function to get the user's choice
def get_choice(options):
choose = int(input("\nPick a number: ")) - 1
if choose < 0 or choose >= len(options):
print('Invalid choice')
return None
return list(options.values())[choose]
# Display the options and get the user's choice
display(options)
# Assign the choice made by the user
choice = get_choice(options)
# If a valid choice was made, proceed to stop event loop and execute the script
if choice:
# Stop any existing event loop
stop_event_loop()
print(f'Loading {choice}...')
# Execute the selected script
exec(open(choice).read())
I wanted to use Telerecon but it's giving me an error message everytime I choose something in the menu