PHP XOR Stream Transform
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from typing import Optional
from modules.transforms.python.stream.xor import Module as PythonXorTransform
class Module(PythonXorTransform):
"""PHP XOR stream transform."""
SUPPORTED_CLIENT_LANGUAGES = ["php"]
__info__ = {
"name": "PHP XOR Stream Transform",
"description": "XORs the C2 stream with a repeating key and emits PHP client code.",
"author": "KittySploit Team",
"version": "1.0.0",
}
def generate_client_code(self, language: str) -> Optional[str]:
if language != "php":
return None
php_key = (str(self.key).strip() or "kittysploit").replace("\\", "\\\\").replace("'", "\\'")
return (
f"$xf_key='{php_key}';$xf_doff=0;$xf_eoff=0;"
"function _xf_xor($d,&$off){global $xf_key;$kl=strlen($xf_key);"
"if($d===''||$kl<1){return $d;}$out='';$dl=strlen($d);"
"for($i=0;$i<$dl;$i++){$out.=chr(ord($d[$i])^ord($xf_key[($off+$i)%$kl]));}"
"$off+=$dl;return $out;}"
"function _xf_decode($d){global $xf_doff;return _xf_xor($d,$xf_doff);}"
"function _xf_encode($d){global $xf_eoff;return _xf_xor($d,$xf_eoff);}"
)
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
19 Aug 2026 05:37Current
6Medium risk
Vulners AI Score6