Linux business72.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
LiteSpeed
: 162.0.229.97 | : 3.137.190.200
Cant Read [ /etc/named.conf ]
8.1.30
temmmp
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
README
+ Create Folder
+ Create File
/
opt /
alt /
ruby31 /
share /
gems /
gems /
rack-3.0.8 /
lib /
rack /
[ HOME SHELL ]
Name
Size
Permission
Action
auth
[ DIR ]
drwxr-xr-x
multipart
[ DIR ]
drwxr-xr-x
body_proxy.rb
1.3
KB
-rw-r--r--
builder.rb
8.56
KB
-rw-r--r--
cascade.rb
2.25
KB
-rw-r--r--
chunked.rb
3.3
KB
-rw-r--r--
common_logger.rb
3.12
KB
-rw-r--r--
conditional_get.rb
2.99
KB
-rw-r--r--
config.rb
410
B
-rw-r--r--
constants.rb
2.47
KB
-rw-r--r--
content_length.rb
806
B
-rw-r--r--
content_type.rb
695
B
-rw-r--r--
deflater.rb
5.51
KB
-rw-r--r--
directory.rb
6.02
KB
-rw-r--r--
etag.rb
1.87
KB
-rw-r--r--
events.rb
4.8
KB
-rw-r--r--
file.rb
167
B
-rw-r--r--
files.rb
5.66
KB
-rw-r--r--
head.rb
524
B
-rw-r--r--
headers.rb
2.96
KB
-rw-r--r--
lint.rb
36.09
KB
-rwxr-xr-x
lock.rb
573
B
-rw-r--r--
logger.rb
414
B
-rw-r--r--
media_type.rb
1.4
KB
-rw-r--r--
method_override.rb
1.45
KB
-rw-r--r--
mime.rb
32.69
KB
-rw-r--r--
mock.rb
63
B
-rw-r--r--
mock_request.rb
5.37
KB
-rw-r--r--
mock_response.rb
3.28
KB
-rw-r--r--
multipart.rb
1.17
KB
-rw-r--r--
null_logger.rb
1.18
KB
-rw-r--r--
query_parser.rb
8.37
KB
-rw-r--r--
recursive.rb
1.78
KB
-rw-r--r--
reloader.rb
3.02
KB
-rw-r--r--
request.rb
24.57
KB
-rw-r--r--
response.rb
10.72
KB
-rw-r--r--
rewindable_input.rb
3.12
KB
-rw-r--r--
runtime.rb
870
B
-rw-r--r--
sendfile.rb
5.55
KB
-rw-r--r--
show_exceptions.rb
13.73
KB
-rw-r--r--
show_status.rb
3.58
KB
-rw-r--r--
static.rb
6
KB
-rw-r--r--
tempfile_reaper.rb
778
B
-rw-r--r--
urlmap.rb
2.81
KB
-rw-r--r--
utils.rb
21.1
KB
-rw-r--r--
version.rb
958
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : mock_request.rb
# frozen_string_literal: true require 'uri' require 'stringio' require_relative 'constants' require_relative 'mock_response' module Rack # Rack::MockRequest helps testing your Rack application without # actually using HTTP. # # After performing a request on a URL with get/post/put/patch/delete, it # returns a MockResponse with useful helper methods for effective # testing. # # You can pass a hash with additional configuration to the # get/post/put/patch/delete. # <tt>:input</tt>:: A String or IO-like to be used as rack.input. # <tt>:fatal</tt>:: Raise a FatalWarning if the app writes to rack.errors. # <tt>:lint</tt>:: If true, wrap the application in a Rack::Lint. class MockRequest class FatalWarning < RuntimeError end class FatalWarner def puts(warning) raise FatalWarning, warning end def write(warning) raise FatalWarning, warning end def flush end def string "" end end DEFAULT_ENV = { RACK_INPUT => StringIO.new, RACK_ERRORS => StringIO.new, }.freeze def initialize(app) @app = app end # Make a GET request and return a MockResponse. See #request. def get(uri, opts = {}) request(GET, uri, opts) end # Make a POST request and return a MockResponse. See #request. def post(uri, opts = {}) request(POST, uri, opts) end # Make a PUT request and return a MockResponse. See #request. def put(uri, opts = {}) request(PUT, uri, opts) end # Make a PATCH request and return a MockResponse. See #request. def patch(uri, opts = {}) request(PATCH, uri, opts) end # Make a DELETE request and return a MockResponse. See #request. def delete(uri, opts = {}) request(DELETE, uri, opts) end # Make a HEAD request and return a MockResponse. See #request. def head(uri, opts = {}) request(HEAD, uri, opts) end # Make an OPTIONS request and return a MockResponse. See #request. def options(uri, opts = {}) request(OPTIONS, uri, opts) end # Make a request using the given request method for the given # uri to the rack application and return a MockResponse. # Options given are passed to MockRequest.env_for. def request(method = GET, uri = "", opts = {}) env = self.class.env_for(uri, opts.merge(method: method)) if opts[:lint] app = Rack::Lint.new(@app) else app = @app end errors = env[RACK_ERRORS] status, headers, body = app.call(env) MockResponse.new(status, headers, body, errors) ensure body.close if body.respond_to?(:close) end # For historical reasons, we're pinning to RFC 2396. # URI::Parser = URI::RFC2396_Parser def self.parse_uri_rfc2396(uri) @parser ||= URI::Parser.new @parser.parse(uri) end # Return the Rack environment used for a request to +uri+. # All options that are strings are added to the returned environment. # Options: # :fatal :: Whether to raise an exception if request outputs to rack.errors # :input :: The rack.input to set # :http_version :: The SERVER_PROTOCOL to set # :method :: The HTTP request method to use # :params :: The params to use # :script_name :: The SCRIPT_NAME to set def self.env_for(uri = "", opts = {}) uri = parse_uri_rfc2396(uri) uri.path = "/#{uri.path}" unless uri.path[0] == ?/ env = DEFAULT_ENV.dup env[REQUEST_METHOD] = (opts[:method] ? opts[:method].to_s.upcase : GET).b env[SERVER_NAME] = (uri.host || "example.org").b env[SERVER_PORT] = (uri.port ? uri.port.to_s : "80").b env[SERVER_PROTOCOL] = opts[:http_version] || 'HTTP/1.1' env[QUERY_STRING] = (uri.query.to_s).b env[PATH_INFO] = (uri.path).b env[RACK_URL_SCHEME] = (uri.scheme || "http").b env[HTTPS] = (env[RACK_URL_SCHEME] == "https" ? "on" : "off").b env[SCRIPT_NAME] = opts[:script_name] || "" if opts[:fatal] env[RACK_ERRORS] = FatalWarner.new else env[RACK_ERRORS] = StringIO.new end if params = opts[:params] if env[REQUEST_METHOD] == GET params = Utils.parse_nested_query(params) if params.is_a?(String) params.update(Utils.parse_nested_query(env[QUERY_STRING])) env[QUERY_STRING] = Utils.build_nested_query(params) elsif !opts.has_key?(:input) opts["CONTENT_TYPE"] = "application/x-www-form-urlencoded" if params.is_a?(Hash) if data = Rack::Multipart.build_multipart(params) opts[:input] = data opts["CONTENT_LENGTH"] ||= data.length.to_s opts["CONTENT_TYPE"] = "multipart/form-data; boundary=#{Rack::Multipart::MULTIPART_BOUNDARY}" else opts[:input] = Utils.build_nested_query(params) end else opts[:input] = params end end end opts[:input] ||= String.new if String === opts[:input] rack_input = StringIO.new(opts[:input]) else rack_input = opts[:input] end rack_input.set_encoding(Encoding::BINARY) env[RACK_INPUT] = rack_input env["CONTENT_LENGTH"] ||= env[RACK_INPUT].size.to_s if env[RACK_INPUT].respond_to?(:size) opts.each { |field, value| env[field] = value if String === field } env end end end
Close