wladislax's picture
TF SavedModel ModelScan-bypass arbitrary-file-write PoCs (huntr)
35ef14f verified
Raw
History Blame Contribute Delete
310 Bytes
"""Load a SavedModel and run inference (the standard victim action)."""
import os
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
import sys
import tensorflow as tf
d = sys.argv[1]
m = tf.saved_model.load(d)
out = m(tf.constant([1.0, 2.0, 3.0], dtype=tf.float32))
print("INFERENCE_OK output=", out.numpy().tolist())