Skip to main content

Python client for MalwareDB

Project description

Malware DB Python Client

Test Lint Release Documentation PyPI - Wheel Crates.io Version Bluesky

This is a Python module for interacting with an instance of Malware DB.

Installation

From Source

The best way to compile the Python client is with Maturin.

  1. python3 -m venv mdb-venv
  2. source mdb-venv/bin/activate
  3. pip install maturin
  4. git clone https://github.com/malwaredb/malwaredb-rs.git
  5. cd client-py
  6. maturin develop (or maturin build to create a distributable wheel)

Features

If using this crate with another library, be sure to use the rust_lib feature flag to avoid creating the Malware DB client module type. This could be useful for reusing the functions defined in this crate with another Python module.

Use

  1. Import the module: from malwaredb import MalwareDBClient
  2. Create a client object from one of three ways:
    • MalwareDBClient.from_file() to use a configuration file
    • MalwareDBClient() to have the client library find a configuration file
    • MalwareDBClient.connect(url, api_key, [cert_path]) to provide the URL, API key, and optional path for a certificate for encrypted communication
    • MalwareDBClient.login(url, username, password, save, [cert_path]) to provide the URL, username, password, whether to save the configuration, and optional path for a certificate for encrypted communication
    • MalwareDBCLient.discover() to find local servers via multicast DNS
  3. Client functionality:
    • .get_file_bytes() get a file from Malware DB
    • .server_info() get server information
    • .submit_file() submit a file to Malware DB
    • .get_supported_file_types() get a list of file types supported by the Malware DB server
    • .search() search for files based on some criteria. Some optional keyword arguments, a minimum of one criterion is required:
      • hash=: specify a partial hash
      • hash_type=: specify the type of the partial hash, options are md5, sha1, sha256, or sha512, default is sha256
      • file_name=: specify all or part of a file name
      • labels=: specify a list of labels
      • file_type=: specify a file type, which must match a file type from .get_supported_file_types()
      • magic=: specify all or part of the file command (libmagic) output for a given file
      • response_hash=: specify the hash type to be returned, options are md5, sha1, sha256, or sha512, default is sha256
      • limit=: integer specifying the maximum results to be returned, must be greater than zero
    • .labels() get available labels for samples
    • .whoami() get information about the user's account
    • .yara_search() search for files using Yara, if the server supports it
    • .yara_result() get results of Yara search using UUID
  4. CaRT functionality:
    • malwaredb.cart.create_cart() encodes bytes into a CaRT bytes
    • malwaredb.cart.decode_cart() decodes CaRT bytes back into the original binary long with header and footer data. See client-py/py_test/cart.py.
    • Current limitations:
      • create_cart() doesn't allow setting custom fields.
      • decode_cart() will not be able to return fields which aren't plain float, integer, or string types.
    • See cart as an alternative CaRT module which is probably more feature-rich.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

malwaredb-0.3.5.tar.gz (147.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

malwaredb-0.3.5-cp37-abi3-win_arm64.whl (3.0 MB view details)

Uploaded CPython 3.7+Windows ARM64

malwaredb-0.3.5-cp37-abi3-win_amd64.whl (3.0 MB view details)

Uploaded CPython 3.7+Windows x86-64

malwaredb-0.3.5-cp37-abi3-win32.whl (2.5 MB view details)

Uploaded CPython 3.7+Windows x86

malwaredb-0.3.5-cp37-abi3-musllinux_1_2_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ x86-64

malwaredb-0.3.5-cp37-abi3-musllinux_1_2_ppc64le.whl (3.1 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ppc64le

malwaredb-0.3.5-cp37-abi3-musllinux_1_2_i686.whl (3.0 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ i686

malwaredb-0.3.5-cp37-abi3-musllinux_1_2_armv7l.whl (2.8 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ARMv7l

malwaredb-0.3.5-cp37-abi3-musllinux_1_2_aarch64.whl (3.1 MB view details)

Uploaded CPython 3.7+musllinux: musl 1.2+ ARM64

malwaredb-0.3.5-cp37-abi3-manylinux_2_31_riscv64.whl (2.7 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.31+ riscv64

malwaredb-0.3.5-cp37-abi3-manylinux_2_28_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.28+ x86-64

malwaredb-0.3.5-cp37-abi3-manylinux_2_28_ppc64le.whl (3.0 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.28+ ppc64le

malwaredb-0.3.5-cp37-abi3-manylinux_2_28_i686.whl (2.8 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.28+ i686

malwaredb-0.3.5-cp37-abi3-manylinux_2_28_armv7l.whl (2.6 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.28+ ARMv7l

malwaredb-0.3.5-cp37-abi3-manylinux_2_28_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.28+ ARM64

malwaredb-0.3.5-cp37-abi3-macosx_11_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

malwaredb-0.3.5-cp37-abi3-macosx_10_12_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.7+macOS 10.12+ x86-64

File details

Details for the file malwaredb-0.3.5.tar.gz.

File metadata

  • Download URL: malwaredb-0.3.5.tar.gz
  • Upload date:
  • Size: 147.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for malwaredb-0.3.5.tar.gz
Algorithm Hash digest
SHA256 945befd1f43fd27850707221c58338d65f89740e6c6a9caa131ca4a8a2b0a3d3
MD5 62c33d529ba1078e7fc2a59f727445e9
BLAKE2b-256 16d8e01e50730df8ec14598bc717e1a722c3b8d996383eec1dc53c6f70e63358

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5.tar.gz:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-win_arm64.whl.

File metadata

  • Download URL: malwaredb-0.3.5-cp37-abi3-win_arm64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.7+, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 f906bc272ef60d5b4913c78fa57543535c4178765d8d47a0d97f5728d2e2e20d
MD5 cccfdfbd2c447e09033e61597d5f433a
BLAKE2b-256 b412d5c36c28e2dd5168dabf13d59e53529b9e144a6668955de789a09e3979a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-win_arm64.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: malwaredb-0.3.5-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 32f7421ec9cdcbddefd42b0aaedb2dae57828fcbe8ff6ba45ec3d66234f76279
MD5 ffe65bb4797aeb3f5fb2432c67cde706
BLAKE2b-256 37ff439a02b58a61f679874680518747fbbef7e04259c5289f1b95e0d42315c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-win_amd64.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-win32.whl.

File metadata

  • Download URL: malwaredb-0.3.5-cp37-abi3-win32.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.7+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 485c8cf3b148c1818386264903584e1e3b480f970fca5fbc33c6a96dabd3619c
MD5 3c477eda387b7a3b1e7e85624a1db7f5
BLAKE2b-256 06a7735916a23dd71fcfa47cc823ea4568565a3fda669ecc2867c7a083b96e7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-win32.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1902773d4e158b14854eb2ebf3f3b3ada4c721dee65524ee57048239d409045b
MD5 41dd69659a0543088308046bfb59a669
BLAKE2b-256 599a20934e0144c87e2937bc733260ad6abca2061815395f9a8ac8c826499e87

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-musllinux_1_2_ppc64le.whl.

File metadata

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-musllinux_1_2_ppc64le.whl
Algorithm Hash digest
SHA256 b2acf1756a84918a0b356a25af1562bb25346873bf635932a0c6dc6bd82145c1
MD5 03a4c80475f0c7c22df240d9c01fa305
BLAKE2b-256 6069c7b792a6f3c83d91f020caa11ee16043fcebaeba32e5717c598bb6c8ec2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-musllinux_1_2_ppc64le.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 550d6a13a1d38182fc99afe49a2c9a6e8d8e39fbd861cfb04530d23f86940e93
MD5 f29cb0da9efe22cd30cfe4c8f0d1be79
BLAKE2b-256 ca40a6805dcefafab893ef6d76935768f8b4321123128f92a41ca56af071ad55

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-musllinux_1_2_i686.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 2da9e40e31bcf0d1b816d2ec42158e65a8f42b91fa759a689a5540f60dfc052f
MD5 582ad87d1977b1406062378779707b48
BLAKE2b-256 288c9345596b36b79fd73997d6cd3b1d560d3e36642bdc98eb758404a32aa598

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-musllinux_1_2_armv7l.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 43f6445d82c369fca78aeb131e016fc2c3a95725557f9208a91e6356dd9937bd
MD5 13e441738b3504b6c036ed581322ad1f
BLAKE2b-256 4c807304a9141e82c880b0cbc31d84556fb41ca12c65f6e7e7ee2d7fcc75841c

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-manylinux_2_31_riscv64.whl.

File metadata

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-manylinux_2_31_riscv64.whl
Algorithm Hash digest
SHA256 cea65427b1a7a57ce18ffa2f4b7c87c1114bfb6fa18aaae6c89fc7e9a73f1dad
MD5 1ec9e2661d8168f70ec329fd20c287cd
BLAKE2b-256 4525d7d2adb93299cc0d0cb16b87e0d4f2b8fdb19136f8e096598029c85e0e17

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-manylinux_2_31_riscv64.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ba6e2af79f5abf7bc047d469e347ba3fee6fd52b74ea584c6d684093e74f2c40
MD5 caa9cb0ccb62fabd3571085e86920998
BLAKE2b-256 1318d85da9e067d00ccf254e0d9672c893477bae227675deac35b2c3d98836d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-manylinux_2_28_x86_64.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-manylinux_2_28_ppc64le.whl.

File metadata

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-manylinux_2_28_ppc64le.whl
Algorithm Hash digest
SHA256 ae8686c44f6fa8ed2ab71f8e3e01c4777f6fb75d7a4c76f4dc10579e990da711
MD5 f51751a34667f7958ebdeaa2081858ef
BLAKE2b-256 f4127a39f7021a3ac4f64ec1015d79027bbe8243a44302de556c0fb1808ff87c

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-manylinux_2_28_ppc64le.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-manylinux_2_28_i686.whl.

File metadata

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-manylinux_2_28_i686.whl
Algorithm Hash digest
SHA256 36d6ee0ca61772508ea4e8ace4432fff1503a7455f604e43d5078d92dc4f9dcf
MD5 fb04bf96163897ff54f86556c28c8cac
BLAKE2b-256 66a925f893102fa7f48b43ec543d479244f3a886d81a7ae4137283e554e9e5da

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-manylinux_2_28_i686.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-manylinux_2_28_armv7l.whl.

File metadata

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 6e06d73b69fc344c412a59a5778843750a43270e52ca10abef7ca4a2dd8078ba
MD5 7a58563ff4ddd7ca16ac0b30c7cabead
BLAKE2b-256 613ab9a5e5a326366e6c5944342791e3c598441fd8cb02a849d34d2ec1a9be83

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-manylinux_2_28_armv7l.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 316ef0f7e14da04a5393f8bd94b6206f26c11e07b7f0314bc64231520b2694bb
MD5 4815af41e7d62424022869853ace0f25
BLAKE2b-256 925b50205e8eb1ef9af94c0e39c8b897a6430c085a8e48e941c170ae506a7af7

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-manylinux_2_28_aarch64.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 22ea069eee8ca7c575dbb37159ac1ee37f2be15087870c4e961d6e699c763684
MD5 37bf744ff523cf314e5679694486d4d0
BLAKE2b-256 6047697a5896480cdcfb2f321cac2cd34f04cb608f41ae0130a38854f27408e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file malwaredb-0.3.5-cp37-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for malwaredb-0.3.5-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ed62d2188b6e9fd88f802f8407bd5e9dbf0d864c7abea5370d32c0fe0f1d0be2
MD5 78d1cade7002b2a796a9c003ddd1c954
BLAKE2b-256 9f44f2e7fcf30b883fd794c199d4641815afac803ecae1d0666e86d9770b6585

See more details on using hashes here.

Provenance

The following attestation bundles were made for malwaredb-0.3.5-cp37-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on malwaredb/malwaredb-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page