Пример #1
0
    def __init__(self, target=None):
        AcqKeyTextPattern_Base.__init__(self)
        self.initmask = 'FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
        self.initkey = '2B 7E 15 16 28 AE D2 A6 AB F7 15 88 09 CF 4F 3C'
        self._key = util.hexStrToByteArray(self.initkey)
        self._mask = util.hexStrToByteArray(self.initmask)

        self.getParams().addChildren([
            {
                'name': 'Fixed Encryption Key',
                'key': 'initkey',
                'type': 'str',
                'get': self.getInitialKey,
                'set': self.setInitialKey,
                'visible': True
            },
            {
                'name': 'Plaintext Mask',
                'key': 'initmask',
                'type': 'str',
                'get': self.getInitialMask,
                'set': self.setInitialMask,
                'visible': True
            },
        ])
        self.setTarget(target)
Пример #2
0
    def __init__(self, target=None):
        AcqKeyTextPattern_Base.__init__(self)
        self._interleavedPlaintext = []
        self._key = []

        self.getParams().addChildren([
            {'name':'Encryption Key', 'key':'key', 'type':'str', 'value':"", 'readonly':True},
            {'name':'Interleaved Plaintext', 'key':'text', 'type':'str', 'value':"", 'readonly':True},
        ])

        self.setTarget(target)
Пример #3
0
    def __init__(self, target=None):
        AcqKeyTextPattern_Base.__init__(self)
        self._interleavedPlaintext = []
        self._key = []

        self.getParams().addChildren([
            {'name':'Encryption Key', 'key':'key', 'type':'str', 'value':"", 'readonly':True},
            {'name':'Interleaved Plaintext', 'key':'text', 'type':'str', 'value':"", 'readonly':True},
        ])

        self.setTarget(target)
Пример #4
0
    def __init__(self, target=None):
        AcqKeyTextPattern_Base.__init__(self)
        self._fixedKey = True
        self._fixedPlain = False
        self.inittext = '00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F'
        self.initkey = '2B 7E 15 16 28 AE D2 A6 AB F7 15 88 09 CF 4F 3C'
        self._key = util.hexStrToByteArray(self.initkey)
        self._textin = util.hexStrToByteArray(self.inittext)
        self.types = {'Random': False, 'Fixed': True}

        self.getParams().addChildren([
            {
                'name': 'Key',
                'type': 'list',
                'values': self.types,
                'get': self.getKeyType,
                'set': self.setKeyType,
                'action':
                lambda p: self.findParam("initkey").show(p.getValue()),
                'linked': ['initkey']
            },
            # {'name':'Size', 'type':'int'},
            {
                'name': 'Fixed Encryption Key',
                'key': 'initkey',
                'type': 'str',
                'get': self.getInitialKey,
                'set': self.setInitialKey,
                'visible': self.getKeyType()
            },
            {
                'name': 'Plaintext',
                'type': 'list',
                'values': self.types,
                'get': self.getPlainType,
                'set': self.setPlainType,
                'action':
                lambda p: self.findParam("inittext").show(p.getValue()),
                'linked': ['inittext']
            },
            {
                'name': 'Fixed Plaintext',
                'key': 'inittext',
                'type': 'str',
                'get': self.getInitialText,
                'set': self.setInitialText,
                'visible': self.getPlainType()
            },
        ])
        self.setTarget(target)
Пример #5
0
    def __init__(self, target=None):
        AcqKeyTextPattern_Base.__init__(self)
        self._fixedKey = True
        self._fixedPlain = False
        self.inittext = "00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F"
        self.initkey = "2B 7E 15 16 28 AE D2 A6 AB F7 15 88 09 CF 4F 3C"
        self._key = util.hexStrToByteArray(self.initkey)
        self._textin = util.hexStrToByteArray(self.inittext)
        self.types = {"Random": False, "Fixed": True}

        self.getParams().addChildren(
            [
                {
                    "name": "Key",
                    "type": "list",
                    "values": self.types,
                    "get": self.getKeyType,
                    "set": self.setKeyType,
                    "action": lambda p: self.findParam("initkey").show(p.getValue()),
                    "linked": ["initkey"],
                },
                # {'name':'Size', 'type':'int'},
                {
                    "name": "Fixed Encryption Key",
                    "key": "initkey",
                    "type": "str",
                    "get": self.getInitialKey,
                    "set": self.setInitialKey,
                    "visible": self.getKeyType(),
                },
                {
                    "name": "Plaintext",
                    "type": "list",
                    "values": self.types,
                    "get": self.getPlainType,
                    "set": self.setPlainType,
                    "action": lambda p: self.findParam("inittext").show(p.getValue()),
                    "linked": ["inittext"],
                },
                {
                    "name": "Fixed Plaintext",
                    "key": "inittext",
                    "type": "str",
                    "get": self.getInitialText,
                    "set": self.setInitialText,
                    "visible": self.getPlainType(),
                },
            ]
        )
        self.setTarget(target)
Пример #6
0
    def __init__(self, parentParam, target=None):
        AcqKeyTextPattern_Base.__init__(self, parentParam, target)
        self._fixedKey = True
        self._fixedPlain = False
        self.initkey = '00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F'
        self.inittext = '2B 7E 15 16 28 AE D2 A6 AB F7 15 88 09 CF 4F 3C'
        self.types = {'Random': False, 'Fixed': True}

        self.params.addChildren([
            {'name':'Key', 'type':'list', 'values':self.types , 'get':self.getKeyType, 'set':self.setKeyType, 'action':lambda p:self.findParam("initkey").show(p.getValue())},
            {'name':'Fixed Encryption Key', 'key':'initkey', 'type':'str', 'get':self.getInitialKey, 'set':self.setInitialKey, 'visible':self.getKeyType()},
            {'name':'Plaintext', 'type':'list', 'values':self.types , 'get':self.getPlainType, 'set':self.setPlainType, 'action':lambda p:self.findParam("inittext").show(p.getValue())},
            {'name':'Fixed Plaintext Key', 'key':'inittext', 'type':'str', 'get':self.getInitialText, 'set':self.setInitialText, 'visible':self.getPlainType()},
        ])
        self.setTarget(target)
Пример #7
0
 def __init__(self, parentParam, target=None):
     AcqKeyTextPattern_Base.__init__(self, parentParam, target)
     self._fixedPlain = False
     self._fixedKey = True
     self.setTarget(target)