!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/lib/python3/dist-packages/awscli/customizations/   drwxr-xr-x
Free 661.92 GB of 879.6 GB (75.25%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     s3errormsg.py (2.42 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
#     http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
"""Give better S3 error messages.
"""


REGION_ERROR_MSG = (
    'You can fix this issue by explicitly providing the correct region '
    'location using the --region argument, the AWS_DEFAULT_REGION '
    'environment variable, or the region variable in the AWS CLI '
    "configuration file.  You can get the bucket's location by "
    'running "aws s3api get-bucket-location --bucket BUCKET".'
)

ENABLE_SIGV4_MSG = (
    ' You can enable AWS Signature Version 4 by running the command: \n'
    'aws configure set s3.signature_version s3v4'
)


def register_s3_error_msg(event_handlers):
    event_handlers.register('after-call.s3', enhance_error_msg)


def enhance_error_msg(parsed, **kwargs):
    if parsed is None or 'Error' not in parsed:
        # There's no error message to enhance so we can continue.
        return
    if _is_sigv4_error_message(parsed):
        message = (
            'You are attempting to operate on a bucket in a region '
            'that requires Signature Version 4.  '
        )
        message += REGION_ERROR_MSG
        parsed['Error']['Message'] = message
    elif _is_permanent_redirect_message(parsed):
        endpoint = parsed['Error']['Endpoint']
        message = parsed['Error']['Message']
        new_message = message[:-1] + ': %s\n' % endpoint
        new_message += REGION_ERROR_MSG
        parsed['Error']['Message'] = new_message
    elif _is_kms_sigv4_error_message(parsed):
        parsed['Error']['Message'] += ENABLE_SIGV4_MSG


def _is_sigv4_error_message(parsed):
    return ('Please use AWS4-HMAC-SHA256' in
            parsed.get('Error', {}).get('Message', ''))


def _is_permanent_redirect_message(parsed):
    return parsed.get('Error', {}).get('Code', '') == 'PermanentRedirect'


def _is_kms_sigv4_error_message(parsed):
    return ('AWS KMS managed keys require AWS Signature Version 4' in
            parsed.get('Error', {}).get('Message', ''))

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