Example #1
0
 def appid(self):
     algorithm = Crc(
         width=32, poly=0x04C11DB7, reflect_in=True, xor_in=0xFFFFFFFF, reflect_out=True, xor_out=0xFFFFFFFF
     )
     crc_input = "".join([self.exe, self.name])
     top_32 = algorithm.bit_by_bit(crc_input) | 0x80000000
     full_64 = (top_32 << 32) | 0x02000000
     return str(full_64)
Example #2
0
def shortcut_app_id(shortcut):
  """
  Generates the app id for a given shortcut. Steam uses app ids as a unique
  identifier for games, but since shortcuts dont have a canonical serverside
  representation they need to be generated on the fly. The important part
  about this function is that it will generate the same app id as Steam does
  for a given shortcut
  """
  algorithm = Crc(width = 32, poly = 0x04C11DB7, reflect_in = True, xor_in = 0xffffffff, reflect_out = True, xor_out = 0xffffffff)
  crc_input = ''.join([shortcut.exe,shortcut.name])
  high_32 = algorithm.bit_by_bit(crc_input) | 0x80000000
  full_64 = (high_32 << 32) | 0x02000000
  return str(full_64)
Example #3
0
def shortcut_app_id(shortcut):
    """
  Generates the app id for a given shortcut. Steam uses app ids as a unique
  identifier for games, but since shortcuts dont have a canonical serverside
  representation they need to be generated on the fly. The important part
  about this function is that it will generate the same app id as Steam does
  for a given shortcut
  """
    algorithm = Crc(width=32,
                    poly=0x04C11DB7,
                    reflect_in=True,
                    xor_in=0xffffffff,
                    reflect_out=True,
                    xor_out=0xffffffff)
    crc_input = ''.join([shortcut.exe, shortcut.name])
    high_32 = algorithm.bit_by_bit(crc_input) | 0x80000000
    full_64 = (high_32 << 32) | 0x02000000
    return str(full_64)