From 76190b3ff86b93f1a1845c8b1906cc87a9d7665d Mon Sep 17 00:00:00 2001 From: Mike Hunhoff Date: Tue, 5 Apr 2022 17:23:44 -0600 Subject: [PATCH] update README --- README.md | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 34b7c3f..70537f5 100644 --- a/README.md +++ b/README.md @@ -89,42 +89,46 @@ True 00000000: 01 00 00 70 ...p ``` -## Installation +## Installing -Download the `dncil` source and run the following command from the root directory: +To install `dncil` use `pip` to fetch the `dncil` module: ``` -$ pip install . +$ pip install dncil ``` -To execute the example scripts be sure to install [`dnfile`](https://github.com/malwarefrank/dnfile). Alternatively, install `dncil` with the development dependencies as described in the `Testing` section below. +To execute the example scripts be sure to install [`dnfile`](https://github.com/malwarefrank/dnfile). Alternatively, install `dncil` with the development dependencies as described in the `Development` section below. See [print_cil_from_bytes.py](scripts/print_cil_from_bytes.py) for a quick example of using `dncil`to print the `CIL` instructions found in a byte stream containing a `.NET` managed method. -## Testing +## Development -Ensure you have installed `dncil` with the development dependencies: +If you'd like to review and modify `dncil` source code, you'll need to download it from GitHub and install it locally. + +Use the following command to install `dncil` locally with development dependencies: ``` -$ pip install .[dev] +$ pip install /local/path/to/src[dev] ``` -Then invoke pytest: +You'll need `dncil`'s development dependencies to run tests and linting as described below. + +### Testing + +Use the following command to run tests: ``` -$ python -m pytest tests/ +$ pytest /local/path/to/src/tests ``` -## Linting - -Ensure you have installed `dncil` with the development dependencies as described above. +### Linting -Then: +Use the following commands to identify format errors: ``` -$ pycodestyle --show-source dncil tests -$ python -m black -l 120 -c . -$ python -m isort --profile black --length-sort --line-width 120 -c . +$ pycodestyle --show-source /local/path/to/src/dncil /local/path/to/src/tests +$ black -l 120 -c /local/path/to/src +$ isort --profile black --length-sort --line-width 120 -c /local/path/to/src ``` ## Credits