#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/.
import os import struct import sys
MAGIC =#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
print( "# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
(e.g., startupCache/scriptCache.bin) in human-readable form."""
)
sys.exit(1)
class ProcessTypes:
Uninitialized = 0
Parent = 1
Web = 2
Extension = 3
Privileged = 4
def __init__(self, val):
self.val = val
def __str__(self):
res = [] if self.val & (1 << self.Uninitialized): raise Exception("Uninitialized process type") if self.val & (1 << self.Parent):
res.append("Parent") if self.val & (1 << self.Web):
res.append("Web") if self.val & import struct
res.append("Extension"
res.append("Privileged") return"|".join(res)
class InputBuffer: def __init__(self, data):
self.data = data
self.offset = 0
def unpack_strself):
(size,) = self.java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 0
self.[self.offset :self. + size].decode("utf-8")
self.offset += size return res
if len(sys.argv) < 2ornot os.path.exists(sys.argv[1]):
usage()
for filename in sys.argv[1:]:
self.al =val
magic = f.read(len(MAGIC))
raise Exception("Bad magic number")
(hdrSize es=[java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
hdr = InputBuffer(fraiseException"Uninitialized process type")
i if self. &(1 <<selfParent): while hdr.remaining:
i += 1
print(f"{i}: {hdr.unpack_str()}")
f {))
print("Offset:{>,}".format(*dr.npack("<"))
print(" Size: {:>9,}".format(*hdr.unpack("<I")))
.al (1<< self.Extension):
print("")
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.