403Webshell
Server IP : 77.68.64.21  /  Your IP : 216.73.217.59
Web Server : Apache
System : Linux hp3-wp-1011352.hostingp3.local 3.10.0-1160.144.1.el7.tuxcare.els9.x86_64 #1 SMP Fri Jul 10 17:06:31 UTC 2026 x86_64
User : csh2516497 ( 2094697)
PHP Version : 8.3.30
Disable Function : shell_exec,exec,system,popen,set_time_limit
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/ruby/vendor_ruby/facter/operatingsystem/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/ruby/vendor_ruby/facter/operatingsystem/sunos.rb
require 'facter/util/file_read'
require 'facter/operatingsystem/base'

module Facter
  module Operatingsystem
    class SunOS < Base
      def get_operatingsystem
        output = Facter::Core::Execution.exec('uname -v')
        if output =~ /^joyent_/
          "SmartOS"
        elsif output =~ /^oi_/
          "OpenIndiana"
        elsif output =~ /^omnios-/
          "OmniOS"
        elsif FileTest.exists?("/etc/debian_version")
          "Nexenta"
        else
          "Solaris"
        end
      end

      def get_osfamily
        "Solaris"
      end

      def get_operatingsystemrelease
        if release = Facter::Util::FileRead.read('/etc/release')
          line = release.split("\n").first

          # Solaris 10: Solaris 10 10/09 s10x_u8wos_08a X86
          # Solaris 11 (old naming scheme): Oracle Solaris 11 11/11 X86
          # Solaris 11 (new naming scheme): Oracle Solaris 11.1 SPARC
          if match = /\s+s(\d+)[sx]?(_u\d+)?.*(?:SPARC|X86)/.match(line)
            match.captures.join('')
          elsif match = /Solaris ([0-9\.]+(?:\s*[0-9\.\/]+))\s*(?:SPARC|X86)/.match(line)
            match.captures[0]
          else
            Facter[:kernelrelease].value
          end
        else
          Facter[:kernelrelease].value
        end
      end

      def get_operatingsystemmajorrelease
        if get_operatingsystem == "Solaris"
          if match = get_operatingsystemrelease.match(/^(\d+)/)
            match.captures[0]
          end
        end
      end
    end
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit