예제 #1
0
    def __init__(self, parent=None):
        super(VBMainWidget, self).__init__(parent)
        self.ui = Ui_frmVirusBattle()
        self.ui.setupUi(self)
        self.APIKey = None
        self.initCaches()
        self.initSignals()

        VBIDAHelper.addMenuItem('View/', '[VB] Matched Procs', 'Alt-Shift-V',
                                self.menuItemMatchedProcsTriggered,
                                self.matchedProcsCache)

        self.currentDir = os.path.abspath(
            os.path.join(os.path.realpath(__file__), os.pardir, os.pardir))

        self.downloadFolder = self.currentDir + os.sep + 'download'
        self.openedFilePath = VBIDAHelper.getFilePath()
        self.openedFileHash = ''
        try:
            self.openedFileHash = VBIDAHelper.SHA1File(self.openedFilePath)
        except:
            pass

        if self.openedFileHash != '':
            self.ui.lblOpenFileHash.setText('Current file hash: %s' %
                                            self.openedFileHash)
            self.ui.editOtherSHA.setText(self.openedFileHash)
        else:
            self.openedFilePath = ''
            self.ui.lblOpenFileHash.setText('Current file could be not found.')

        self.loadListProfiles()
        self.otherInfosAvailability = {
            'avscans': False,
            'behaviors': False,
            'pedata': False
        }