Closed p4p1 closed 11 months ago
import havocui a = 0 logs = havocui.Logger("output will be here") abc = havocui.Widget("mdrrr") img_text = havocui.Dialog("test-img") img_text.addImage("/path/to/image.png") def open_dialog(): img_text.exec() def nuke(): abc.clear() def replace(): abc.replaceLabel("I will delete myself!", "Oh what is this dynamic stuff") def add_to_logs(): print("here") logs.addText("abcdef\nghijklmn\nopqrstuv\nwxyz") logs.addText("<h1><span style=\"color:#8be0fd\">fjklafdjaslk</span></h1>") abc.addImage("/path/to/image.png") abc.addLabel("I will delete myself!") abc.addButton("new logs", add_to_logs) abc.addButton("replace the text...", replace) abc.addButton("delete widget...", nuke) abc.setSmallTab() def callback(): global a a += 1 print("hello", a) if a > 100: print("now should close") a = -1 return a def call_logger(): logs.setBottomTab() def call_progress_dialog(): havocui.progressdialog("Title", "close me", callback, 100) def call_colorpicker(): print(havocui.colordialog()) havocui.createtab("new stuff", "progress dialog", call_progress_dialog, "color picker", call_colorpicker, "logger", call_logger, "dialog img", open_dialog)
Changed
Added
screenshots
new logger with HTML support
color picker
progress dialog
added image support to dialogs
added image support to widgets
sample code to test with