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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #309 · 2 фев.

Метод строки split() разделяет строку на несколько строк по указанному символу >>> "a_b_c".split('_') ['a', 'b', 'c'] Можно указать максимальное количество разделений >>> "a_b_c".split('_', 1) ['a', 'b_c'] Или резать с другой стороны с помощью rsplit() (right split) >>> "a_b_c".rsplit('_', 1) ['a_b', 'c'] А что будет если оставить аргументы пустыми? >>> "a_b_c".split() ['a_b_c'] Получаем список с одним элементом, потому что по умолчанию используется пробельный символ. >>> "a b c".split() ['a', 'b', 'c'] То есть это равнозначно такому вызову? >>> "a b c".split(" ") ['a', 'b', 'c'] Кажется да, но нет! Давайте попробуем добавить пробелов между буквами >>> "a b c".split(" ") ['a', '', '', 'b', '', '', 'c'] И вот картина уже не так предсказуема 😕 А вот что будет по умолчанию >>> "a b c".split() ['a', 'b', 'c'] Всё снова красиво! 🤩 По умолчанию в качестве разделителя используется любой пробельный символ, будь то табуляция или новая строка. Включая несколько таких символов идущих подряд. А также игнорируются пробельные символы по краям строки. >>> "a\t b\n c ".split() ['a', 'b', 'c'] Аналогичный способ можно собрать с помощью регулярного выражения. Но пробелы по краям строки придется обрабатывать дополнительно. >>> import re >>> re.split(r"\s+", ' a b c '.strip()) ['a', 'b', 'c'] Здесь тоже можно указать количество разделений >>> re.split(r"\s+", 'a b c', 1) ['a', 'b c'] А что если мы хотим написать красиво, то есть split() без аргументов, но при этом указать количество разделений? В этом случае первым аргументом передаём None >>> "a\n b c".split(None, 1) ['a', 'b c'] Данный метод не учитывает строки с пробелами, взятые в кавычки 'a "b c" '.split() ['a', '"b', 'c"'] Но для таких случаев есть другие способы. #tricks#basic

Резултати

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

Пребарај: #cti

当前筛选 #cti清除筛选
GitHub Trends

@githubtrending · Post #15234 · 18.10.2025 г., 11:30

#other#cti#cyberhunter#darkweb#deepweb#threat_intelligence deepdarkCTI is a free project that collects and shares cyber threat intelligence (CTI) from the deep and dark web, helping you stay aware of hidden cyber threats like stolen data, ransomware, and hacker activities. It gathers information from places like Telegram, Discord, hacker forums, and ransomware sites to provide useful indicators and patterns of cyber attacks. You can join their Telegram group to discuss and suggest new sources or support the project with donations. Using deepdarkCTI helps you detect threats early, improve your cybersecurity decisions, and protect your organization from cyber attacks more effectively. https://github.com/fastfire/deepdarkCTI

GitHub Trends

@githubtrending · Post #14721 · 19.05.2025 г., 12:01

#python#cli#cti#cybersecurity#forensics#hacktoberfest#information_gathering#infosec#linux#osint#pentesting#python#python3#reconnaissance#redteam#sherlock#tools Sherlock is a powerful tool that helps you find social media accounts by username across over 400 networks. It's easy to use and works on many operating systems like macOS, Linux, and Windows. You can install it using methods like `pipx` or Docker, and then simply type the username you want to search for. Sherlock will show you where that username is used on different social media platforms. This tool is useful for gathering information quickly and can be run locally or even online through services like Apify. It saves time and effort in finding accounts across many platforms. https://github.com/sherlock-project/sherlock

GitHub Trends

@githubtrending · Post #15601 · 05.04.2026 г., 11:30

#yara#awesome_list#blueteam#blueteam_tools#cti#detection#detection_engineering#dfir#hacktools#incident_response#ioc#iocs#ir#ransomware#redteam#rmm#security#siem#soc#threat_hunting#threat_intelligence You can access comprehensive security detection lists and threat hunting resources that help identify malicious activity across your infrastructure. These curated collections include indicators like suspicious file hashes, domain names, IP addresses, and behavioral patterns organized by threat type—from ransomware and phishing to command-and-control servers and vulnerable drivers. By integrating these lists into your security tools like SIEM platforms and endpoint detection systems, you gain immediate visibility into known threats while learning detection methodologies through guides and YARA rules. This accelerates your ability to hunt for compromises, validate security controls, and stay current with emerging attack techniques without building detection logic from scratch. https://github.com/mthcht/awesome-lists