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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #418 · 9 мар.

Оператор pipe позволяет писать более компактный код, реализуя логику объединения данных (Union). Важно помнить, что его поведение зависит от контекста. Побитовые операции (логическое OR) result = 5 | 3 # 5 (0101) | 3 (0011) = 7 (0111) Самое главное - не путать с оператором or, это другое! Объединение множеств set_a = {1, 2, 3} set_b = {3, 4, 5} set_c = set_a | set_b # {1, 2, 3, 4, 5} set_c |= {5, 6} # {1, 2, 3, 4, 5, 6} Слияние словарей dict_1 = {"a": 1, "b": 2} dict_2 = {"b": 3, "c": 4} merged = dict_1 | dict_2 # {'a': 1, 'b': 3, 'c': 4} merged |= {"d": 5} # {'a': 1, 'b': 3, 'c': 4, 'd': 5} Аннотации типов, заменяет Union def process_data(value: int | str) -> None: print(value) Допустимо использовать в isinstance или issubclass isinstance(3, int | float) # True Паттерн-матчинг status_code = 404 match status_code: case 200 | 201 | 204: print("OK") case 400 | 404 | 500: print("ERROR") Для использования в своих классах требуется переопределить метод __or__ Так же нашел библиотеку pipe которая добавляет еще много возможностей. Рекомендую ознакомиться ;) #basic

Hashtags

Резултати

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

Пребарај: #mongodb

当前筛选 #mongodb清除筛选
infosecurity

@tg_infosec · Post #3382 · 11.07.2025 г., 16:29

👨‍💻 Attacking MongoDB. • MongoDB — это кроссплатформенная документо-ориентированная система управления базами данных. Относясь к категории NoSQL, MongoDB отказывается от традиционной таблично-ориентированной структуры реляционных баз данных в пользу JSON-документов с динамическими схемами, что делает интеграцию данных в приложениях более быстрой и простой. • Поговорим о защищенности MongoDB. На самом деле MongoDB безопасна в использовании, если вы знаете, что искать и как это настраивать. • Enumeration: ➡Nmap MongoDB Brute Force Attack; ➡Metasploit MongoDB Login Scanner; ➡Shodan Search for MongoDB Instances; ➡Manual MongoDB Interaction via PyMongo; ➡Common MongoDB Commands; ➡Automating MongoDB Enumeration with Nmap. • Brute Force: ➡MongoDB Login Methods; ➡Checking for MongoDB Authentication Using Nmap; ➡Manual Brute Forcing; ➡Lack of Authentication in MongoDB Instance. • Disable Unused Network Interfaces; • Enable Access Control (Authentication); • Enable SSL/TLS Encryption; • Disable HTTP Interface; • Enable Audit Logging: ➡Set Appropriate File Permissions; ➡Disable Unused MongoDB Features; ➡Enable Firewalls and Limit Access to MongoDB Ports. • Exploiting Default Admin Users; • Exploiting Misconfigured Role-Based Access Control (RBAC); • Leveraging File System Access via MongoDB; • Leveraging MongoDB API and Insecure Bindings; • Misconfigured Backup Systems. #MongoDB#devsecops

Repositorio data science

@repo_science · Post #3402 · 07.07.2023 г., 00:57

#databases#MongoDB 💼 Learning MongoDB Get started with MongoDB. Learn how to use this popular nonrelational database to power your full-stack development workflow. ⏳2h 44m 🗣Justin Jenkins 🔗Link ----- Main channel:@repo_science Coupons: @freecoupons_reposcience -----

ПретходнаСтраница 1 од 3Следна