This file contains 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
<tr> | |
<th><label for="id_username">Username:</label></th> | |
<td> | |
<input type="text" name="username" value="pablo" maxlength="150" autocapitalize="none" autocomplete="username" autofocus required id="id_username"> | |
<br> | |
<span class="helptext">Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.</span> | |
This file contains 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
[14/Apr/2022 15:41:19] "POST /admin/login/?next=/admin/ HTTP/1.1" 302 0 | |
[14/Apr/2022 15:41:19] "GET /admin/ HTTP/1.1" 200 5820 | |
[14/Apr/2022 15:41:21] "GET /admin/auth/user/ HTTP/1.1" 200 13057 | |
[14/Apr/2022 15:41:21] "GET /admin/jsi18n/ HTTP/1.1" 200 3343 | |
Internal Server Error: /admin/auth/user/ | |
Traceback (most recent call last): | |
File "/home/ferran/.virtualenvs/Spam-Filter-WebPage/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute | |
return self.cursor.execute(sql, params) | |
File "/home/ferran/.virtualenvs/Spam-Filter-WebPage/lib/python3.10/site-packages/django/db/backends/sqlite3/base.py", line 477, in execute | |
return Database.Cursor.execute(self, query, params) |
This file contains 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 cryptography.hazmat.primitives import hashes | |
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC | |
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
SALT = bytes.fromhex('10 f2 27 27 6c 4f c5 33') | |
DICT = 'diccionari.txt' | |
ENC_FILE = 'exercici.bin' | |
CIPHERTEXT_HEADER_LENGHT = 16 | |
This file contains 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 dict_attack import DictAttacker, SALT, ENC_FILE, DICT | |
OUTPUT_FILE = 'precomputed_dict.txt' | |
# Per cada constrasenya generada, es calcula la clau i es guarda en un fitxer junt amb la contrasenya | |
def main(): | |
attacker = DictAttacker(DICT, ENC_FILE, SALT) | |
with open(OUTPUT_FILE, 'w') as f: | |
for password in attacker.generate_passwords(): |
This file contains 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 csv | |
import os | |
import uuid | |
import requests | |
from urllib.parse import urlparse | |
def download_images(csv_file): | |
if not os.path.exists("downloaded_images"): | |
os.makedirs("downloaded_images") |