Exemplo n.º 1
0
    def getUiComponent(self):
        """Burp uses this method to obtain the component that should be used as
        the contents of the custom tab when it is displayed.
        Returns a awt.Component.
        """
        # GUI happens here
        # setting up the table
        # initial data in the table
        tableData = [
            # [3, "Issue3", "Severity3", "Host3", "Path3"],
            ["Issue0", "Severity0", "Host0", "Path0", "Description0",
             "Remediation0", "Request0", "Response0"],
            # [2, "Issue2", "Severity2", "Host2", "Path2"],
        ]
        from IssueTable import IssueTable
        issues = list()
        for it in tableData:
            tmpIssue = Issue(name=it[0], severity=it[1],host=it[2],
                path=it[3], description=it[4], remediation=it[5],
                reqResp=RequestResponse(request=it[6], response=it[7]))
            issues.append(tmpIssue)

        table = IssueTable(issues)
        import MainPanel
        MainPanel.burpPanel = MainPanel.MainPanel(self.callbacks, table)
        return MainPanel.burpPanel.panel
Exemplo n.º 2
0
 def __init__(self):
     self.screen = pygame.display.set_mode(screen_size(), pygame.FULLSCREEN,
                                           32)
     self.clock = pygame.time.Clock()
     self.MainPanel = MainPanel.MainPanel()
     self.FPS = 60  #Hz
     self.main_loop()
Exemplo n.º 3
0
    def __init__(self, parent, title):
        super().__init__(parent=parent, title=title)
        self.width, self.height = wx.Window.GetClientSize(self)
        self.SetInitialSize((640, 480))
        self.main_panel = MainPanel(self)

        self.highscores_panel = HighscoresPanel(self)
        self.highscores_panel.Hide()

        self.timer_panel = TimerPanel(self)
        self.timer_panel.Hide()

        self.option_panel = OptionsPanel(self)
        self.option_panel.Hide()

        self.specs = self.option_panel.get_specs()["Value"]

        self.round_panels = self.generate_rounds()

        self.play_panel = PlayPanel(self)
        self.play_panel.Hide()

        self.sizer = wx.BoxSizer(wx.VERTICAL)
        self.sizer.Add(self.main_panel, 1, wx.EXPAND, 1)
        self.sizer.Add(self.timer_panel, 1, wx.EXPAND, 1)
        self.sizer.Add(self.play_panel, 1, wx.EXPAND, 1)
        self.sizer.Add(self.option_panel, 1, wx.EXPAND, 1)
        self.sizer.Add(self.highscores_panel, 1, wx.EXPAND, 1)
        self.sizer.AddMany(
            ([panel, 1, wx.EXPAND, 1] for panel in self.round_panels))

        self.SetSizer(self.sizer)
Exemplo n.º 4
0
 def __init__(self,parent,id,title):
   p = wx.Frame.__init__(self,parent,id,title,size=(LARGEUR,HAUTEUR))
   self.SetBackgroundColour(COULEUR_FOND)
   self.parent = parent
   self.Initialiser()
   self.Proprietes()
   self.MyMenu()
   
   w = wx.Panel(self)
   MainPanel(self,p)
Exemplo n.º 5
0
    def __init__(self, parent=None):
        super(MainFrame, self).__init__(parent)
        self.m_Panels = {}

        self.m_Panels["MainPanel"] = MainPanel.MainPanel(self)
        self.m_Panels["InitPanel"] = InitPanel.InitPanel(self)
        self.m_Panels["ConfigPanel"] = ConfigPanel.ConfigPanel(self)
        self.m_Panels["SvnToGitPanel"] = SvnToGitPanel.SvnToGitPanel(self)

        self.HideAll()
        self.m_Panels["MainPanel"].Show()
        self.Fit()
Exemplo n.º 6
0
    def __init__(self):
        wx.Frame.__init__(self,
                          None,
                          title="GraphCalc",
                          size=(1108, 631),
                          style=(wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION
                                 | wx.CLOSE_BOX | wx.CLIP_CHILDREN))

        self.MainPanel = MainPanel(self)
        self.Centre()

        if SPLASH:
            # -------------------SPLASH-SCREEN-------------------------------------------
            convertedToBitmap = wx.Image(name="splash.png").ConvertToBitmap()
            splashStyle = wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT
            splashDuration = 4000  # milliseconds
            terryTheBear = wx.SplashScreen(convertedToBitmap, splashStyle,
                                           splashDuration, None)
            # We have to also tell python to wait or else it will load MainPanel before
            # splash has finished displaying
            time.sleep(splashDuration / 1000)
            # --------------------END-----------------------------------------------------
        # self.Show() must be after splash screen
        self.Show()

        # --------STATUS-BAR-------------------------
        self.CreateStatusBar()
        self.SetStatusText("")

        # -------------MENU--------------------------------------------------------
        menubar = wx.MenuBar()
        fileMenu = wx.Menu()
        file_settings = fileMenu.Append(wx.ID_ANY, 'Settings',
                                        'Settings, have it your way!')
        file_quit = fileMenu.Append(wx.ID_EXIT, 'Quit', 'Quit application')
        menubar.Append(fileMenu, '&File')

        helpMenu = wx.Menu()
        hitem = helpMenu.Append(wx.ID_HELP, 'About', 'About this program')
        menubar.Append(helpMenu, '&Help')

        self.SetMenuBar(menubar)

        self.Bind(wx.EVT_MENU, self.onQuit, file_quit)
        self.Bind(wx.EVT_MENU, self.onSettings, file_settings)
        self.Bind(wx.EVT_MENU, self.onAbout, hitem)
        icon(self)
Exemplo n.º 7
0
    def getUiComponent(self):
        """Burp uses this method to obtain the component that should be used as
        the contents of the custom tab when it is displayed.
        Returns a awt.Component.
        """
        # GUI happens here
        # setting up the table
        # initial data in the table
        tableData = [
            [3, "Issue3", "Severity3", "Host3", "Path3"],
            [1, "Issue1", "Severity1", "Host1", "Path1"],
            [2, "Issue2", "Severity2", "Host2", "Path2"],
        ]
        tableHeadings = ["#", "Issue Type/Name", "Severity", "Host", "Path"]
        from IssueTable import IssueTable
        table = IssueTable(tableData, tableHeadings)
        import MainPanel
        MainPanel.burpPanel = MainPanel.MainPanel(table)

        table.addRow([4, "Issue4", "Severity4", "Host4", "Path4"])

        return MainPanel.burpPanel.panel
Exemplo n.º 8
0
    def getUiComponent(self):
        """Burp uses this method to obtain the component that should be used as
        the contents of the custom tab when it is displayed.
        Returns a awt.Component.
        """
        # GUI happens here
        # setting up the table
        # initial data in the table
        tableData = [
            # [3, "Issue3", "Severity3", "Host3", "Path3"],
            [
                1, "Issue1", "Severity1", "Host1", "Path1", "Description1",
                "Remediation1", "Request1", "Response1"
            ],
            # [2, "Issue2", "Severity2", "Host2", "Path2"],
        ]
        # tableHeadings = ["#", "Issue Type/Name", "Severity", "Host", "Path"]
        from IssueTable import IssueTable
        from Issue import Issue
        issues = list()
        for it in tableData:
            tmpIssue = Issue(index=it[0],
                             name=it[1],
                             severity=it[2],
                             host=it[3],
                             path=it[4],
                             description=it[5],
                             remediation=it[6],
                             request=it[7],
                             response=it[8])
            issues.append(tmpIssue)

        table = IssueTable(issues)
        import MainPanel
        MainPanel.burpPanel = MainPanel.MainPanel(self.callbacks, table)

        # do we need to call self.callbacks.customizeUiComponent here?
        return MainPanel.burpPanel.panel
Exemplo n.º 9
0
    def _createWindows(self):
        """
        Create the main window that this frame contains
        """
        self._panes = {}

        # tell AUI to manage this frame
        self._aui = wx.aui.AuiManager()
        self._aui.SetManagedWindow(self)

        # construct the left top panel
        self._aui.AddPane(
            ViewSelectPanel.ViewSelectPanel(parent=self),
            wx.aui.AuiPaneInfo().Name("viewselectpanel").Caption(
                "View Selector").MinSize(wx.Size(200, 250)).BestSize(
                    wx.Size(150, 200)).Left().MaximizeButton(True))

        # construct the left bottom panel
        self._aui.AddPane(
            StatisticsPanel.StatisticsPanel(parent=self),
            wx.aui.AuiPaneInfo().Name("statisticspanel").Caption(
                "Statistics Panel").MinSize(wx.Size(200, 250)).BestSize(
                    wx.Size(150, 200)).Left().MaximizeButton(True))

        # construct the bottom panel
        self._aui.AddPane(
            ProgressLogPanel.ProgressLogPanel(parent=self),
            wx.aui.AuiPaneInfo().Name(
                "progresslogpanel").Caption("Progress Log").MinSize(
                    wx.Size(100, 80)).Bottom().MaximizeButton(True))

        # construct the middle part
        self._aui.AddPane(
            MainPanel.MainPanel(parent=self),
            wx.aui.AuiPaneInfo().Name("mainpanel").Caption("Main Window").
            CenterPane().CloseButton(False).MaximizeButton(True))
        self._aui.Update()
Exemplo n.º 10
0
# coding=utf-8
import MainPanel
import wx
app = wx.App(False)
frame = wx.Frame(None, title='B12306', size=(700, 500))
panel = MainPanel.MPanel(frame)
frame.Show()
app.MainLoop()
Exemplo n.º 11
0
from MainPanel import *

streamfile = askopenfile(mode='r')

stream = []
for line in streamfile:
	tokens = line.split(',')
	
	if tokens[0] == '0':
		if tokens[1] != 'STREND' and tokens[1] != 'HOVER' and tokens[1] != 'STARTHOVER' and tokens[1] != 'ENDHOVER' and tokens[1] != 'VIDEOOPEN':
			stream.append(line)
	else:
		if tokens[1] == 'CLEAR':
			stream.append(line)

streamfile.close()
mainpanel = MainPanel(stream)

mainloop()