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

Software: Apache. PHP/8.3.27 

uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 

uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364)  

Safe-mode: OFF (not secure)

/usr/local/bin/dhwp/dhwp/controllers/   drwxr-xr-x
Free 670.95 GB of 879.6 GB (76.28%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     test.py (3.28 KB)      -rw-rw-r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import os
import re
import sys
import socket
import requests
import time

from requests.packages.urllib3.exceptions import InsecureRequestWarning
from cement import App, Controller, ex
from cement import shell

requests.packages.urllib3.disable_warnings(InsecureRequestWarning)


class Test(Controller):
    class Meta:
        label = 'test'
        description = 'test commands'
        stacked_on = 'base'
        stacked_type = 'nested'

    @ex(
        help='test a wordpress install',
        arguments=[
            (['-d', '--domain'],
             {'help': 'domain of wp install',
              'action': 'store',
              'dest': 'domain'}),
            (['-p', '--port'],
             {'help': 'port of wp install',
              'action': 'store',
              'dest': 'port'}),
            (['-i', '--ip'],
             {'help': 'ip address of wp install',
              'action': 'store',
              'dest': 'ip'}),
            (['-r', '--retries'],
             {'help': 'number of retries',
              'action': 'store',
              'default': 20,
              'dest': 'retries'}),
        ]
    )
    def site(self):
        domain = self.app.pargs.domain
        ip = self.app.pargs.ip
        retries = int(self.app.pargs.retries)
        if not domain:
            self.app.log.fatal("domain is required")
            sys.exit(1)

        self.app.log.info("Testing domain %s" % domain)
        uri = 'http://' + domain + '/wp-admin/'

        if ip:
            try:
                socket.inet_pton(socket.AF_INET, ip)
            except Exception:
                self.app.log.fatal("ip address is invalid")
                sys.exit(1)
            uri = 'http://' + ip + '/wp-admin/'
        else:
            try:
                socket.gethostbyname(domain)
            except Exception:
                self.app.log.fatal("Unable to resolve %s to an IP address.  Please provide an IP via --ip." % domain)
                sys.exit(1)

        for retry in range(retries):
            try:
                result = requests.get(uri, verify=False, allow_redirects=False, headers={'Host': domain}, timeout=5)
            except Exception:
                print("Connection refused")
                continue
            status = result.status_code

            if status == 200:
                self.app.log.info("HTTP code %s - Site test successful" % status)
                sys.exit(0)

            elif 300 <= status < 400:
                location = result.headers['Location']
                print("Redirected by HTTP code %s to " % status + location)
                if ip:
                    # If an ip is provided, we need to take the redirect and swap domain for ip again
                    newdomain = location.split("//")[-1].split("/")[0]
                    uri = location.replace(newdomain, ip, 1)
                    domain = newdomain
                else:
                    uri = location
                continue

            # On last attempt try /admin in case of plugin renaming /wp-admin
            if retry == (retries - 2):
                uri.replace('/wp-admin/', '/admin/', 1)

            print("HTTP code %s - sleeping 5 seconds" % status)
            time.sleep(5)

        # All retries failed - sad panda
        self.app.log.fatal("Site not in a functional state.")
        sys.exit(1)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

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