Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-hunhoff committed Apr 5, 2022
1 parent b95ba6a commit 76190b3
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 76190b3

Please sign in to comment.