def __init__(self, filepath, fileobj=None, parent_path='', parent_sha512=None): AbstractFile.__init__(self, filepath, fileobj, parent_path, parent_sha512)
def __init__(self, filepath, fileobj=None, parent_path='', parent_sha512=None): AbstractFile.__init__(self, filepath, fileobj, parent_path, parent_sha512) assert self.type in handled_signers self.signature = decode_signer(self.filepath)
def __init__(self, filepath, fileobj=None, parent_path='', parent_sha512=None): arg = fileobj if fileobj else filepath if not is_archive(arg): # Oops, this was not really an archive raise ValueError AbstractFile.__init__(self, filepath, fileobj, parent_path, parent_sha512) self.archive = make_archive_obj(filepath, fileobj, True)
def __init__(self, filepath, fileobj=None, parent_path='', parent_sha512=None): if not fileobj: path = join(parent_path, filepath) fileobj = open(path, 'rb') fileobj.seek(0) # Skip java compiler version. self.magic = read_magic(fileobj) self.version = read_version(fileobj) AbstractFile.__init__(self, filepath, fileobj, parent_path, parent_sha512)
def info(self): """Returns the information related to this file, this includes those provided by pyrus.file.AbstractFile.info() and info extracted from the binary class file.""" fileinfo = AbstractFile.info(self) fileinfo['magic'] = self.magic fileinfo['version-string'] = major_version(self.version[0]) fileinfo['version'] = self.version return fileinfo
def info(self): fileinfo = AbstractFile.info(self) fileinfo['signature'] = self.signature return fileinfo
def info(self): """Returns the information related to this file, this includes those provided by pyrus.file.AbstractFile.info() and the manifest headers.""" fileinfo = AbstractFile.info(self) fileinfo['manifest-info'] = self.manifestinfo return fileinfo
def __init__(self, filepath, fileobj=None, parent_path='', parent_sha512=None): AbstractFile.__init__(self, filepath, fileobj, parent_path, parent_sha512) self.manifestinfo = {} self.parse()