Share
## https://sploitus.com/exploit?id=9D3A68FD-B5DE-5F05-BE99-1CEB49A5900E
# Run tests on django

```
python runfuzz.py
```

### To run django server:

```
python manage.py runserver
```

### Check the python modules are installed:

```
python3 -m django --version  # pip install django==4.0.1
grammarinator-generate --version  # pip install grammarinator
pip install selenium  # should be installed
pip install webdriver-manager  # also
pip install progress
```

### Prepare fuzzer and check that all is ok

```
touch grammars/fuzzer/HTMLGenerator.py  # Otherwise it will not find the file
grammarinator-process grammars/HTMLLexer.g4 grammars/HTMLParser.g4 -o grammars/fuzzer  # Fill the file
```

Try fuzzer:

```
grammarinator-generate grammars.fuzzer.HTMLCustomGenerator.HTMLCustomGenerator -r htmlDocument -d 20 -o grammars/examples/test_%d.html -n 10 --sys-path ./
cd grammars/examples/
ls # Here is your files.
python -m http.server # start the server
```