Exemple #1
0
 def serialize(self):
     rb = {
         self.packet_id: {
             0x80: {
                 'value': self.val_80,
                 'type': 'intval'
             },
             0x81: {
                 'value': self.hasp_id,
                 'type': 'intval',
                 'blen': 3
             },
             0x82: {
                 'value': self.scope,
                 'type': 'strval'
             },
             0x83: {
                 'value': self.format,
                 'type': 'strval'
             },
             0x84: {
                 'value': self.val_84
             }
         }
     }
     return HaspASN1.asn1_pack(rb)
Exemple #2
0
 def serialize(self):
     rb = {
         self.packet_id: {
             0x80: {
                 'value': self.instance_id
             },
             0x81: {
                 'value': self.is_decrypt,
                 'type': 'intval'
             },
             0x82: {
                 'value': self.crypt_type,
                 'type': 'intval'
             },
             0x83: {
                 'value': self.enc_len,
                 'type': 'intval'
             },
             0x84: {
                 'value': self.data
             },
             0x85: {
                 'value': self.seedvals
             },
             0x86: {
                 'value': self.val_86,
                 'type': 'intval'
             }
         }
     }
     return HaspASN1.asn1_pack(rb)
Exemple #3
0
 def serialize(self):
     rb = {
         self.packet_id: {
             0x80: {
                 'value': self.instance_id
             },
             0x81: {
                 'value': self.file_id,
                 'type': 'intval',
                 'blen': 3
             },
             0x82: {
                 'value': self.offset,
                 'type': 'intval'
             },
             0x83: {
                 'value': self.data
             },
             0x84: {
                 'value': self.seedvals
             },
             0x85: {
                 'value': self.val_85,
                 'type': 'intval'
             }
         }
     }
     return HaspASN1.asn1_pack(rb)
Exemple #4
0
 def serialize(self):
     rb = {
         self.packet_id: {
             0x80: {
                 'value': self.instance_id
             },
             0x81: {
                 'value': self.val_81,
                 'type': 'intval'
             }
         }
     }
     return HaspASN1.asn1_pack(rb)
Exemple #5
0
 def serialize(self):
     rb = {
         self.packet_id: {
             0x80: {
                 'value': self.status,
                 'type': 'intval'
             },
             0x81: {
                 'value': self.data
             },
         }
     }
     return HaspASN1.asn1_pack(rb)
Exemple #6
0
 def serialize(self):
     rb = {
         self.packet_id: {
             0x80: {
                 'value': self.instance_id
             },
             0x81: {
                 'value': self.file_id,
                 'type': 'intval',
                 'blen': 3
             }
         }
     }
     return HaspASN1.asn1_pack(rb)
Exemple #7
0
 def serialize(self):
     bcid = struct.pack(">I", self.schannel_address)
     rb = {
         self.packet_id: {
             0x80: {
                 'value': self.status,
                 'type': 'intval'
             },
             0x81: {
                 'value': bcid
             }
         }
     }
     return HaspASN1.asn1_pack(rb)
Exemple #8
0
 def serialize(self):
     rb = {
         self.packet_id: {
             0x80: {
                 'value': self.status,
                 'type': 'intval'
             },
             0x81: {
                 'value': self.timestamp,
                 'type': 'intval',
                 'blen': 5
             },
         }
     }
     return HaspASN1.asn1_pack(rb)
Exemple #9
0
 def serialize(self):
     rb = {
         self.packet_id: {
             0x80: {
                 'value': self.status,
                 'type': 'intval'
             },
             0x81: {
                 'value': self.instance_id
             },
             0x82: {
                 'value': self.hasp_serial,
                 'type': 'intval'
             },
             0x83: {
                 'value': self.val_83,
                 'type': 'intval'
             },
             0x84: {
                 'value': self.val_84,
                 'type': 'intval'
             },
             0x85: {
                 'value': self.val_85,
                 'type': 'intval'
             },
             0x87: {
                 'value': self.val_87,
                 'type': 'intval'
             },
             0x88: {
                 'value': self.schannel_id,
                 'type': 'intval'
             },
             0x89: {
                 'value': self.val_89,
                 'type': 'intval'
             },
             0x8A: {
                 'value': self.val_8a
             },
             0x8B: {
                 'value': self.val_8b,
                 'type': 'intval'
             },
         }
     }
     return HaspASN1.asn1_pack(rb)
Exemple #10
0
 def serialize(self):
     rb = {
         self.packet_id: {
             0x80: {
                 'value': self.status,
                 'type': 'intval'
             },
             0x81: {
                 'value': self.num_written,
                 'type': 'intval'
             },
             0x82: {
                 'value': self.seedvals
             },
         }
     }
     return HaspASN1.asn1_pack(rb)
Exemple #11
0
 def serialize(self):
     rb = {
         self.packet_id: {
             0x80: {
                 'value': self.val_80,
                 'type': 'intval'
             },
             0x81: {
                 'value': self.val_81,
                 'type': 'intval'
             },
             0x82: {
                 'value': self.val_82,
                 'type': 'intval'
             },
             0x84: {
                 'value': HaspUtils.GetTimestamp(),
                 'type': 'intval',
                 'blen': 5
             }
         }
     }
     return HaspASN1.asn1_pack(rb)
Exemple #12
0
 def serialize(self):
     rb = {self.packet_id: {0x80: {'value': self.instance_id}}}
     return HaspASN1.asn1_pack(rb)
Exemple #13
0
 def serialize(self):
     rb = {
         self.packet_id: {
             0x80: {
                 'value': self.pid,
                 'type': 'intval',
                 'blen': 2
             },
             0x81: {
                 'value': self.tid,
                 'type': 'intval',
                 'blen': 2
             },
             0x82: {
                 'value': self.hasp_uid,
                 'type': 'intval',
                 'blen': 2
             },
             0x83: {
                 'value': self.vendor_id,
                 'type': 'intval',
                 'blen': 3
             },
             0x84: {
                 'value': self.username,
                 'type': 'strval'
             },
             0x85: {
                 'value': self.machine_name,
                 'type': 'strval'
             },
             0x86: {
                 'value': self.login_type,
                 'type': 'strval'
             },
             0x87: {
                 'value': self.spec,
                 'type': 'strval'
             },
             0x88: {
                 'value': self.scope,
                 'type': 'strval'
             },
             0x89: {
                 'value': self.val_89,
                 'type': 'intval'
             },
             0x8A: {
                 'value': self.val_8a,
                 'type': 'intval'
             },
             0x8B: {
                 'value': HaspUtils.GetTimestamp(),
                 'type': 'intval',
                 'blen': 5
             },
             0x8C: {
                 'value': self.val_8c,
                 'type': 'intval'
             },
             0x8D: {
                 'value': self.val_8d,
                 'type': 'intval'
             },
             0x8E: {
                 'value': self.val_8e,
                 'type': 'intval'
             },
             0x8F: {
                 'value': self.val_8f,
                 'type': 'intval'
             },
             0x90: {
                 'value': self.volume_serial,
                 'type': 'intval',
                 'blen': 4
             },
             0x91: {
                 'value': self.val_91,
                 'type': 'intval'
             },
             0x92: {
                 'value': self.hasp_handle,
                 'type': 'intval',
                 'blen': 5
             },
             0x93: {
                 'value': self.val_93,
                 'type': 'intval'
             },
         }
     }
     return HaspASN1.asn1_pack(rb)
Exemple #14
0
 def serialize(self):
     rb = {
         self.packet_id: {
             0x80: {
                 'value': self.status,
                 'type': 'intval'
             },
             0x81: {
                 'value': self.instance_id
             },
             0x82: {
                 'value': self.hasp_serial,
                 'type': 'intval'
             },
             0x83: {
                 'value': self.val_83,
                 'type': 'intval'
             },
             0x84: {
                 'value': self.val_84,
                 'type': 'intval'
             },
             0x85: {
                 'value': self.val_85,
                 'type': 'intval'
             },
             0x86: {
                 'value': self.val_86,
                 'type': 'intval'
             },
             0x87: {
                 'value': self.val_87,
                 'type': 'intval'
             },
             0x88: {
                 'value': self.val_88,
                 'type': 'intval'
             },
             0x89: {
                 'value': self.val_89,
                 'type': 'intval'
             },
             0x8A: {
                 'value': self.val_8a,
                 'type': 'intval'
             },
             0x8B: {
                 'value': self.val_8b,
                 'type': 'intval'
             },
             0x8C: {
                 'value': self.schannel_address,
                 'type': 'intval'
             },
             0x8D: {
                 'value': self.val_8d,
                 'type': 'intval'
             },
             0x8E: {
                 'value': self.val_8e
             },
             0x8F: {
                 'value': self.val_8f,
                 'type': 'intval'
             }
         }
     }
     return HaspASN1.asn1_pack(rb)