HoneyHTTPD is a Python-based web server framework. It makes it easy to set up fake web servers and web services, respond with the precise data you want, and record the requests given to it. HoneyHTTPD allows you to build your responses with Python at the HTTP protocol level to imitate almost any server or service you want. No complex setups and proxies required!
This information can be logged to different places, the currently supported outputs are:
- Files
- ElasticSearch
- Stdout
- AWS S3
HoneyPoke supports both Python 2.7 (I know its EOL, but just in case) and Python 3.
- Clone or download this repo
- Install dependencies:
- Python 2:
sudo pip install -r requirements.txt
- Python 3:
sudo pip3 install -r requirements.txt
- Python 2:
- Be sure the
large
andlogs
directories are writeable by the user and group you plan to have HoneyHTTPD running under.
- Copy
config.json.default
toconfig.json
Modify the config file.loggers
enables and disables loggers. This done with theactive
key under the respective loggers. Some may need extra configuation, which is in theconfig
key.servers
contains a list of servers you want to run. Each entry has the following keys:handler
indicates the server module in theservers
directory to use for that portmode
is eitherhttp
orhttps
which indicates if the server should return normal HTTP or HTTPSport
is the port to run ondomain
indicates the "domain" this server is runningtimeout
is the timeout for requestscert_path
is only required when inhttps
mode. This is the path to the server certificate in the PEM format.
user
is the user you want the script to drop privileges togroup
is the group you want the script to drop privileges to
- Run HoneyHTTPD with:
- Python 2
sudo python2 start.py --config config.json
- Python 3
sudo python3 start.py --config config.json
- Python 2
Server modules live in the servers
directory. They are classes that handle the HTTP requests. These modules must inherit from the Server
class in lib.server
. The class name and the name of the server module file must be the same. Modules can inherit from other server modules to build on their functionality.
openssl req -new -x509 -keyout server_key.pem -out server_cert.pem -days 365 -nodes
From here.
Go at it! Open an issue, make a pull request, fork it, etc.
This project is licensed under the Mozilla Public License, v2.0 (formerly GPL 3.0)