!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: nginx/1.23.4. PHP/5.6.40-65+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux foro-restaurado-2 5.15.0-1040-oracle #46-Ubuntu SMP Fri Jul 14 21:47:21 UTC 2023
aarch64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/src/linux-oracle-5.13-headers-5.13.0-1018/tools/testing/selftests/net/   drwxr-xr-x
Free 83.23 GB of 96.73 GB (86.05%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     altnames.sh (1.77 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0

lib_dir=$(dirname $0)/forwarding

ALL_TESTS="altnames_test"
NUM_NETIFS=0
source $lib_dir/lib.sh

DUMMY_DEV=dummytest
SHORT_NAME=shortname
LONG_NAME=someveryveryveryveryveryverylongname

altnames_test()
{
	RET=0
	local output
	local name

	ip link property add $DUMMY_DEV altname $SHORT_NAME
	check_err $? "Failed to add short alternative name"

	output=$(ip -j -p link show $SHORT_NAME)
	check_err $? "Failed to do link show with short alternative name"

	name=$(echo $output | jq -e -r ".[0].altnames[0]")
	check_err $? "Failed to get short alternative name from link show JSON"

	[ "$name" == "$SHORT_NAME" ]
	check_err $? "Got unexpected short alternative name from link show JSON"

	ip -j -p link show $DUMMY_DEV &>/dev/null
	check_err $? "Failed to do link show with original name"

	ip link property add $DUMMY_DEV altname $LONG_NAME
	check_err $? "Failed to add long alternative name"

	output=$(ip -j -p link show $LONG_NAME)
	check_err $? "Failed to do link show with long alternative name"

	name=$(echo $output | jq -e -r ".[0].altnames[1]")
	check_err $? "Failed to get long alternative name from link show JSON"

	[ "$name" == "$LONG_NAME" ]
	check_err $? "Got unexpected long alternative name from link show JSON"

	ip link property del $DUMMY_DEV altname $SHORT_NAME
	check_err $? "Failed to delete short alternative name"

	ip -j -p link show $SHORT_NAME &>/dev/null
	check_fail $? "Unexpected success while trying to do link show with deleted short alternative name"

	# long name is left there on purpose to be removed alongside the device

	log_test "altnames test"
}

setup_prepare()
{
	ip link add name $DUMMY_DEV type dummy
}

cleanup()
{
	pre_cleanup
	ip link del name $DUMMY_DEV
}

trap cleanup EXIT

setup_prepare

tests_run

exit $EXIT_STATUS

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by HackingTool | HackingTool | Generation time: 0.0042 ]--