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.3rc35.post1.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for osintbuddy-0.0.3rc35.post1.tar.gz
Algorithm Hash digest
SHA256 7591c9e959ff4eaa29ce3f1bae7d4f8be07040b7953eb66fec62a7214406a078
MD5 b5fa18a63ffee6a636be94cf886e039c
BLAKE2b-256 f0564b7ccc2b7b49ba7c62a04601a45ff2aee51f7756141229312f3b7d173c21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for osintbuddy-0.0.3rc35.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8ff45cd11010450c2cd5b18f3f3d15529432e73ec8ea4ed160d65d7dc233c02
MD5 51eba65a6f432f0829b0682d9c22ef40
BLAKE2b-256 2e5391ddf1ae960250d592ec49992e31764cd5d4568085bd9760985cde8f12b5

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