Class: BetterCap::Network::Servers::HTTPD
- Inherits:
-
Object
- Object
- BetterCap::Network::Servers::HTTPD
- Defined in:
- lib/bettercap/network/servers/httpd.rb
Overview
Simple HTTP server class used to serve static assets when needed.
Instance Method Summary collapse
-
#initialize(port = 8081, path = './') ⇒ HTTPD
constructor
Initialize the HTTP server with the specified tcp
port
usingpath
as the document root. -
#start ⇒ Object
Start the server.
-
#stop ⇒ Object
Stop the server.
Constructor Details
#initialize(port = 8081, path = './') ⇒ HTTPD
Initialize the HTTP server with the specified tcp port
using path
as the document root.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/bettercap/network/servers/httpd.rb', line 22 def initialize( port = 8081, path = './' ) @port = port @path = path @server = WEBrick::HTTPServer.new( Port: @port, DocumentRoot: @path, Logger: WEBrick::Log.new("/dev/null"), AccessLog: [] ) end |