Skip to content

Commit

Permalink
Added tests section in pyintelowl
Browse files Browse the repository at this point in the history
Signed-off-by: aryan <[email protected]>
  • Loading branch information
aryan-bhokare committed Aug 20, 2024
1 parent 3e27e5d commit 3f00213
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/GreedyBear/Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The project goal is to extract data of the attacks detected by a [TPOT](https://

There are public feeds provided by The Honeynet Project in this site: greedybear.honeynet.org. [Example](https://greedybear.honeynet.org/api/feeds/log4j/all/recent.txt)

To check all the available feeds, Please refer to our [usage guide](https://greedybear.readthedocs.io/en/latest/Usage.html)
To check all the available feeds, Please refer to our [usage guide](https://intelowlproject.github.io/docs/GreedyBear/Usage/)

Please do not perform too many requests to extract feeds or you will be banned.

Expand Down
2 changes: 1 addition & 1 deletion docs/IntelOwl/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ There are 3 options to execute the web server:

Then you should call the `./start` script with the parameter `--https` to leverage the right Docker Compose file for HTTPS.

Plus, if you use [Flower](https://intelowlproject.github.io/docs/IntelOwl//advanced_configuration/#queue-customization), you should change in the `docker/flower.override.yml` the `flower_http.conf` with `flower_https.conf`.
Plus, if you use [Flower](https://intelowlproject.github.io/docs/IntelOwl/advanced_configuration/#queue-customization), you should change in the `docker/flower.override.yml` the `flower_http.conf` with `flower_https.conf`.

- **HTTPS with Let's Encrypt**

Expand Down
42 changes: 42 additions & 0 deletions docs/pyintelowl/Tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Tests
======================================

Configuration
--------------------------------------

Some tests require file samples, which can be found in the encrypted folder ``tests/test_files.zip`` (password: "infected").
Unzip the archive in ``tests/test_files`` folder before running the tests.

**Please remember that these are dangerous malware! They come encrypted and locked for a reason!
Do NOT run them unless you are absolutely sure of what you are doing!
They are to be used only for launching specific tests that require them** (``__send_analysis_request``)

* With the following constants in ``__init__.py``, you can customize your tests:

* **MOCKING_CONNECTIONS:** Mock connections to external API to test functions without a real connection or a valid API Key.

* If you prefer to use custom inputs for tests, you can change the following constants:

* **TEST_JOB_ID**
* **TEST_HASH**
* **TEST_URL**
* **TEST_IP**
* **TEST_DOMAIN**
* **TEST_GENERIC**
* **TEST_FILE**
* **TEST_FILE_HASH**

Launch Tests
-------------------------------------

* The test requirements are specified in the ``test-requirements.txt`` file. Install them using,

.. code-block:: bash

$ pip3 install -r test-requirements.txt

* Launch the tests using ``tox``:

.. code-block:: bash

$ tox
9 changes: 6 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ nav:
- API docs: "GreedyBear/Api-docs.md"
- PyIntelOwl:
- Quickstart: "pyintelowl/index.md"
- Modules:
- IntelOwlClass: "pyintelowl/IntelOwlClass.md"
- IntelOwlClientException: "pyintelowl/IntelOwlClientException.md"
- Usage:
- Modules:
- IntelOwlClass: "pyintelowl/IntelOwlClass.md"
- IntelOwlClientException: "pyintelowl/IntelOwlClientException.md"
- Development:
- Tests: "pyintelowl/Tests.md"
- GoIntelOwl:
- index: "GoIntelOwl/index.md"
- Guides:
Expand Down

0 comments on commit 3f00213

Please sign in to comment.