init commit

This commit is contained in:
2026-07-29 16:50:22 +03:00
commit 0d10a278bf
24 changed files with 3564 additions and 0 deletions

11
lab2/load_model.py Normal file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env python3
import torch
print("Attempting to load standard checkpoint (unrestricted)...")
try:
# In older versions of PyTorch, weights_only defaulted to False.
# This will trigger the __reduce__ exploit instantly upon reading.
loaded_data = torch.load("compromised_model.pt", weights_only=False)
print("Model loaded successfully (but the exploit already ran!).")
except Exception as e:
print(f"Error occurred: {e}")