def Launcher(): # def print(line): # window.FindElement('output').Update(line) sg.ChangeLookAndFeel('Dark') namesonly = [f for f in os.listdir(ROOT_PATH) if f.endswith('.py')] sg.SetOptions(element_padding=(0, 0), button_element_size=(12, 1), auto_size_buttons=False) layout = [[ sg.Combo(values=namesonly, size=(35, 30), key='demofile'), sg.ReadButton('Run', button_color=('white', '#00168B')), sg.ReadButton('Program 1'), sg.ReadButton('Program 2'), sg.ReadButton('Program 3', button_color=('white', '#35008B')), sg.Button('EXIT', button_color=('white', 'firebrick3')) ], [sg.T('', text_color='white', size=(50, 1), key='output')]] window = sg.Window('Floating Toolbar', no_titlebar=True, keep_on_top=True).Layout(layout) # ---===--- Loop taking in user input and executing appropriate program --- # while True: (button, value) = window.Read() if button is 'EXIT' or button is None: break # exit button clicked if button is 'Program 1': print('Run your program 1 here!') elif button is 'Program 2': print('Run your program 2 here!') elif button is 'Run': file = value['demofile'] print('Launching %s' % file) ExecuteCommandSubprocess('python', os.path.join(ROOT_PATH, file)) else: print(button)
key='notes') ], [ sg.T('Output:', pad=((3, 0), 0)), sg.T('', size=(44, 1), text_color='white', key='output') ], [ sg.CBox('Checkbox:', default=True, pad=((3, 0), 0), key='cbox'), sg.Listbox((1, 2, 3, 4), size=(8, 3), key='listbox'), sg.Radio('Radio 1', default=True, group_id='1', key='radio1'), sg.Radio('Radio 2', default=False, group_id='1', key='radio2') ], [ sg.Spin((1, 2, 3, 4), 1, key='spin'), sg.OptionMenu((1, 2, 3, 4), key='option'), sg.Combo(values=(1, 2, 3, 4), key='combo') ], [sg.Multiline('Multiline', size=(20, 3), key='multi')], [sg.Slider((1, 10), size=(20, 20), orientation='h', key='slider')], [ sg.ReadButton('Enable', button_color=('white', 'black')), sg.ReadButton('Disable', button_color=('white', 'black')), sg.ReadButton('Reset', button_color=('white', '#9B0023'), key='reset'), sg.ReadButton('Values', button_color=('white', 'springgreen4')), sg.Button('Exit', button_color=('white', '#00406B')) ]] window = sg.Window("Disable Elements Demo", default_element_size=(12, 1), text_justification='r',
menu_def = [['&File', [ 'Edit Modules', 'Edit ProxyList', ]], ['&Edit', ['Config', [ 'Proxy', 'Module', ]]], ['&Help', '&About']] mainLayout = [ [sg.Menu(menu_def, tearoff=True)], [sg.Text("Account to send from:", size=(138, 1), justification="right")], [ sg.Combo([ "Create Payload", "Launch Payload", "Open shell", "Check Status of Clients", "Check Status of ProxyChains", "Single Account Checkup" ], size=(100, 10), enable_events=False, readonly=True), sg.Listbox(values=(accounts.values()), size=(50, 20)) ], [sg.Button("Execute", size=(20, 2), button_color=["red", "black"])], [sg.Text("Notes", size=(120, 2)), sg.Text("Target Client", size=(15, 2))], [ sg.Multiline(autoscroll=True, size=(100, 10), do_not_clear=True), sg.Listbox(values=(clients.values()), size=(50, 10)) ], [ sg.Button("Save", tooltip='Click to save notes for client', button_color=["black", "white"]),