Esempio n. 1
0
    def OnClick_button_export(self):
        path = GUIUtility.AskSaveFile("保存隐蔽信道文件", "CSV file(*.csv)")
        info = list(self.serverPtr.clientMap.values())[self.index].MessagesPool

        def exportData(fileName: str, Infos: list) -> bool:
            import csv
            try:
                with open(fileName, 'w', newline='') as f:
                    f_csv = csv.writer(f)
                    f_csv.writerow(["IPDs", "Content"])
                    for i in range(0, len(Infos)):
                        if (isinstance(Infos[i], list)):
                            row = []
                            for j in range(0, len(Infos[i])):
                                row.append(Infos[i][j])
                            f_csv.writerow(row)
                        else:
                            f_csv.writerow([Infos[i]])
            except Exception as e:
                Debug.printError(str(e))
                return False
            return True

        if exportData(path, info):
            Debug.printInfo("导出成功!")
        else:
            Debug.printInfo("导出失败!")
Esempio n. 2
0
    def OnStart(self):
        GUI.set.Size(self, "label", 200, 200)
        GUI.set.WindowProperty(self, "minimumWidth", 750)
        GUI.set.WindowProperty(self, "minimumHeight", 300)
        GUI.set.WindowProperty(self, "maximumWidth", 750)
        GUI.set.WindowProperty(self, "maximumHeight", 300)
        GUI.set.WindowProperty(self, "windowTitle", "关于 隐蔽信道检测平台")
        GUI.set.WindowProperty(
            self, "styleSheet",
            'QLabel#Label_Top,#Label_Mid{font-family: "楷体";font-size:20px}\
                                                  QLabel#Label_Bottom,#Label_Bottom1{font-family: "Arial";font-size:16px}'
        )

        font = GUIUtility.AskFont("选择字体")
        GUI.set.LabelAlignment(self, "Label_Top", AlignmentFlag.AlignCenter)
        GUI.set.LabelAlignment(self, "Label_Mid", AlignmentFlag.AlignCenter)
        GUI.set.LabelAlignment(self, "Label_Bottom", AlignmentFlag.AlignCenter)
        GUI.set.LabelAlignment(self, "Label_Bottom1",
                               AlignmentFlag.AlignCenter)

        #Debug.printInfo(str(font))
        GUI.set.Font(self, "Label_Bottom", font)
        GUI.set.Font(self, "Label_Bottom1", font)
        GUI.set.LabelHyperLinkMode(self, "Label_Bottom3", True)
Esempio n. 3
0
 def action_find1():
     GUIUtility.MessageBox("what do you want to find","aaaa")
Esempio n. 4
0
 def action_quit1():
     GUIUtility.MessageBox("Quit","aaaa")
Esempio n. 5
0
 def action_otherSaveFile():
     path = GUIUtility.AskOpenFile("action_otherSaveFile")
     GUIUtility.MessageBox("show path",path)
Esempio n. 6
0
 def OnEdit_Finished(self):
     GUIUtility.MessageBox(
         "editing finished",
         "text = {}".format(GUI.GetLineEditText("testEdit")))
Esempio n. 7
0
 def OnClick_Button_Test3(self):
     GUI.set.SetLineEditText(self, "testEdit",
                             GUIUtility.AskOpenFile("open file?"))
Esempio n. 8
0
 def OnClick_Button(self):
     GUIUtility.MessageBox('1','2')
Esempio n. 9
0
 def OnClose(self):
     GUIUtility.MessageBox('2','3')
Esempio n. 10
0
	def OnClick_OpenIPDsFile(self):
		GUI.set.SetLineEditText(self,"edit_ipds_file",GUIUtility.AskOpenFile("打开隐蔽信道IPDs文件","CSV File(*.csv)"))
Esempio n. 11
0
 def OnClick_Button(self):
     qfont = (GUIUtility.AskFont("ask"))
     Debug.printInfo("famliyName=" + qfont.getFamilyName().stdstr())