示例#1
0
 def __init__(self,
              filepath,
              fileobj=None,
              parent_path='',
              parent_sha512=None):
     AbstractFile.__init__(self, filepath, fileobj, parent_path,
                           parent_sha512)
示例#2
0
 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)
示例#3
0
	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)
示例#4
0
文件: javaclass.py 项目: abn/jsnoop
	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)
示例#5
0
 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)
示例#6
0
    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
示例#7
0
文件: javaclass.py 项目: abn/jsnoop
	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
示例#8
0
 def info(self):
     fileinfo = AbstractFile.info(self)
     fileinfo['signature'] = self.signature
     return fileinfo
示例#9
0
	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
示例#10
0
	def __init__(self, filepath, fileobj=None, parent_path='',
				parent_sha512=None):
		AbstractFile.__init__(self, filepath, fileobj, parent_path,
							parent_sha512)
		self.manifestinfo = {}
		self.parse()
示例#11
0
文件: signature.py 项目: abn/jsnoop
	def info(self):
		fileinfo = AbstractFile.info(self)
		fileinfo['signature'] = self.signature
		return fileinfo
示例#12
0
文件: signature.py 项目: abn/jsnoop
	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)
示例#13
0
文件: simplefile.py 项目: abn/jsnoop
	def __init__(self, filepath, fileobj=None, parent_path='',
				parent_sha512=None):
		AbstractFile.__init__(self, filepath, fileobj, parent_path,
							parent_sha512)