pythreatmatrix


Namepythreatmatrix JSON
Version 5.0.0 PyPI version JSON
download
home_pagehttps://github.com/khulnasoft/pythreatmatrix
SummaryRobust Python SDK and CLI for ThreatMatrix's API
upload_time2024-07-01 04:31:04
maintainerNone
docs_urlNone
authorMatteo Lodi
requires_python>=3.8
licenseNone
keywords threatmatrix sdk python command line osint threat intel malware
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # PyThreatMatrix

[![PyPI version](https://badge.fury.io/py/pythreatmatrix.svg)](https://badge.fury.io/py/pythreatmatrix)
[![PyPI Supported Python Versions](https://img.shields.io/pypi/pyversions/pythreatmatrix.svg)](https://pypi.python.org/pypi/pythreatmatrix/)

[![Pull request automation](https://github.com/khulnasoft/pythreatmatrix/actions/workflows/pull_request_automation.yml/badge.svg)](https://github.com/khulnasoft/pythreatmatrix/actions/workflows/pull_request_automation.yml)
[![codecov](https://codecov.io/gh/khulnasoft/pythreatmatrix/branch/master/graph/badge.svg?token=JF62UMZ0U6)](https://codecov.io/gh/khulnasoft/pythreatmatrix)
[![CodeFactor](https://www.codefactor.io/repository/github/khulnasoft/pythreatmatrix/badge)](https://www.codefactor.io/repository/github/khulnasoft/pythreatmatrix)

Robust Python **SDK** and **Command Line Client** for interacting with [ThreatMatrix](https://github.com/khulnasoft/ThreatMatrix)'s API.

## Features

- Easy one-time configuration with self documented help and hints along the way.
- Request new analysis for observables and files.
  - Select which analyzers you want to run for every analysis you perform.
  - Choose whether you want to HTTP poll for the analysis to finish or not.
- List all jobs or view one job in a prettified tabular form.
- List all tags or view one tag in a prettified tabular form.
- Tabular view of the `analyzer_config.json` and `connector_config.json` from ThreatMatrix with RegEx matching capabilities.

## Demo

[![pythreatmatrix asciicast](https://asciinema.org/a/z7L93lsIzOQ0Scve7hMl30mJJ.svg)](https://asciinema.org/a/z7L93lsIzOQ0Scve7hMl30mJJ?t=5)

## Installation

```bash
$ pip3 install pythreatmatrix
```

For development/testing, `pip3 install pythreatmatrix[dev]`

## Quickstart

### As Command Line Client

On successful installation, The `pythreatmatrix` entryscript should be directly invokable. For example,

```bash
$ pythreatmatrix
Usage: pythreatmatrix [OPTIONS] COMMAND [ARGS]...

Options:
  -d, --debug  Set log level to DEBUG
  --version    Show the version and exit.
  -h, --help   Show this message and exit.

Commands:
  analyse                Send new analysis request
  analyzer-healthcheck   Send healthcheck request for an analyzer...
  config                 Set or view config variables
  connector-healthcheck  Send healthcheck request for a connector
  get-analyzer-config    Get current state of `analyzer_config.json` from...
  get-connector-config   Get current state of `connector_config.json` from...
  jobs                   Manage Jobs
  tags                   Manage tags
```

### As a library / SDK

```python
from pythreatmatrix import ThreatMatrix
obj = ThreatMatrix("<your_api_key>", "<your_threatmatrix_instance_url>", "optional<path_to_pem_file>", "optional<proxies>")
```

For more comprehensive documentation, please see https://pythreatmatrix.readthedocs.io/.

## Changelog

View [CHANGELOG.md](https://github.com/khulnasoft/pythreatmatrix/blob/master/.github/CHANGELOG.md).

## FAQ

#### Generate API key

You need a valid API key to interact with the ThreatMatrix server.
Keys should be created from the admin interface of [ThreatMatrix](https://github.com/khulnasoft/threatmatrix): you have to go in the _Durin_ section (click on `Auth tokens`) and generate a key there.

#### Incompatibility after version 3.0

We did a complete rewrite of the PyThreatMatrix client and CLI both for the version `3.0.0`. We very much recommend you to update to the latest version to enjoy all new features.

#### (old auth method) JWT Token Authentication

> this auth was available in ThreatMatrix versions <1.8.0 and pythreatmatrix versions <2.0.0

From the admin interface of ThreatMatrix, you have to go in the _Outstanding tokens_ section and generate a token there.

You can use it by pasting it into the file [api_token.txt](api_token.txt).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/khulnasoft/pythreatmatrix",
    "name": "pythreatmatrix",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "threatmatrix sdk python command line osint threat intel malware",
    "author": "Matteo Lodi",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/d2/4f/159776362c720d3dfd6b8df0eb01c240c96a898a97fe2daa4e877436fa29/pythreatmatrix-5.0.0.tar.gz",
    "platform": null,
    "description": "# PyThreatMatrix\n\n[![PyPI version](https://badge.fury.io/py/pythreatmatrix.svg)](https://badge.fury.io/py/pythreatmatrix)\n[![PyPI Supported Python Versions](https://img.shields.io/pypi/pyversions/pythreatmatrix.svg)](https://pypi.python.org/pypi/pythreatmatrix/)\n\n[![Pull request automation](https://github.com/khulnasoft/pythreatmatrix/actions/workflows/pull_request_automation.yml/badge.svg)](https://github.com/khulnasoft/pythreatmatrix/actions/workflows/pull_request_automation.yml)\n[![codecov](https://codecov.io/gh/khulnasoft/pythreatmatrix/branch/master/graph/badge.svg?token=JF62UMZ0U6)](https://codecov.io/gh/khulnasoft/pythreatmatrix)\n[![CodeFactor](https://www.codefactor.io/repository/github/khulnasoft/pythreatmatrix/badge)](https://www.codefactor.io/repository/github/khulnasoft/pythreatmatrix)\n\nRobust Python **SDK** and **Command Line Client** for interacting with [ThreatMatrix](https://github.com/khulnasoft/ThreatMatrix)'s API.\n\n## Features\n\n- Easy one-time configuration with self documented help and hints along the way.\n- Request new analysis for observables and files.\n  - Select which analyzers you want to run for every analysis you perform.\n  - Choose whether you want to HTTP poll for the analysis to finish or not.\n- List all jobs or view one job in a prettified tabular form.\n- List all tags or view one tag in a prettified tabular form.\n- Tabular view of the `analyzer_config.json` and `connector_config.json` from ThreatMatrix with RegEx matching capabilities.\n\n## Demo\n\n[![pythreatmatrix asciicast](https://asciinema.org/a/z7L93lsIzOQ0Scve7hMl30mJJ.svg)](https://asciinema.org/a/z7L93lsIzOQ0Scve7hMl30mJJ?t=5)\n\n## Installation\n\n```bash\n$ pip3 install pythreatmatrix\n```\n\nFor development/testing, `pip3 install pythreatmatrix[dev]`\n\n## Quickstart\n\n### As Command Line Client\n\nOn successful installation, The `pythreatmatrix` entryscript should be directly invokable. For example,\n\n```bash\n$ pythreatmatrix\nUsage: pythreatmatrix [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  -d, --debug  Set log level to DEBUG\n  --version    Show the version and exit.\n  -h, --help   Show this message and exit.\n\nCommands:\n  analyse                Send new analysis request\n  analyzer-healthcheck   Send healthcheck request for an analyzer...\n  config                 Set or view config variables\n  connector-healthcheck  Send healthcheck request for a connector\n  get-analyzer-config    Get current state of `analyzer_config.json` from...\n  get-connector-config   Get current state of `connector_config.json` from...\n  jobs                   Manage Jobs\n  tags                   Manage tags\n```\n\n### As a library / SDK\n\n```python\nfrom pythreatmatrix import ThreatMatrix\nobj = ThreatMatrix(\"<your_api_key>\", \"<your_threatmatrix_instance_url>\", \"optional<path_to_pem_file>\", \"optional<proxies>\")\n```\n\nFor more comprehensive documentation, please see https://pythreatmatrix.readthedocs.io/.\n\n## Changelog\n\nView [CHANGELOG.md](https://github.com/khulnasoft/pythreatmatrix/blob/master/.github/CHANGELOG.md).\n\n## FAQ\n\n#### Generate API key\n\nYou need a valid API key to interact with the ThreatMatrix server.\nKeys should be created from the admin interface of [ThreatMatrix](https://github.com/khulnasoft/threatmatrix): you have to go in the _Durin_ section (click on `Auth tokens`) and generate a key there.\n\n#### Incompatibility after version 3.0\n\nWe did a complete rewrite of the PyThreatMatrix client and CLI both for the version `3.0.0`. We very much recommend you to update to the latest version to enjoy all new features.\n\n#### (old auth method) JWT Token Authentication\n\n> this auth was available in ThreatMatrix versions <1.8.0 and pythreatmatrix versions <2.0.0\n\nFrom the admin interface of ThreatMatrix, you have to go in the _Outstanding tokens_ section and generate a token there.\n\nYou can use it by pasting it into the file [api_token.txt](api_token.txt).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Robust Python SDK and CLI for ThreatMatrix's API",
    "version": "5.0.0",
    "project_urls": {
        "Documentation": "https://github.com/khulnasoft/pythreatmatrix",
        "Funding": "https://liberapay.com/KhulnaSoft/",
        "Homepage": "https://github.com/khulnasoft/pythreatmatrix",
        "Source": "https://github.com/khulnasoft/pythreatmatrix",
        "Tracker": "https://github.com/khulnasoft/pythreatmatrix/issues"
    },
    "split_keywords": [
        "threatmatrix",
        "sdk",
        "python",
        "command",
        "line",
        "osint",
        "threat",
        "intel",
        "malware"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9797d393b14c38ea231c0ae359cd5892838a3c8fccf051b8b2365c875308a9ff",
                "md5": "bb83cb44a9c7ead1e2e84bbd2cc7ff62",
                "sha256": "d686e409c72087d387f9856460ee016330e5e22a37c82523763544e229678275"
            },
            "downloads": -1,
            "filename": "pythreatmatrix-5.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bb83cb44a9c7ead1e2e84bbd2cc7ff62",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 47999,
            "upload_time": "2024-07-01T04:31:03",
            "upload_time_iso_8601": "2024-07-01T04:31:03.244351Z",
            "url": "https://files.pythonhosted.org/packages/97/97/d393b14c38ea231c0ae359cd5892838a3c8fccf051b8b2365c875308a9ff/pythreatmatrix-5.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d24f159776362c720d3dfd6b8df0eb01c240c96a898a97fe2daa4e877436fa29",
                "md5": "f40477b472fece984b6518de4d9ab074",
                "sha256": "5d0dcd776b91c5d815d3f4876ccce165af100e68a231ba77a4739e8716a3c3a5"
            },
            "downloads": -1,
            "filename": "pythreatmatrix-5.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f40477b472fece984b6518de4d9ab074",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 44903,
            "upload_time": "2024-07-01T04:31:04",
            "upload_time_iso_8601": "2024-07-01T04:31:04.967338Z",
            "url": "https://files.pythonhosted.org/packages/d2/4f/159776362c720d3dfd6b8df0eb01c240c96a898a97fe2daa4e877436fa29/pythreatmatrix-5.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-01 04:31:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "khulnasoft",
    "github_project": "pythreatmatrix",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "pythreatmatrix"
}
        
Elapsed time: 0.30670s