mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 23:59:48 -08:00
Merge branch 'master' of github.com:fireeye/capa into backend-smda
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||

|

|
||||||
|
|
||||||
[](https://github.com/fireeye/capa/actions?query=workflow%3ACI+event%3Apush+branch%3Amaster)
|
[](https://github.com/fireeye/capa/actions?query=workflow%3ACI+event%3Apush+branch%3Amaster)
|
||||||
[](https://github.com/fireeye/capa-rules)
|
[](https://github.com/fireeye/capa-rules)
|
||||||
[](LICENSE.txt)
|
[](LICENSE.txt)
|
||||||
|
|
||||||
capa detects capabilities in executable files.
|
capa detects capabilities in executable files.
|
||||||
|
|||||||
@@ -74,8 +74,20 @@ Note that some development dependencies (including the black code formatter) req
|
|||||||
To check the code style, formatting and run the tests you can run the script `scripts/ci.sh`.
|
To check the code style, formatting and run the tests you can run the script `scripts/ci.sh`.
|
||||||
You can run it with the argument `no_tests` to skip the tests and only run the code style and formatting: `scripts/ci.sh no_tests`
|
You can run it with the argument `no_tests` to skip the tests and only run the code style and formatting: `scripts/ci.sh no_tests`
|
||||||
|
|
||||||
### 3. Setup hooks [optional]
|
### 3. Compile binary using PyInstaller
|
||||||
|
We compile capa standalone binaries using PyInstaller. To reproduce the build process check out the source code as described above and follow these steps.
|
||||||
|
|
||||||
|
#### Install PyInstaller:
|
||||||
|
For Python 2.7: `$ pip install 'pyinstaller==3.*'` (PyInstaller 4 doesn't support Python 2.7)
|
||||||
|
|
||||||
|
For Python 3: `$ pip install 'pyinstaller`
|
||||||
|
|
||||||
|
#### Run Pyinstaller
|
||||||
|
`$ pyinstaller .github/pyinstaller/pyinstaller.spec`
|
||||||
|
|
||||||
|
You can find the compiled binary in the created directory `dist/`.
|
||||||
|
|
||||||
|
### 4. Setup hooks [optional]
|
||||||
If you plan to contribute to capa, you may want to setup the hooks.
|
If you plan to contribute to capa, you may want to setup the hooks.
|
||||||
Run `scripts/setup-hooks.sh` to set the following hooks up:
|
Run `scripts/setup-hooks.sh` to set the following hooks up:
|
||||||
- The `pre-commit` hook runs checks before every `git commit`.
|
- The `pre-commit` hook runs checks before every `git commit`.
|
||||||
@@ -84,4 +96,3 @@ Run `scripts/setup-hooks.sh` to set the following hooks up:
|
|||||||
- The `pre-push` hook runs checks before every `git push`.
|
- The `pre-push` hook runs checks before every `git push`.
|
||||||
It runs `scripts/ci.sh` aborting the push if there are code style or rule linter offenses or if the tests fail.
|
It runs `scripts/ci.sh` aborting the push if there are code style or rule linter offenses or if the tests fail.
|
||||||
This way you can ensure everything is alright before sending a pull request.
|
This way you can ensure everything is alright before sending a pull request.
|
||||||
|
|
||||||
|
|||||||
2
rules
2
rules
Submodule rules updated: 62410ba26d...a4f3f6e018
Submodule tests/data updated: d3fefaa02c...d8926884d1
Reference in New Issue
Block a user