fix: [telegram module] fix tagging

pull/497/head
Terrtia 2020-05-11 14:47:08 +02:00
parent daf534d74b
commit 013f32c7d1
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 9 additions and 3 deletions

View File

@ -118,8 +118,12 @@ def search_telegram(item_id, item_date, item_content):
else: else:
signal.alarm(0) signal.alarm(0)
invite_code_found = False
for telegram_link in telegram_links: for telegram_link in telegram_links:
res_0 = extract_data_from_telegram_url(item_id, item_date, telegram_link[0], telegram_link[1]) res = extract_data_from_telegram_url(item_id, item_date, telegram_link[0], telegram_link[1])
if res;
invite_code_found = True
# tg links # tg links
signal.alarm(max_execution_time) signal.alarm(max_execution_time)
@ -133,9 +137,11 @@ def search_telegram(item_id, item_date, item_content):
signal.alarm(0) signal.alarm(0)
for tg_link in tg_links: for tg_link in tg_links:
res_1 = extract_data_from_tg_url(item_id, item_date, tg_link) res = extract_data_from_tg_url(item_id, item_date, tg_link)
if res;
invite_code_found = True
if res_0 or res_1: if invite_code_found:
#tags #tags
msg = 'infoleak:automatic-detection="telegram-invite-hash";{}'.format(item_id) msg = 'infoleak:automatic-detection="telegram-invite-hash";{}'.format(item_id)
p.populate_set_out(msg, 'Tags') p.populate_set_out(msg, 'Tags')