Tkinter Contruct Template

# Python2 example

import Tkinter as tk
import Tkinter, Tkconstants, tkFileDialog
import winappdbg
from winappdbg import win32
from Tkinter import *
import tkMessageBox
import ttk

class system_information():
def __init__(self):
self.info_list = ''

def retrieve_sysinfo(self):
# Create a System object
system = winappdbg.System()

# Use the built-in WinAppDbg table
table = winappdbg.Table("\t")

# New line
table.addRow("", "")

# Header
title = ("System Information", "")

# Add system information
table.addRow("Bits", system.bits)
table.addRow("OS", system.os)
table.addRow("Architecture", system.arch)
table.addRow("32-bit Emulation", system.wow64)
table.addRow("Admin", system.is_admin())
table.addRow("WinAppDbg", winappdbg.version)
table.addRow("Process Count", system.get_process_count())

self.info_list = table.getOutput()
return self.info_list

class process():
def __init__(self):
self.process_list = ''

def process_retrieve(self):
system = winappdbg.System()

# We can reuse example 02 from the docs
table = winappdbg.Table("\t")
table.addRow("", "")

header = ("Process ID ", "Process Name")

table.addRow("----", "----------")

processes = {}
# Add all processes to a dictionary then sort them by pid
for process in system:
processes[process.get_pid()] = process.get_filename()

# Iterate through processes sorted by pid
for key in sorted(processes.iterkeys()):
table.addRow(key, processes[key])
self.process_list = table.getOutput()
return self.process_list

def print_process():
d = process()
tkMessageBox.showinfo("PROCESS LIST", d.process_list)

def donothing():
x = 0

def helloCallBack():
tkMessageBox.showinfo( "Credit", "[*] Made by VK_")

if __name__ == "__main__":

root = Tk()
root.title("[*] Welcome to MalInspector")
btn = Button(root, text="Refresh Process List", command=print_process, bd =5)
btn.grid(column=0, row=0)
ttk.Separator(root).place(x=0, y=1, relwidth=1)
# open ask
# Credit button implemenation
B = Button(root, text="Credit", command=helloCallBack)
B.grid(column=0, row=0)
# Get user input implementaiton
var = StringVar()
textbox = Entry(root, textvariable=var, bd =5)
textbox.pack(pady=10, padx=10)
ttk.Separator(root).place(x=0, y=26, relwidth=1)

# menu implementation
menubar = Menu(root)
filemenu = Menu(menubar, tearoff=0)
filemenu.add_command(label="New", command=donothing)
filemenu.add_command(label="Open", command=donothing)
filemenu.add_command(label="Save", command=donothing)
filemenu.add_command(label="Exit", command=root.quit)
menubar.add_cascade(label="File", menu=filemenu)
helpmenu = Menu(menubar, tearoff=0)
helpmenu.add_command(label="Help Index", command=donothing)
helpmenu.add_command(label="About...", command=donothing)
menubar.add_cascade(label="Help", menu=helpmenu)
# retreive system information
S = Text(root, height=30, width=34, bd =5)
S.pack(padx=0, pady=10, side=LEFT)
s = system_information()
S.insert(END, s.info_list)
# process retrieve implementation
P = Text(root, height=100, width=80, bd =5)
P.pack(padx=0, pady=10, side=LEFT)
d = process()
P.insert(END, d.process_list)