Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastien-powl authored Mar 27, 2020
1 parent 5826f05 commit 626e395
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions engines/droopescan/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
## Description
# Description
PatrOwl Droopscan engine

## Pre-requisites (must be installed before)
# Pre-requisites (must be installed before)
- Python 3 + pip + virtualenv

# Install notes
## With Docker
- Build image
```
docker build --force-rm --tag patrowl-droopescan .
```
- Run container
```
docker run --rm -p 5021:5021 patrowl-droopescan
```

## From sources
- Install python packages on system (use virtualenv)
```
cd PatrowlEngines/engines/droopscan
Expand All @@ -13,15 +24,16 @@ source env/bin/activate
pip3 install -r requirements.txt
mkdir logs tmp results
```
- Create a configuration file (see droopscan.json.sample) named 'droopscan.json', and customize the following options `"path": "/path/to/bin/droopscan"`
- Create a configuration file (see droopscan.json.sample) named 'droopscan.json'

- Start the engine (require sudo/root access):
```
sudo env/bin/python engine-droopscan.py [--port 5001] [--host 0.0.0.0] [--debug]
sudo env/bin/python engine-droopscan.py [--port 5021] [--host 0.0.0.0] [--debug]
```
> Note the use of `env/bin/python` allowing the reference of the python modules within the virtualenv
- or use Gunicorn (don't forget the `--preload` option if you use multiple workers!!):
sudo gunicorn engine-droopscan:app -b :5001 --access-logfile - --workers=4 -k gevent --preload
sudo gunicorn engine-droopscan:app -b :5021 --access-logfile - --workers=4 -k gevent --preload

## Testing URLs
http://0.0.0.0:5021/engines/droopscan/test
Expand All @@ -36,7 +48,7 @@ print("TEST CASE: test_scan_droopscan")
post_data = {
"assets": [{
"id": 5,
"value": "https://www.urbansouthern.com",
"value": "$WORDPRESS_WEBSITE_URL",
"criticity": "low",
"datatype": "url"
}],
Expand Down

0 comments on commit 626e395

Please sign in to comment.