Skip to main content

OSINTBuddy - mine, merge, and map data for novel insights

Project description

Total Downloads Downloads

Extending OSINTBuddy with plugins

The plugins library for osintbuddy osintbuddy-demo

This project follows the Python Standards declared in PEP 621. It uses a pyproject.yaml file to configure the project and Flit to simplify the build process and publish to PyPI.

Creating your first plugin

In this guide, we will dive into creating a custom plugin for OSINTBuddy that extends its capabilities. This will enable you to incorporate additional sources and transformations into the OSINTBuddy toolbox. We will use the provided code example as a reference to build our plugin.

Step-by-step guide to create a new plugin

Start by importing the necessary modules:

import socket
import osintbuddy as ob

Define a class for your plugin, inheriting from ob.Plugin. Set the required attributes such as label, and optionally set an icon like world-www (using tabler-icon names), and a node which contains a list of elements used as a blueprint for creating the node displayed on the OSINTBuddy UI.

class WebsitePlugin(ob.Plugin):
    label = 'Website'
    name = 'Website'
    color = '#1D1DB8'
    icon = 'world-www'
    node = [
        ob.elements.TextInput(label='Domain', icon='world-www'),
    ]

Now, define a transformation method to gather and transform the data from the input node. In this case, the transform_to_ip function uses the socket.gethostbyname() Python module to obtain the IP address for a given domain. Decorate the method with @transform() and set the metadata attributes such as label and icon.

@transform(label='To IP', icon='building-broadcast-tower')
def transform_to_ip(self, node, **kwargs):
    blueprint = IPAddressPlugin.blueprint(
        ip_address=socket.gethostbyname(node['data'][0])
    )
    return blueprint

Using the new plugin

To use the new plugin, simply add it to the existing OSINTBuddy plugins folder inside the application, in development mode it will be detected automatically and loaded by the platform. Once added, you can access your 'Website' plugin and use the 'To IP' transformation.

Creating a custom plugin for OSINTBuddy is an easy and effective way to enhance the capabilities of the tool, allowing you to fetch information from additional sources or transform the data in new ways. By following this guide and using the provided code example as a reference, you'll be able to create your own unique plugins to extend the functionality of OSINTBuddy to fit your specific needs.

Full example

import socket
import osintbuddy as ob

class WebsitePlugin(ob.Plugin):
    label = 'Website'
    name = 'Website'
    color = '#1D1DB8'
    icon = 'world-www'
    node = [
        ob.elements.TextInput(label='Domain', icon='world-www'),
    ]

    @ob.transform(label='To IP', icon='building-broadcast-tower')
    async def transform_to_ip(self, node, **kwargs):
        blueprint = IPAddressPlugin.blueprint(
            ip_address=socket.gethostbyname(node['data'][0])
        )
        return blueprint

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

osintbuddy-0.0.3rc37.post1.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

osintbuddy-0.0.3rc37.post1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file osintbuddy-0.0.3rc37.post1.tar.gz.

File metadata

  • Download URL: osintbuddy-0.0.3rc37.post1.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for osintbuddy-0.0.3rc37.post1.tar.gz
Algorithm Hash digest
SHA256 6f4c7ce5a0597058e9d34f3770363d79a33990a2b697636f3ffdc96bcb4045de
MD5 ad2c4c70b1111d7d29f4444ae3855cfc
BLAKE2b-256 2601e6a46b99a9c22b41ff41828ed6af260ffe44eace1bf88987fcfbc243abcb

See more details on using hashes here.

File details

Details for the file osintbuddy-0.0.3rc37.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for osintbuddy-0.0.3rc37.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 02e299ae046faa0b701fa4b4f98ec4d1cdd610fee0b2c1ebb0f17ac2da8ef67b
MD5 f5914a89983b71d14a17504a2a86b390
BLAKE2b-256 543004b1e1a46e47bf0223f45787c3aa599cde3d9b41dd27cfb3185b799abadf

See more details on using hashes here.

Supported by

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