Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, crash):
"""
@type crash: Crash
@param crash: L{Crash} object to store into the database.
"""
# Timestamp and signature.
self.timestamp = datetime.datetime.fromtimestamp( crash.timeStamp )
self.signature = pickle.dumps(crash.signature, protocol = 0)
# Marshalled Crash object, minus the memory dump.
# This code is *not* thread safe!
memoryMap = crash.memoryMap
try:
crash.memoryMap = None
self.data = buffer( Marshaller.dumps(crash) )
finally:
crash.memoryMap = memoryMap
# Exploitability test.
self.exploitability_rating, \
self.exploitability_rule, \
self.exploitability_desc = crash.isExploitable()
# Exploitability test as an integer result (for sorting).
self.exploitable = [
"Not an exception",
"Not exploitable",
"Not likely exploitable",
"Unknown",
"Probably exploitable",
"Exploitable",
def __init__(self, crash):
"""
@type crash: Crash
@param crash: L{Crash} object to store into the database.
"""
# Timestamp and signature.
self.timestamp = datetime.datetime.fromtimestamp( crash.timeStamp )
self.signature = pickle.dumps(crash.signature, protocol = 0)
# Marshalled Crash object, minus the memory dump.
# This code is *not* thread safe!
memoryMap = crash.memoryMap
try:
crash.memoryMap = None
self.data = buffer( Marshaller.dumps(crash) )
finally:
crash.memoryMap = memoryMap
# Exploitability test.
self.exploitability_rating, \
self.exploitability_rule, \
self.exploitability_desc = crash.isExploitable()
# Exploitability test as an integer result (for sorting).
self.exploitable = [
"Not an exception",
"Not exploitable",
"Not likely exploitable",
"Unknown",
"Probably exploitable",
"Exploitable",