|
89 | 89 | 00000000: 01 00 00 70 ...p |
90 | 90 | ``` |
91 | 91 |
|
92 | | -## Installation |
| 92 | +## Installing |
93 | 93 |
|
94 | | -Download the `dncil` source and run the following command from the root directory: |
| 94 | +To install `dncil` use `pip` to fetch the `dncil` module: |
95 | 95 |
|
96 | 96 | ``` |
97 | | -$ pip install . |
| 97 | +$ pip install dncil |
98 | 98 | ``` |
99 | 99 |
|
100 | | -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. |
| 100 | +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. |
101 | 101 |
|
102 | 102 | 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. |
103 | 103 |
|
104 | | -## Testing |
| 104 | +## Development |
105 | 105 |
|
106 | | -Ensure you have installed `dncil` with the development dependencies: |
| 106 | +If you'd like to review and modify `dncil` source code, you'll need to download it from GitHub and install it locally. |
| 107 | + |
| 108 | +Use the following command to install `dncil` locally with development dependencies: |
107 | 109 |
|
108 | 110 | ``` |
109 | | -$ pip install .[dev] |
| 111 | +$ pip install /local/path/to/src[dev] |
110 | 112 | ``` |
111 | 113 |
|
112 | | -Then invoke pytest: |
| 114 | +You'll need `dncil`'s development dependencies to run tests and linting as described below. |
| 115 | + |
| 116 | +### Testing |
| 117 | + |
| 118 | +Use the following command to run tests: |
113 | 119 |
|
114 | 120 | ``` |
115 | | -$ python -m pytest tests/ |
| 121 | +$ pytest /local/path/to/src/tests |
116 | 122 | ``` |
117 | 123 |
|
118 | | -## Linting |
119 | | - |
120 | | -Ensure you have installed `dncil` with the development dependencies as described above. |
| 124 | +### Linting |
121 | 125 |
|
122 | | -Then: |
| 126 | +Use the following commands to identify format errors: |
123 | 127 |
|
124 | 128 | ``` |
125 | | -$ pycodestyle --show-source dncil tests |
126 | | -$ python -m black -l 120 -c . |
127 | | -$ python -m isort --profile black --length-sort --line-width 120 -c . |
| 129 | +$ pycodestyle --show-source /local/path/to/src/dncil /local/path/to/src/tests |
| 130 | +$ black -l 120 -c /local/path/to/src |
| 131 | +$ isort --profile black --length-sort --line-width 120 -c /local/path/to/src |
128 | 132 | ``` |
129 | 133 |
|
130 | 134 | ## Credits |
|
0 commit comments