Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Parse and construct Telegram file_id
s and unique_file_id
s.
Even generate a unique_file_id
from a file_id
.
pip install tg-file-id
file_id
sfrom tg_file_id.file_id import FileId
file_id = FileId.from_file_id('CAACAgIAAxkBAAIEol9yQhBqFnT4HXldAh31a-hYXuDIAAIECwACAoujAAFFn1sl9AABHbkbBA')
Now the file_id
variable is an object like this:
DocumentFileId(
file_id='CAACAgIAAxkBAAIEol9yQhBqFnT4HXldAh31a-hYXuDIAAIECwACAoujAAFFn1sl9AABHbkbBA',
type_id=8,
type_generic='document',
type_detailed='sticker',
dc_id=2,
id=46033261910035204,
access_hash=-5107925353769492667,
version=4,
sub_version=27,
)
file_unique_id
sfrom tg_file_id.file_unique_id import FileUniqueId
unique_id = FileUniqueId.from_unique_id('AgADBAsAAgKLowAB')
Now the unique_id
variable is an object like this:
FileUniqueId(
unique_id='AgADBAsAAgKLowAB',
type_id=2,
id=46033261910035204
)
file_id
s to file_unique_id
sfrom tg_file_id.file_unique_id import FileUniqueId
unique_id = FileUniqueId.from_file_id('CAACAgIAAxkBAAIEol9yQhBqFnT4HXldAh31a-hYXuDIAAIECwACAoujAAFFn1sl9AABHbkbBA')
calculated_file_unique_id = unique_id.to_unique_id()
Now calculated_file_unique_id
is
'AgADBAsAAgKLowAB'
FAQs
Decode and encode telegram file_id and file_unique_id and convert between those.
We found that tg-file-id demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.