TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #241 · 5 мај

Можно ли в Python создавать бинарные файлы? Конечно можно. Для этого в Python есть следующие инструменты: ▫️ тип данных bytes и bytearray ▫️ открытие файла в режиме wb (write binary) или rb (read binary) ▫️ модуль struct Про модуль struct поговорим в первую очередь. Файл в формате JSON или Yaml внутри себя содержит разметку данных. Всегда можно определить где список начался а где закончился. Где записана строка а где словарь. То есть формат записи данных содержит в себе элементы разметки данных. В binary-файле данные не имеют визуальной разметки. Это просто байты, записанные один за другим. Правила записи и чтения находятся вне файла. Модуль struct как раз и помогает с организацией данных в таком файле с помощью определения форматов записи для разных частей файла. Модуль struct преобразует Python-объекты в массив байт, готовый к записи в файл и имеющий определённый вид. Для этого всегда следует указывать формат преобразования (или, как оно здесь называется - запаковки). Формат нужен для того, чтобы выделить достаточное количество байт для записи конкретного типа объекта. В последствии с помощью того же формата будет производиться чтение. При этом следует помнить что мы говорим о типах языка С а не Python. Именно формат определяет, что записано в конкретном месте файла, число, строка или что-то еще. Вот какие токены формата у нас есть. Помимо этого, первым символом можно указать порядок байтов. На разных системах одни и те же типы данных могут записываться по-разному, поэтому желательно указать конкретный способ из доступных. Если этого не сделать, то используется символ '@', то есть нативный для текущей системы. В строке формата мы пишем в каком порядке и какие типы собираемся преобразовать в байты. Запакуем в байты простое число, токен "i". >>> import struct >>> struct.pack('=i', 10) b'\n\x00\x00\x00' Теперь несколько float, при этом нужно передавать элементы не массивом а последовательностью аргументов. >>> struct.pack('=fff', 1.0, 2.5, 4.1) b'\x00\x00\x80?\x00\x00 @33\x83@' Вместо нескольких токенов можно просто указать нужное количество элементов перед одним токеном, результат будет тот же. >>> struct.pack('=3f', 1.0, 2.5, 4.1) b'\x00\x00\x80?\x00\x00 @33\x83@' Теперь запакуем разные типы >>> data = struct.pack('=fiQ', 1.0, 4, 100500) я запаковал типы float, int и unsigned long long (очень большой int, на 8 байт) b'\x00\x00\x80?\x04\x00\x00...' Распаковка происходит аналогично, но нужно указать тот же формат, который использовался при запаковке. Результат возвращается всегда в виде кортежа. >>> struct.unpack('=fiQ', data) (1.0, 4, 100500) Как видите, ничего страшного! #lib#basic

Hashtags

Резултати

Пронајдени 6 слични објави

Пребарај: #spyware

当前筛选 #spyware清除筛选
Libreware

@libreware · Post #1524 · 23.01.2026 г., 15:09

Nora-Desktop Facebook, Instagram, Reddit, Threads and X in a single app. No ads. Features a deck view to easily browse multiple timelines. Linux, Android, macOS, Windows versions are available. (GNU GPL3) Features 1. No ads 2. Download image 3. Download fb/ig/x video 4. Select text 5. Zoom 6. Remove tracking url query params Supported SNS (Social-Networking-Sites) 1. Bluesky 2. Facebook 2. Instagram 4. LinkedIn 5. Reddit 4. Threads 5. TikTok 6. Tumblr 7. VK 8. X (Twitter) How it works Wrap the SNS websites in Android webview Inject code to block ads Get it on GITHUB : https://github.com/nonbili/Nora-Desktop Get it on F-DROID (main repo) - https://f-droid.org/packages/jp.nonbili.nora/ Also available on gulag store Disclaimer : we don't promote any of those zionist occupied censored websites and apps and are firmly against using them as they are nothing but #spyware designed to make people dumb

Hashtags

Libreware

@libreware · Post #884 · 28.12.2020 г., 14:30

Windows reference manual If you suddenly find you have Windows on your hard drive: - dd if=/dev/zero of=/dev/[drive] - burning causes pollution so just call an exorcist General: - https://rentry.co/fwt - https://t.me/NoGoolag/2549 - https://tb.rg-adguard.net/public.php - https://github.com/jebofponderworthy/windows-tools - https://github.com/massgravel/Microsoft-Activation-Scripts App managers: - https://chocolatey.org - https://scoop.sh - https://store.rg-adguard.net Telemetry: -https://docs.microsoft.com/en-us/windows/privacy/manage-connections-from-windows-operating-system-components-to-microsoft-services - https://docs.microsoft.com/en-us/windows/privacy/configure-windows-diagnostic-data-in-your-organization - https://github.com/mirinsoft/debotnet - https://github.com/Sycnex/Windows10Debloater Security reference: - https://docs.microsoft.com/en-us/windows/security - Use Enterprise edition. It has a lot more security features. - Use Virtualization Based Security to stop stuff like mimikatz or capcom.sys - https://github.com/beerisgood/Windows10_Hardening - https://www.microsoft.com/security/blog/2020/03/17/secured-core-pcs-a-brief-showcase-of-chip-to-cloud-security-against-kernel-attacks/ - https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/applocker/using-software-restriction-policies-and-applocker-policies - https://docs.microsoft.com/en-us/windows/security/information-protection/bitlocker/bitlocker-group-policy-settings#a-href-idbkmk-unlockpol1arequire-additional-authentication-at-startup - https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-atp/controlled-folders -https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-application-guard/md-app-guard-overview - User accounts is part of the windows security model, its better to use an admin account only when you need it rather than 24/7 #windows#spyware

The Hacker News

@thehackernews · Post #8723 · 02.04.2026 г., 09:53

🛑 WhatsApp alerted ~200 users targeted by a fake iOS app carrying #spyware, mostly in Italy. The attack used social engineering to mimic #WhatsApp. Meta is acting against an Italian firm linked to the spyware. 🔗 Read details here → https://thehackernews.com/2026/04/whatsapp-alerts-200-users-after-fake.html

Medet Turin 🫆

@allsafekz · Post #731 · 20.05.2025 г., 09:37

https://lnkd.in/e25HNh7A Alhamdulillah, I finished writing this book in few days. I wrote this book to help my friends: Nurkhankyzy Aiya, Acute myeloid leukemia (AML). and all those children who are fighting for their lives. Why is the book called that? AIYA MMD - means Attack and Introduction or (Android and IOS), start Your Adventure in Mobile Malware Development. also AIYA means AIYA Nurkhankyzy. I will be very happy if this book helps at least one person to gain knowledge and learn the science of cybersecurity. The book is mostly practice oriented. Of course the book is not as big as my previous works, this is because firstly I needed to urgently start a fundraising campaign for the Aiya and secondly many things remain confidential (NDA) Mobile malware - it's a constantly evolving battlefield. What you learned here is just the beginning. Tools change, defenses adapt, but the mindset stays the same: think like the adversary to build stronger defenses. This book is dedicated to my wife, Laura, and my children, Yerzhan and Munira. I would like to express my deep gratitude to my friends and colleagues. Special thanks to #Russian#hacking#community, Medet Turin 2600.kz, BlackIce #hackerspace from Almaty (Kazakhstan) and my friends from Middle East countries: Kingdom of Bahrain, Kingdom of Saudi Arabia, UAE. All examples are practical cases for educational and research purposes only. Book design by: Muhammad Patel twitter: https://x.com/cocomelonckz/status/1924724518951457229 #hacking#mobile#malware#research#book#programming#android#ios#rat#spyware

Чёрный Лёд

@blackicehackerspace · Post #107 · 20.05.2025 г., 09:38

https://lnkd.in/e25HNh7A Alhamdulillah, I finished writing this book in few days. I wrote this book to help my friends: Nurkhankyzy Aiya, Acute myeloid leukemia (AML). and all those children who are fighting for their lives. Why is the book called that? AIYA MMD - means Attack and Introduction or (Android and IOS), start Your Adventure in Mobile Malware Development. also AIYA means AIYA Nurkhankyzy. I will be very happy if this book helps at least one person to gain knowledge and learn the science of cybersecurity. The book is mostly practice oriented. Of course the book is not as big as my previous works, this is because firstly I needed to urgently start a fundraising campaign for the Aiya and secondly many things remain confidential (NDA) Mobile malware - it's a constantly evolving battlefield. What you learned here is just the beginning. Tools change, defenses adapt, but the mindset stays the same: think like the adversary to build stronger defenses. This book is dedicated to my wife, Laura, and my children, Yerzhan and Munira. I would like to express my deep gratitude to my friends and colleagues. Special thanks to #Russian#hacking#community, Medet Turin 2600.kz, BlackIce #hackerspace from Almaty (Kazakhstan) and my friends from Middle East countries: Kingdom of Bahrain, Kingdom of Saudi Arabia, UAE. All examples are practical cases for educational and research purposes only. Book design by: Muhammad Patel twitter: https://x.com/cocomelonckz/status/1924724518951457229 #hacking#mobile#malware#research#book#programming#android#ios#rat#spyware