This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Atomic Arch / atomic-lockfile AUR campaign check | |
| # Sources: | |
| # - https://lists.archlinux.org/archives/list/aur-general@lists.archlinux.org/thread/FGXPCB3ZVCJIV7FX323SBAX2JHYB7ZS4/ | |
| # - https://www.sonatype.com/blog/atomic-arch-npm-campaign-adds-malicious-dependency | |
| # - https://ioctl.fail/preliminary-analysis-of-aur-malware/ | |
| set -uo pipefail | |
| # Known IOC strings: the malicious npm dep names this campaign rotates through, | |
| # plus the payload's path inside the npm package ("preinstall": "./src/hooks/deps"). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Computer Information: | |
| Manufacturer: LENOVO | |
| Model: LNVNB161216 | |
| Form Factor: Laptop | |
| No Touch Input Detected | |
| Processor Information: | |
| CPU Vendor: AuthenticAMD | |
| CPU Brand: AMD Ryzen 5 4500U with Radeon Graphics | |
| CPU Family: 0x17 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from lxml import etree | |
| from collections import defaultdict | |
| import glob | |
| TARGET_PATH = ['Odoo/odoo/addons/', 'Odoo/enterprise/'] | |
| EXCLUDED_TAGS= ['xpath', 'field'] | |
| EXCLUDED_IDENTIFIERS = ['t-if', 't'] | |
| unsupported_tags = defaultdict(int) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| # Si vous vouliez ignorer la casse, vous devrez utiliser la libriaire 're'. | |
| # 're' est le module python qui permet d'utiliser des regex (Regular Expressions) | |
| # import re | |
| TARGET_URL = "https://www.sap.com/belgique/index.html"; | |
| def odoofy(url, word_to_replace): | |
| r = requests.get(url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # L'approche la plus simple pour ce problème serait la suivante, mais elle est inefficace. | |
| # En effet, cette fonction va devoir recalculer toute la séquence pour chaque terme. | |
| def fibonacci_inefficient(n): | |
| if n == 0: | |
| return 0 | |
| elif n == 1: | |
| return 1 | |
| else: | |
| return fibonacci_inefficient(n-1) + fibonacci_inefficient(n-2) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 'import' permet d'importer des 'librairies', librairies qui sont en réalité appelé des 'modules' en python. | |
| # Les modules ci-dessous sont natifs à Python, vous pouvez retrouver leur documentation respective ici: | |
| # random - https://docs.python.org/fr/3.7/library/random.html | |
| import random | |
| # 'def' nous permet de définir une fonction, le code de cette dernière commence à la ligne suivant les ':'. | |
| # La convention en python veut que les fonctions et variables soient écrites en 'snake_case', tout en minuscule. | |
| def number_guesser(): | |
| # Le bloc indenté ci-dessous constitue donc le corps de notre fonction 'number_guesser'. | |
| random_number = random.randrange(0, 101) |