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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/usr/lib/python3/dist-packages/uaclient/cli/   drwxr-xr-x
Free 28.57 GB of 117.98 GB (24.22%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     collect_logs.py (1.3 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import logging
import tarfile
import tempfile

from uaclient import messages
from uaclient.actions import collect_logs
from uaclient.cli.commands import ProArgument, ProArgumentGroup, ProCommand
from uaclient.cli.parser import HelpCategory
from uaclient.util import replace_top_level_logger_name

PRO_COLLECT_LOGS_FILE = "pro_logs.tar.gz"
LOG = logging.getLogger(replace_top_level_logger_name(__name__))


def action_collect_logs(args, *, cfg, **kwargs):
    output_file = args.output or PRO_COLLECT_LOGS_FILE
    with tempfile.TemporaryDirectory() as output_dir:
        collect_logs(cfg, output_dir)
        try:
            with tarfile.open(output_file, "w:gz") as results:
                results.add(output_dir, arcname="logs/")
        except PermissionError as e:
            LOG.error(e)
            return 1
    return 0


collect_logs_command = ProCommand(
    "collect-logs",
    help=messages.CLI_ROOT_COLLECT_LOGS,
    description=messages.CLI_COLLECT_LOGS_DESC,
    action=action_collect_logs,
    help_category=HelpCategory.TROUBLESHOOT,
    argument_groups=[
        ProArgumentGroup(
            arguments=[
                ProArgument(
                    "--output",
                    short_name="-o",
                    help=messages.CLI_COLLECT_LOGS_OUTPUT,
                )
            ]
        )
    ],
)

:: 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.0036 ]--