dhondta/python-sploitkit

How to add basic options?

fuckwbored opened this issue · 2 comments

Hi! I wan't to ask you how to add some basic options like RPORT/RHOST?

And if you have give documentation abous this tool pls!

Hi @fuckwbored
Thank you for your question.
I apologize for the poor documentation ; my current schedule does not allow me to work this out decently.

You can find an example of what you're trying to do here (DroneSploit project).

As a template, you can use :

from sploitkit import *

def ipaddr(module, ip):
    # check IP here    

def portnum(module, port):
    # check port number here    

class FirmwareUpdate(CmeUpdateModule):
    """ My awesome module help message. """
    config = Config({
        Option(
            'RHOST',
            "target IP",
            True,
            validate=ipaddr,
        ): "192.168.1.1",
        Option(
            'RPORT',
            "target port number",
            True,
            validate=portnum,
        ): 12345,
    })
    
    def run(self):
        # do something with self.config.get("RHOST") and self.config.get("RPORT")