PyLOOBins
PyLOOBins is a Python SDK and command-line utility for programmatically interacting with LOOBins.
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())
Release files for PyLOOBins 2.0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyloobins-2.0.14.tar.gz | 53.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyloobins-2.0.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:73.6 kB
Release files / pyloobins-2.0.14.tar.gz
| Download URL | pyloobins-2.0.14.tar.gz |
|---|---|
| Size | 53.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8778c66c26d31a6c717cdc3adfc7de99d10e87a76179506a49a94c2f12ba844a
|
|
BLAKE2b-256 checksum How to use checksums |
2a7451929401e3f77f8289fbd384f9d2c2dd646dc91f4fe9ada43690c6c12092
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pyloobins-2.0.14-py3-none-any.whl
| Download URL | pyloobins-2.0.14-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a03b329e90e90ba283e64f832511d148155d3a0a588a5f5ded8c72f5c722d73c
|
|
BLAKE2b-256 checksum How to use checksums |
0d32a15a77d8b302a24909b8c8e452cbe9b6024802d53adfd2200f5d03c1881c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|