Sha256: 8dbec6db66803be549e3da3f0660bb494d4e8635de495d8a329b3c25ea9ad416
Contents?: true
Size: 1.19 KB
Versions: 73
Compression:
Stored size: 1.19 KB
Contents
# frozen_string_literal: true require 'os' module PWN module Plugins # This plugin converts images to readable text module DetectOS # Supported Method Parameters:: # PWN::Plugins::DetectOS.type public_class_method def self.type os = :cygwin if OS.cygwin? os = :freebsd if OS.freebsd? os = :linux if OS.linux? os = :netbsd if OS.host_os.include?('netbsd') os = :openbsd if OS.host_os.include?('openbsd') os = :osx if OS.osx? os = :windows if OS.windows? os rescue StandardError => e raise e end # Supported Method Parameters:: # PWN::Plugins::DetectOS.arch public_class_method def self.arch RUBY_PLATFORM.split('-').first rescue StandardError => e raise e end # Author(s):: 0day Inc. <support@0dayinc.com> public_class_method def self.authors "AUTHOR(S): 0day Inc. <support@0dayinc.com> " end # Display Usage for this Module public_class_method def self.help puts "USAGE: #{self}.type #{self}.arch #{self}.authors " end end end end
Version data entries
73 entries across 73 versions & 1 rubygems