. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 52.223.31.75  /  Your IP : 172.31.32.98   [ Reverse IP ]
Web Server : Apache/2.4.66 () OpenSSL/1.0.2k-fips PHP/7.4.33
System : Linux ip-172-31-14-81.eu-central-1.compute.internal 4.14.281-212.502.amzn2.x86_64 #1 SMP Thu May 26 09:52:17 UTC 2022 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
Domains : 4 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/sbin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/sbin/update-motd
#!/bin/bash

################################################################################
# Copyright 2011 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.
################################################################################

if [ $(/usr/bin/id -u) -ne 0 ]; then
    echo "You are not root"
    exit 1
fi

# Parse the few supported options
case "$1" in
    --enable)
        rm -f /var/lib/update-motd/disabled
        exit 0;;
    --disable)
        mkdir -p /var/lib/update-motd/
        touch /var/lib/update-motd/disabled
        exit 0;;
    '' | --force);;
    *)
        echo "update-motd [option]"
        echo "    --disable: Disable update-motd"
        echo "    --enable: Enable update-motd"
        echo "    --force: Ignore disabled setting"
        exit 1;;
esac

# Just exit if update-motd is disabled and --force wasn't passed
if [ -e /var/lib/update-motd/disabled ] && [ "$1" != "--force" ]
then
    exit 0
fi

if [ -d /etc/update-motd.d ]; then
    TMPFILE=$(mktemp --tmpdir motd.XXXXX)
    if [ -f /etc/motd.head ]; then
        cat /etc/motd.head >> $TMPFILE
    fi
    # Simulated run-parts, wildcards in bash are expanded sorted
    # Skip files ending in ~ or ,
    for part in /etc/update-motd.d/*[^~,]; do
        # Skip .rpmnew, etc.
        [[ $part =~ \.rpm* ]] && continue
        # Run only if it's a regular file and executable
        if [ -f $part ] && [ -x $part ]; then
            TMPPART=$(mktemp --tmpdir motd.partXXXXX)
            if (timeout 30s $part > $TMPPART); then
                cat $TMPPART >> $TMPFILE
            fi
            rm -f $TMPPART
        fi
    done
    if [ -f /etc/motd.tail ]; then
        cat /etc/motd.tail >> $TMPFILE
    fi
    # Only actually do the replacement if there is something in there
    if [ -s $TMPFILE ]; then
        # mktemp creates files with only user read-write permissions
        chmod go+r $TMPFILE
        mv $TMPFILE /var/lib/update-motd/motd
    else
        # Don't leave temp files
        rm -f $TMPFILE
    fi
fi

Anon7 - 2022
AnonSec Team