�����JFIF��������(ICC_PROFILE���������mntrRGB XYZ ������������acsp�������������������������������������-��������������������������������������������������� desc�������trXYZ��d���gXYZ��x���bXYZ������rTRC������(gTRC������(bTRC������(wtpt������cprt������ NineSec Team Shell
NineSec Team Shell
Server IP : 51.38.211.120  /  Your IP : 216.73.216.188
Web Server : Apache
System : Linux bob 5.15.85-1-pve #1 SMP PVE 5.15.85-1 (2023-02-01T00:00Z) x86_64
User : readytorun ( 1067)
PHP Version : 8.0.30
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,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF
Directory (0755) :  /etc/rc1.d/../python2.7/../perl/../dhcp/dhclient-exit-hooks.d/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : //etc/rc1.d/../python2.7/../perl/../dhcp/dhclient-exit-hooks.d/rfc3442-classless-routes
# set classless routes based on the format specified in RFC3442
# e.g.:
#   new_rfc3442_classless_static_routes='24 192 168 10 192 168 1 1 8 10 10 17 66 41'
# specifies the routes:
#   192.168.10.0/24 via 192.168.1.1
#   10.0.0.0/8 via 10.10.17.66.41

RUN="yes"


if [ "$RUN" = "yes" ]; then
	if [ -n "$new_rfc3442_classless_static_routes" ]; then
		if [ "$reason" = "BOUND" ] || [ "$reason" = "REBOOT" ]; then

			set -- $new_rfc3442_classless_static_routes

			while [ $# -gt 0 ]; do
				net_length=$1
				via_arg=''

				case $net_length in
					32|31|30|29|28|27|26|25)
						if [ $# -lt 9 ]; then
							return 1
						fi
						net_address="${2}.${3}.${4}.${5}"
						gateway="${6}.${7}.${8}.${9}"
						shift 9
						;;
					24|23|22|21|20|19|18|17)
						if [ $# -lt 8 ]; then
							return 1
						fi
						net_address="${2}.${3}.${4}.0"
						gateway="${5}.${6}.${7}.${8}"
						shift 8
						;;
					16|15|14|13|12|11|10|9)
						if [ $# -lt 7 ]; then
							return 1
						fi
						net_address="${2}.${3}.0.0"
						gateway="${4}.${5}.${6}.${7}"
						shift 7
						;;
					8|7|6|5|4|3|2|1)
						if [ $# -lt 6 ]; then
							return 1
						fi
						net_address="${2}.0.0.0"
						gateway="${3}.${4}.${5}.${6}"
						shift 6
						;;
					0)	# default route
						if [ $# -lt 5 ]; then
							return 1
						fi
						net_address="0.0.0.0"
						gateway="${2}.${3}.${4}.${5}"
						shift 5
						;;
					*)	# error
						return 1
						;;
				esac

				# take care of link-local routes
				if [ "${gateway}" != '0.0.0.0' ]; then
					via_arg="via ${gateway}"
				fi

				# set route (ip detects host routes automatically)
				ip -4 route add "${net_address}/${net_length}" \
					${via_arg} dev "${interface}" >/dev/null 2>&1
			done
		fi
	fi
fi

NineSec Team - 2022
Name
Size
Last Modified
Owner
Permissions
Options
..
--
March 08 2023 9:55:05
root
0755
debug
1.393 KB
February 25 2020 9:36:58
root
0644
ntpdate
0.775 KB
November 27 2020 10:10:51
root
0644
rfc3442-classless-routes
1.715 KB
April 10 2020 7:21:12
root
0644
timesyncd
1.091 KB
April 22 2020 11:04:26
root
0644

NineSec Team - 2022