Example #1
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]
Example #2
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])
Example #3
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])
Example #4
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])