HavocFramework / Havoc

The Havoc Framework.
GNU General Public License v3.0
6.37k stars 903 forks source link

Added a create tab feature and input dialog to the HavocUI python API. #387

Closed p4p1 closed 10 months ago

p4p1 commented 11 months ago

Here is a demo script to showcase the five added functions:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Made by papi
# Created on: Fri 25 Aug 2023 07:16:32 PM CEST
# current-file-name
# Description:

import havocui

def calling_popup():
    havocui.messagebox("Hello", "World!")

def input_test():
    string = havocui.inputdialog("Test Input", "Type in something")
    print(string)

def open_file_dialog():
    string = havocui.openfiledialog("Open File")
    print(string)

def save_file_dialog():
    string = havocui.openfiledialog("Save File")
    print(string)

def ask_question():
    res = havocui.questiondialog("title", "what is this?")
    if res:
        print("Wow you clicked yes")
    else:
        print("wow you clicked no")

havocui.createtab("Tab Popup", "popup here", calling_popup, "input_test",
                  input_test, "Open file", open_file_dialog, "Save File",
                  save_file_dialog, "question", ask_question)

changes:

S4ntiagoP commented 10 months ago

dude this is amazing, thank you so much for contributing, I'm sure getting all this to work wasn't easy.
I also enjoyed reading your blogpost 😄
Keep this kind of work coming!

S4ntiagoP commented 10 months ago

cc @Cracked5pider take a look 👀

Cracked5pider commented 10 months ago

yeah looks really good.