2021-03-16 21:56:23 +00:00
|
|
|
# Overseer
|
2021-03-18 02:19:03 +00:00
|
|
|
|
2021-03-16 21:56:23 +00:00
|
|
|
## Description
|
|
|
|
Overseer is a port scanning web interface. All current and historical results are stored in a database.
|
|
|
|
|
2021-03-21 02:16:24 +00:00
|
|
|
## Running
|
|
|
|
```
|
|
|
|
# Be sure image is built
|
|
|
|
docker-compose build
|
|
|
|
|
|
|
|
# Run compose in background. Service accessible via localhost:5000
|
|
|
|
docker-compose up -d
|
2021-03-22 02:22:18 +00:00
|
|
|
|
|
|
|
# Alternatively, in virtualenv
|
|
|
|
overseer run
|
2021-03-21 02:16:24 +00:00
|
|
|
```
|
|
|
|
|
2021-03-18 02:19:03 +00:00
|
|
|
## Developing
|
2021-03-22 02:22:18 +00:00
|
|
|
Once you have installed the setup.py and overseer[dev] dependencies, you can
|
|
|
|
run `pre-commit` to lint all server and client files:
|
|
|
|
|
|
|
|
```
|
|
|
|
pre-commit run --all-files
|
|
|
|
```
|
2021-03-18 02:19:03 +00:00
|
|
|
|
|
|
|
### Server
|
|
|
|
```
|
2021-03-22 02:22:18 +00:00
|
|
|
# Setup virtual env
|
|
|
|
python3 -m venv overseer_venv
|
|
|
|
. overseer_venv/bin/activate
|
|
|
|
|
|
|
|
# Link overseer to working directory & install dev dependencies
|
|
|
|
python setup.py develop easy_install overseer[dev]
|
|
|
|
|
|
|
|
# Can use to run the server
|
|
|
|
overseer run
|
2021-03-18 02:19:03 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Client
|
2021-03-22 02:22:18 +00:00
|
|
|
```
|
|
|
|
# Change directory
|
|
|
|
cd ./src/overseer_client
|
2021-03-18 02:19:03 +00:00
|
|
|
|
2021-03-22 02:22:18 +00:00
|
|
|
# On the fly reloading (no server access)
|
|
|
|
yarn serve
|
2021-03-18 02:19:03 +00:00
|
|
|
|
2021-03-22 02:22:18 +00:00
|
|
|
# Build resources and auto populate in server static / template resources
|
|
|
|
yarn build
|
|
|
|
|
|
|
|
# Lint
|
|
|
|
yarn lint
|
2021-03-18 02:19:03 +00:00
|
|
|
```
|
2021-03-16 21:56:23 +00:00
|
|
|
|
2021-03-22 02:22:18 +00:00
|
|
|
## Testing
|
|
|
|
Once the above development steps are completed, the pytest dependency should
|
|
|
|
be installed:
|
2021-03-18 02:19:03 +00:00
|
|
|
```
|
2021-03-22 02:22:18 +00:00
|
|
|
pytest
|
2021-03-18 02:19:03 +00:00
|
|
|
```
|
2021-03-16 21:56:23 +00:00
|
|
|
|
2021-03-22 02:22:18 +00:00
|
|
|
|
2021-03-18 02:19:03 +00:00
|
|
|
# Notes
|
|
|
|
In a production environment, it would be ideal to setup something like nginx to properly forward
|
|
|
|
the `/api/*` routes to the Flask server, and all other endpoints to the static client resources.
|