memsearch.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:vivisect-py3 作者: bat-serjo 项目源码 文件源码
def encodingChanged(self, idx):
        encoding = str(self.mode_combo.currentText())

        validator = None
        if encoding == 'hex':
            # only clear the box if there are non-hex chars
            # before setting the validator.
            txt = str(self.data_edit.text())
            if not all(c in string.hexdigits for c in txt):
                self.data_edit.setText('')

            regex = QtCore.QRegExp('^[0-9A-Fa-f]+$')
            validator = QtWidgets.QRegExpValidator(regex)

        self.data_edit.setValidator(validator)

        txt = str(self.data_edit.text())
        txt_encoded = self.encodeData(txt, encoding)
        self.updateHexPreview(txt_encoded)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号