PyLOOBins


NamePyLOOBins JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://loobins.io/
SummaryPython package for managing the LOOBins model and schema.
upload_time2024-12-03 21:50:23
maintainerNone
docs_urlNone
authorinfosecB
requires_python<4.0,>=3.8
licenseGPL-3.0-or-later
keywords cybersecurity cli lol
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyLOOBins
PyLOOBins is a Python SDK and command-line utility for programmatically interacting with [LOOBins](https://loobins.io).

You can download PyLOOBins from PyPI by running the following command:
`pip install pyloobins`

PyLOOBins requires Python 3.8 or later.

## Usage
### Command-line

You can run `pyloobins --help` to see the available commands and options.

```
>>> pyloobins --help

Usage: pyloobins [OPTIONS] COMMAND [ARGS]...

  Create, validate, and view LOOBin objects.

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  create       Create a YAML template file for a new LOOBin.
  export-stix  Export the LOOBins STIX bundle file.
  get          Get a LOOBin object.
  validate     Validate a LOOBin YAML file.
```

You can run `pyloobins <command> --help` to see the available options for a specific command.
```
>>> pyloobins validate --help
Usage: pyloobins validate [OPTIONS]

  Validate a LOOBin YAML file.

Options:
  --path TEXT  The path of the LOOBin YAML file to validate.  [required]
  --help       Show this message and exit.
```

### SDK

You can use pyloobins as a Python SDK to programmatically interact with LOOBins.

#### pyloobins.util
The util module can be used to get LOOBin objects from the LOOBins API, validate LOOBin YAML files, and create LOOBin YAML templates.

**Example:** get all LOOBins and print a list of the use case code.

```
from pyloobins import util

loobins = util.get_loobins()

for loobin in loobins:
  for uc in loobin.example_use_cases:
    print(f"{loobin.name}: {uc.code}")
```

#### pyloobins.models
The models module contains the classes that represent a LOOBin and its various components. 

**Example:** programmitcally create a LOOBin object.

```
from pyloobins.models import Detection, ExampleUseCase, LOOBin, Resource

l = LOOBin(
        name="",
        short_description="A short description of the binary goes here.",
        full_description="A full length description of the binary goes here.",
        author="Enter your name or alias here.",
        created=date.today(),
        example_use_cases=[
            ExampleUseCase(
                name="An Example Use Case",
                description="A description of the use case goes here.",
                code="A code snippet goes here.",
                tactics=["Discovery"],
                tags=["example_tag", "another_tag"],
            )
        ],
        paths=["/enter/binary/path/here"],
        detections=[
            Detection(
                name="A detection source (e.g. Sigma)",
                url="https://urltodetection.here",
            )
        ],
        resources=[
            Resource(
                name="Name of resources.",
                url="https://urlofexternalreference.here",
            )
        ],
        acknowledgements=["Enter any acknowledgements here."],
    )

with open ("loobin.yaml", "w") as f:
  f.write(l.to_yaml())
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://loobins.io/",
    "name": "PyLOOBins",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "cybersecurity, cli, lol",
    "author": "infosecB",
    "author_email": "brendan@infosecb.com",
    "download_url": "https://files.pythonhosted.org/packages/77/76/2e0de3d93202a40b0963f82fe57af5ce69c7a0d110cee4bc34b7395da983/pyloobins-2.0.0.tar.gz",
    "platform": null,
    "description": "# PyLOOBins\nPyLOOBins is a Python SDK and command-line utility for programmatically interacting with [LOOBins](https://loobins.io).\n\nYou can download PyLOOBins from PyPI by running the following command:\n`pip install pyloobins`\n\nPyLOOBins requires Python 3.8 or later.\n\n## Usage\n### Command-line\n\nYou can run `pyloobins --help` to see the available commands and options.\n\n```\n>>> pyloobins --help\n\nUsage: pyloobins [OPTIONS] COMMAND [ARGS]...\n\n  Create, validate, and view LOOBin objects.\n\nOptions:\n  --version  Show the version and exit.\n  --help     Show this message and exit.\n\nCommands:\n  create       Create a YAML template file for a new LOOBin.\n  export-stix  Export the LOOBins STIX bundle file.\n  get          Get a LOOBin object.\n  validate     Validate a LOOBin YAML file.\n```\n\nYou can run `pyloobins <command> --help` to see the available options for a specific command.\n```\n>>> pyloobins validate --help\nUsage: pyloobins validate [OPTIONS]\n\n  Validate a LOOBin YAML file.\n\nOptions:\n  --path TEXT  The path of the LOOBin YAML file to validate.  [required]\n  --help       Show this message and exit.\n```\n\n### SDK\n\nYou can use pyloobins as a Python SDK to programmatically interact with LOOBins.\n\n#### pyloobins.util\nThe util module can be used to get LOOBin objects from the LOOBins API, validate LOOBin YAML files, and create LOOBin YAML templates.\n\n**Example:** get all LOOBins and print a list of the use case code.\n\n```\nfrom pyloobins import util\n\nloobins = util.get_loobins()\n\nfor loobin in loobins:\n  for uc in loobin.example_use_cases:\n    print(f\"{loobin.name}: {uc.code}\")\n```\n\n#### pyloobins.models\nThe models module contains the classes that represent a LOOBin and its various components. \n\n**Example:** programmitcally create a LOOBin object.\n\n```\nfrom pyloobins.models import Detection, ExampleUseCase, LOOBin, Resource\n\nl = LOOBin(\n        name=\"\",\n        short_description=\"A short description of the binary goes here.\",\n        full_description=\"A full length description of the binary goes here.\",\n        author=\"Enter your name or alias here.\",\n        created=date.today(),\n        example_use_cases=[\n            ExampleUseCase(\n                name=\"An Example Use Case\",\n                description=\"A description of the use case goes here.\",\n                code=\"A code snippet goes here.\",\n                tactics=[\"Discovery\"],\n                tags=[\"example_tag\", \"another_tag\"],\n            )\n        ],\n        paths=[\"/enter/binary/path/here\"],\n        detections=[\n            Detection(\n                name=\"A detection source (e.g. Sigma)\",\n                url=\"https://urltodetection.here\",\n            )\n        ],\n        resources=[\n            Resource(\n                name=\"Name of resources.\",\n                url=\"https://urlofexternalreference.here\",\n            )\n        ],\n        acknowledgements=[\"Enter any acknowledgements here.\"],\n    )\n\nwith open (\"loobin.yaml\", \"w\") as f:\n  f.write(l.to_yaml())\n```\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Python package for managing the LOOBins model and schema.",
    "version": "2.0.0",
    "project_urls": {
        "Homepage": "https://loobins.io/",
        "Repository": "https://github.com/infosecB/LOOBins"
    },
    "split_keywords": [
        "cybersecurity",
        " cli",
        " lol"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b8db437322a13bb951862dbd4b057e5e3fd00185854817e8a1e14b85670ca07",
                "md5": "c0e4a483a4e6b14ab557aebacf4c3540",
                "sha256": "9a974f88b8df263677c194e7fc1667db32e8471cc5af985c9142587a4bbb6cb4"
            },
            "downloads": -1,
            "filename": "pyloobins-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c0e4a483a4e6b14ab557aebacf4c3540",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 66887,
            "upload_time": "2024-12-03T21:50:21",
            "upload_time_iso_8601": "2024-12-03T21:50:21.827178Z",
            "url": "https://files.pythonhosted.org/packages/3b/8d/b437322a13bb951862dbd4b057e5e3fd00185854817e8a1e14b85670ca07/pyloobins-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77762e0de3d93202a40b0963f82fe57af5ce69c7a0d110cee4bc34b7395da983",
                "md5": "55b1fb279afaf3b9c068bd6edd37d984",
                "sha256": "03eae4ca199d16fe33ed53dc6619f9b6f4789d004342f9659715145cbaf5c6ce"
            },
            "downloads": -1,
            "filename": "pyloobins-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "55b1fb279afaf3b9c068bd6edd37d984",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 44759,
            "upload_time": "2024-12-03T21:50:23",
            "upload_time_iso_8601": "2024-12-03T21:50:23.184600Z",
            "url": "https://files.pythonhosted.org/packages/77/76/2e0de3d93202a40b0963f82fe57af5ce69c7a0d110cee4bc34b7395da983/pyloobins-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-03 21:50:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "infosecB",
    "github_project": "LOOBins",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyloobins"
}
        
Elapsed time: 0.39617s