Linux premium71.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
LiteSpeed
Server IP : 198.187.29.8 & Your IP : 3.15.22.62
Domains :
Cant Read [ /etc/named.conf ]
User : cleahvkv
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby32 /
share /
rubygems /
rubygems /
Delete
Unzip
Name
Size
Permission
Date
Action
commands
[ DIR ]
drwxr-xr-x
2025-01-09 11:36
core_ext
[ DIR ]
drwxr-xr-x
2025-01-09 11:36
defaults
[ DIR ]
drwxr-xr-x
2025-01-09 11:36
ext
[ DIR ]
drwxr-xr-x
2025-01-09 11:36
gemcutter_utilities
[ DIR ]
drwxr-xr-x
2025-01-09 11:36
optparse
[ DIR ]
drwxr-xr-x
2024-12-04 14:11
package
[ DIR ]
drwxr-xr-x
2025-01-09 11:36
request
[ DIR ]
drwxr-xr-x
2025-01-09 11:36
request_set
[ DIR ]
drwxr-xr-x
2025-01-09 11:36
resolver
[ DIR ]
drwxr-xr-x
2025-01-09 11:36
security
[ DIR ]
drwxr-xr-x
2025-01-09 11:36
source
[ DIR ]
drwxr-xr-x
2025-01-09 11:36
ssl_certs
[ DIR ]
drwxr-xr-x
2024-12-04 14:11
tsort
[ DIR ]
drwxr-xr-x
2024-12-04 14:11
util
[ DIR ]
drwxr-xr-x
2025-01-09 11:36
available_set.rb
3.01
KB
-rw-r--r--
2024-12-04 14:11
basic_specification.rb
7.65
KB
-rw-r--r--
2024-12-04 14:11
bundler_version_finder.rb
1.96
KB
-rw-r--r--
2024-12-04 14:11
command.rb
16.08
KB
-rw-r--r--
2024-12-04 14:11
command_manager.rb
5.59
KB
-rw-r--r--
2024-12-04 14:11
compatibility.rb
1
KB
-rw-r--r--
2024-12-04 14:11
config_file.rb
14.03
KB
-rw-r--r--
2024-12-04 14:11
defaults.rb
6.96
KB
-rw-r--r--
2024-12-04 14:11
dependency.rb
8.65
KB
-rw-r--r--
2024-12-04 14:11
dependency_installer.rb
10.02
KB
-rw-r--r--
2024-12-04 14:11
dependency_list.rb
5.54
KB
-rw-r--r--
2024-12-04 14:11
deprecate.rb
4.89
KB
-rw-r--r--
2024-12-04 14:11
doctor.rb
3.13
KB
-rw-r--r--
2024-12-04 14:11
errors.rb
4.53
KB
-rw-r--r--
2024-12-04 14:11
exceptions.rb
7.34
KB
-rw-r--r--
2024-12-04 14:11
ext.rb
498
B
-rw-r--r--
2024-12-04 14:11
gem_runner.rb
1.8
KB
-rw-r--r--
2024-12-04 14:11
gemcutter_utilities.rb
10.54
KB
-rw-r--r--
2024-12-04 14:11
indexer.rb
10.91
KB
-rw-r--r--
2024-12-04 14:11
install_default_message.rb
349
B
-rw-r--r--
2024-12-04 14:11
install_message.rb
323
B
-rw-r--r--
2024-12-04 14:11
install_update_options.rb
6.35
KB
-rw-r--r--
2024-12-04 14:11
installer.rb
27.23
KB
-rw-r--r--
2024-12-04 14:11
installer_uninstaller_utils.rb
773
B
-rw-r--r--
2024-12-04 14:11
local_remote_options.rb
3.56
KB
-rw-r--r--
2024-12-04 14:11
mock_gem_ui.rb
1.38
KB
-rw-r--r--
2024-12-04 14:11
name_tuple.rb
2.39
KB
-rw-r--r--
2024-12-04 14:11
openssl.rb
125
B
-rw-r--r--
2024-12-04 14:11
optparse.rb
72
B
-rw-r--r--
2024-12-04 14:11
package.rb
17.7
KB
-rw-r--r--
2024-12-04 14:11
package_task.rb
3.79
KB
-rw-r--r--
2024-12-04 14:11
path_support.rb
1.79
KB
-rw-r--r--
2024-12-04 14:11
platform.rb
7.48
KB
-rw-r--r--
2024-12-04 14:11
psych_tree.rb
795
B
-rw-r--r--
2024-12-04 14:11
query_utils.rb
8.5
KB
-rw-r--r--
2024-12-04 14:11
rdoc.rb
232
B
-rw-r--r--
2024-12-04 14:11
remote_fetcher.rb
9.2
KB
-rw-r--r--
2024-12-04 14:11
request.rb
8.6
KB
-rw-r--r--
2024-12-04 14:11
request_set.rb
11.31
KB
-rw-r--r--
2024-12-04 14:11
requirement.rb
6.89
KB
-rw-r--r--
2024-12-04 14:11
resolver.rb
9.64
KB
-rw-r--r--
2024-12-04 14:11
s3_uri_signer.rb
5.92
KB
-rw-r--r--
2024-12-04 14:11
safe_yaml.rb
1.54
KB
-rw-r--r--
2024-12-04 14:11
security.rb
21.95
KB
-rw-r--r--
2024-12-04 14:11
security_option.rb
1.06
KB
-rw-r--r--
2024-12-04 14:11
shellwords.rb
66
B
-rw-r--r--
2024-12-04 14:11
source.rb
5.58
KB
-rw-r--r--
2024-12-04 14:11
source_list.rb
2.41
KB
-rw-r--r--
2024-12-04 14:11
spec_fetcher.rb
6.36
KB
-rw-r--r--
2024-12-04 14:11
specification.rb
70.45
KB
-rw-r--r--
2024-12-04 14:11
specification_policy.rb
13.79
KB
-rw-r--r--
2024-12-04 14:11
stub_specification.rb
4.46
KB
-rw-r--r--
2024-12-04 14:11
text.rb
2.07
KB
-rw-r--r--
2024-12-04 14:11
tsort.rb
66
B
-rw-r--r--
2024-12-04 14:11
uninstaller.rb
10.2
KB
-rw-r--r--
2024-12-04 14:11
unknown_command_spell_checker.rb
411
B
-rw-r--r--
2024-12-04 14:11
update_suggestion.rb
2.26
KB
-rw-r--r--
2024-12-04 14:11
uri.rb
2.33
KB
-rw-r--r--
2024-12-04 14:11
uri_formatter.rb
781
B
-rw-r--r--
2024-12-04 14:11
user_interaction.rb
13.04
KB
-rw-r--r--
2024-12-04 14:11
util.rb
2.41
KB
-rw-r--r--
2024-12-04 14:11
validator.rb
3.66
KB
-rw-r--r--
2024-12-04 14:11
version.rb
12.57
KB
-rw-r--r--
2024-12-04 14:11
version_option.rb
2.21
KB
-rw-r--r--
2024-12-04 14:11
Save
Rename
# frozen_string_literal: true require_relative "../rubygems" require_relative "request" require_relative "request/connection_pools" require_relative "s3_uri_signer" require_relative "uri_formatter" require_relative "uri" require_relative "user_interaction" ## # RemoteFetcher handles the details of fetching gems and gem information from # a remote source. class Gem::RemoteFetcher include Gem::UserInteraction ## # A FetchError exception wraps up the various possible IO and HTTP failures # that could happen while downloading from the internet. class FetchError < Gem::Exception ## # The URI which was being accessed when the exception happened. attr_accessor :uri, :original_uri def initialize(message, uri) uri = Gem::Uri.new(uri) super uri.redact_credentials_from(message) @original_uri = uri.to_s @uri = uri.redacted.to_s end def to_s # :nodoc: "#{super} (#{uri})" end end ## # A FetchError that indicates that the reason for not being # able to fetch data was that the host could not be contacted class UnknownHostError < FetchError end deprecate_constant(:UnknownHostError) @fetcher = nil ## # Cached RemoteFetcher instance. def self.fetcher @fetcher ||= self.new Gem.configuration[:http_proxy] end attr_accessor :headers ## # Initialize a remote fetcher using the source URI and possible proxy # information. # # +proxy+ # * [String]: explicit specification of proxy; overrides any environment # variable setting # * nil: respect environment variables (HTTP_PROXY, HTTP_PROXY_USER, # HTTP_PROXY_PASS) # * <tt>:no_proxy</tt>: ignore environment variables and _don't_ use a proxy # # +headers+: A set of additional HTTP headers to be sent to the server when # fetching the gem. def initialize(proxy=nil, dns=nil, headers={}) require_relative "core_ext/tcpsocket_init" if Gem.configuration.ipv4_fallback_enabled require "net/http" require "stringio" require "uri" Socket.do_not_reverse_lookup = true @proxy = proxy @pools = {} @pool_lock = Thread::Mutex.new @cert_files = Gem::Request.get_cert_files @headers = headers end ## # Given a name and requirement, downloads this gem into cache and returns the # filename. Returns nil if the gem cannot be located. #-- # Should probably be integrated with #download below, but that will be a # larger, more encompassing effort. -erikh def download_to_cache(dependency) found, _ = Gem::SpecFetcher.fetcher.spec_for_dependency dependency return if found.empty? spec, source = found.max_by {|(s,_)| s.version } download spec, source.uri end ## # Moves the gem +spec+ from +source_uri+ to the cache dir unless it is # already there. If the source_uri is local the gem cache dir copy is # always replaced. def download(spec, source_uri, install_dir = Gem.dir) install_cache_dir = File.join install_dir, "cache" cache_dir = if Dir.pwd == install_dir # see fetch_command install_dir elsif File.writable?(install_cache_dir) || (File.writable?(install_dir) && (!File.exist?(install_cache_dir))) install_cache_dir else File.join Gem.user_dir, "cache" end gem_file_name = File.basename spec.cache_file local_gem_path = File.join cache_dir, gem_file_name require "fileutils" FileUtils.mkdir_p cache_dir rescue nil unless File.exist? cache_dir source_uri = Gem::Uri.new(source_uri) scheme = source_uri.scheme # URI.parse gets confused by MS Windows paths with forward slashes. scheme = nil if scheme =~ /^[a-z]$/i # REFACTOR: split this up and dispatch on scheme (eg download_http) # REFACTOR: be sure to clean up fake fetcher when you do this... cleaner case scheme when "http", "https", "s3" then unless File.exist? local_gem_path begin verbose "Downloading gem #{gem_file_name}" remote_gem_path = source_uri + "gems/#{gem_file_name}" self.cache_update_path remote_gem_path, local_gem_path rescue FetchError raise if spec.original_platform == spec.platform alternate_name = "#{spec.original_name}.gem" verbose "Failed, downloading gem #{alternate_name}" remote_gem_path = source_uri + "gems/#{alternate_name}" self.cache_update_path remote_gem_path, local_gem_path end end when "file" then begin path = source_uri.path path = File.dirname(path) if File.extname(path) == ".gem" remote_gem_path = Gem::Util.correct_for_windows_path(File.join(path, "gems", gem_file_name)) FileUtils.cp(remote_gem_path, local_gem_path) rescue Errno::EACCES local_gem_path = source_uri.to_s end verbose "Using local gem #{local_gem_path}" when nil then # TODO test for local overriding cache source_path = if Gem.win_platform? && source_uri.scheme && !source_uri.path.include?(":") "#{source_uri.scheme}:#{source_uri.path}" else source_uri.path end source_path = Gem::UriFormatter.new(source_path).unescape begin FileUtils.cp source_path, local_gem_path unless File.identical?(source_path, local_gem_path) rescue Errno::EACCES local_gem_path = source_uri.to_s end verbose "Using local gem #{local_gem_path}" else raise ArgumentError, "unsupported URI scheme #{source_uri.scheme}" end local_gem_path end ## # File Fetcher. Dispatched by +fetch_path+. Use it instead. def fetch_file(uri, *_) Gem.read_binary Gem::Util.correct_for_windows_path uri.path end ## # HTTP Fetcher. Dispatched by +fetch_path+. Use it instead. def fetch_http(uri, last_modified = nil, head = false, depth = 0) fetch_type = head ? Net::HTTP::Head : Net::HTTP::Get response = request uri, fetch_type, last_modified do |req| headers.each {|k,v| req.add_field(k,v) } end case response when Net::HTTPOK, Net::HTTPNotModified then response.uri = uri head ? response : response.body when Net::HTTPMovedPermanently, Net::HTTPFound, Net::HTTPSeeOther, Net::HTTPTemporaryRedirect then raise FetchError.new("too many redirects", uri) if depth > 10 unless location = response["Location"] raise FetchError.new("redirecting but no redirect location was given", uri) end location = Gem::Uri.new location if https?(uri) && !https?(location) raise FetchError.new("redirecting to non-https resource: #{location}", uri) end fetch_http(location, last_modified, head, depth + 1) else raise FetchError.new("bad response #{response.message} #{response.code}", uri) end end alias :fetch_https :fetch_http ## # Downloads +uri+ and returns it as a String. def fetch_path(uri, mtime = nil, head = false) uri = Gem::Uri.new uri unless uri.scheme raise ArgumentError, "uri scheme is invalid: #{uri.scheme.inspect}" end data = send "fetch_#{uri.scheme}", uri, mtime, head if data && !head && uri.to_s.end_with?(".gz") begin data = Gem::Util.gunzip data rescue Zlib::GzipFile::Error raise FetchError.new("server did not return a valid file", uri) end end data rescue Timeout::Error, IOError, SocketError, SystemCallError, *(OpenSSL::SSL::SSLError if Gem::HAVE_OPENSSL) => e raise FetchError.new("#{e.class}: #{e}", uri) end def fetch_s3(uri, mtime = nil, head = false) begin public_uri = s3_uri_signer(uri).sign rescue Gem::S3URISigner::ConfigurationError, Gem::S3URISigner::InstanceProfileError => e raise FetchError.new(e.message, "s3://#{uri.host}") end fetch_https public_uri, mtime, head end # we have our own signing code here to avoid a dependency on the aws-sdk gem def s3_uri_signer(uri) Gem::S3URISigner.new(uri) end ## # Downloads +uri+ to +path+ if necessary. If no path is given, it just # passes the data. def cache_update_path(uri, path = nil, update = true) mtime = path && File.stat(path).mtime rescue nil data = fetch_path(uri, mtime) if data.nil? # indicates the server returned 304 Not Modified return Gem.read_binary(path) end if update && path Gem.write_binary(path, data) end data end ## # Performs a Net::HTTP request of type +request_class+ on +uri+ returning # a Net::HTTP response object. request maintains a table of persistent # connections to reduce connect overhead. def request(uri, request_class, last_modified = nil) proxy = proxy_for @proxy, uri pool = pools_for(proxy).pool_for uri request = Gem::Request.new uri, request_class, last_modified, pool request.fetch do |req| yield req if block_given? end end def https?(uri) uri.scheme.downcase == "https" end def close_all @pools.each_value {|pool| pool.close_all } end private def proxy_for(proxy, uri) Gem::Request.proxy_uri(proxy || Gem::Request.get_proxy_from_env(uri.scheme)) end def pools_for(proxy) @pool_lock.synchronize do @pools[proxy] ||= Gem::Request::ConnectionPools.new proxy, @cert_files end end end