Exemplo n.º 1
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.session_id = HaspASN1.get_intval(rb[0x80])
     self.file_id = HaspASN1.get_intval(rb[0x81])
     self.offset = HaspASN1.get_intval(rb[0x82])
     self.amount = HaspASN1.get_intval(rb[0x83])
     self.seedvals = rb[0x84]
Exemplo n.º 2
0
 def parse(self, data):
     is_linux_request = False
     rb = HaspASN1.decode(data)[self.oid]
     self.pid = HaspASN1.get_intval(rb[0x80])
     self.tid = HaspASN1.get_intval(rb[0x81])
     if (self.tid == 0x1234):
         is_linux_request = True
     self.hasp_uid = HaspASN1.get_intval(rb[0x82])
     self.vendor_id = HaspASN1.get_intval(rb[0x83])
     self.username = HaspASN1.get_strval(rb[0x84])
     self.machine_name = HaspASN1.get_strval(rb[0x85])
     self.login_type = HaspASN1.get_strval(rb[0x86])
     self.spec = HaspASN1.get_strval(rb[0x87])
     self.scope = HaspASN1.get_strval(rb[0x88])
     self.api_version_major = HaspASN1.get_intval(rb[0x89])
     self.api_version_minor = HaspASN1.get_intval(rb[0x8A])
     self.timestamp = HaspASN1.get_intval(rb[0x8B])
     self.val_8c = HaspASN1.get_intval(rb[0x8C])
     self.val_8d = HaspASN1.get_intval(rb[0x8D])
     self.val_8e = HaspASN1.get_intval(rb[0x8E])
     self.val_8f = HaspASN1.get_intval(rb[0x8F])
     if (is_linux_request == True):
         self.volume_serial = HaspASN1.get_strval(rb[0x90])
     else:
         self.volume_serial = HaspASN1.get_intval(rb[0x90])
     self.val_91 = HaspASN1.get_intval(rb[0x91])
     self.hasp_handle = HaspASN1.get_intval(rb[0x92])
     self.val_93 = HaspASN1.get_intval(rb[0x93])
Exemplo n.º 3
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.session_id = HaspASN1.get_intval(rb[0x80])
     self.is_decrypt = HaspASN1.get_intval(rb[0x81])
     self.crypt_type = HaspASN1.get_intval(rb[0x82])
     self.enc_len = HaspASN1.get_intval(rb[0x83])
     self.data = rb[0x84]
     self.seedvals = rb[0x85]
     self.val_86 = HaspASN1.get_intval(rb[0x86])
Exemplo n.º 4
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.feature_id = HaspASN1.get_intval(rb[0x80])
     self.vendor_id = HaspASN1.get_intval(rb[0x81])
     self.scope = HaspASN1.get_strval(rb[0x82])
     self.format = HaspASN1.get_strval(rb[0x83])
     self.val_84 = rb[0x84]
     self.api_version_major = struct.unpack(">I", self.val_84[0:4])[0]
     self.api_version_minor = struct.unpack(">I", self.val_84[4:8])[0]
     self.api_build_number = struct.unpack(">I", self.val_84[8:12])[0]
Exemplo n.º 5
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.status = HaspASN1.get_intval(rb[0x80])
     self.session_id = HaspASN1.get_intval(rb[0x81])
     self.hasp_serial = HaspASN1.get_intval(rb[0x82])
     self.val_83 = HaspASN1.get_intval(rb[0x83])
     self.val_84 = HaspASN1.get_intval(rb[0x84])
     self.val_85 = HaspASN1.get_intval(rb[0x85])
     self.val_87 = HaspASN1.get_intval(rb[0x87])
     self.sc_id = HaspASN1.get_intval(rb[0x88])
     self.val_89 = HaspASN1.get_intval(rb[0x89])
     self.val_8a = rb[0x8A]
     self.val_8b = HaspASN1.get_intval(rb[0x8B])
Exemplo n.º 6
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.pid = HaspASN1.get_intval(rb[0x80])
     self.tid = HaspASN1.get_intval(rb[0x81])
     self.hasp_uid = HaspASN1.get_intval(rb[0x82])
     self.vendor_id = HaspASN1.get_intval(rb[0x83])
     self.feature_id = HaspASN1.get_intval(rb[0x84])
     self.username = HaspASN1.get_strval(rb[0x85])
     self.machine_name = HaspASN1.get_strval(rb[0x86])
     self.login_type = HaspASN1.get_strval(rb[0x87])
     self.api_version_major = HaspASN1.get_intval(rb[0x88])
     self.api_version_minor = HaspASN1.get_intval(rb[0x89])
     self.timestamp = HaspASN1.get_intval(rb[0x8A])
     self.val_8b = HaspASN1.get_intval(rb[0x8B])
     self.val_8c = HaspASN1.get_intval(rb[0x8C])
     self.val_8d = HaspASN1.get_intval(rb[0x8D])
     self.val_8e = HaspASN1.get_intval(rb[0x8E])
     self.volume_serial = HaspASN1.get_intval(rb[0x8F])
     self.val_90 = HaspASN1.get_intval(rb[0x90])
     self.hasp_handle = HaspASN1.get_intval(rb[0x91])
Exemplo n.º 7
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.status = HaspASN1.get_intval(rb[0x80])
     self.data = rb[0x81]
     self.val_82 = HaspASN1.get_intval(rb[0x82])
Exemplo n.º 8
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.status = HaspASN1.get_intval(rb[0x80])
     self.info = HaspASN1.get_strval(rb[0x81])
Exemplo n.º 9
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.session_id = HaspASN1.get_intval(rb[0x80])
     self.val_81 = HaspASN1.get_intval(rb[0x81])
Exemplo n.º 10
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.status = HaspASN1.get_intval(rb[0x80])
     self.client_id = HaspASN1.get_intval(rb[0x81])
Exemplo n.º 11
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.status = HaspASN1.get_intval(rb[0x80])
     self.sc_id = struct.unpack(">I", rb[0x81])[0]
Exemplo n.º 12
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.status = HaspASN1.get_intval(rb[0x80])
     self.rtc_timestamp = HaspASN1.get_intval(rb[0x81])
Exemplo n.º 13
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.val_80 = HaspASN1.get_intval(rb[0x80])
     self.api_version_major = HaspASN1.get_intval(rb[0x81])
     self.api_version_minor = HaspASN1.get_intval(rb[0x82])
     self.timestamp = HaspASN1.get_intval(rb[0x84])
Exemplo n.º 14
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.status = HaspASN1.get_intval(rb[0x80])
     self.file_size = HaspASN1.get_intval(rb[0x81])
Exemplo n.º 15
0
 def parse(self, data):
     rb = HaspASN1.decode(data)[self.oid]
     self.status = HaspASN1.get_intval(rb[0x80])
     self.num_written = HaspASN1.get_intval(rb[0x81])
     self.seedvals = rb[0x82]