mirror of https://github.com/n1nj4sec/pupy.git
Handle crashes
This commit is contained in:
parent
ffaa9615e5
commit
11fe90f7f9
|
@ -12,6 +12,11 @@ platform.system = lambda: 'android'
|
|||
if __name__ == '__main__':
|
||||
import pp
|
||||
while True:
|
||||
print "starting pupy ..."
|
||||
pp.main()
|
||||
print "pupy exit"
|
||||
try:
|
||||
print "starting pupy ..."
|
||||
pp.main()
|
||||
print "pupy exit"
|
||||
except Exception, e:
|
||||
print "pupy crashed: ", e
|
||||
import traceback
|
||||
traceback.print_exc(e)
|
||||
|
|
|
@ -610,5 +610,3 @@ def install(debug=None, trace=False):
|
|||
|
||||
if sys.platform == 'win32':
|
||||
import pywintypes
|
||||
if __debug:
|
||||
for module in modules.iterkeys():
|
||||
|
|
|
@ -442,11 +442,6 @@ class PupyClient(object):
|
|||
pupyimporter = self.conn.modules.pupyimporter
|
||||
initial_module_name = module_name
|
||||
|
||||
if not self.desc.get('native', False):
|
||||
# If this is not light-weight "client", then try to load native libs frist
|
||||
if pupyimporter.native_import(module_name):
|
||||
return True
|
||||
|
||||
if not remote and not module_name.endswith(('.dll', '.so')):
|
||||
if pupyimporter.has_module(module_name):
|
||||
if not force:
|
||||
|
@ -455,6 +450,11 @@ class PupyClient(object):
|
|||
update = True
|
||||
pupyimporter.invalidate_module(module_name)
|
||||
|
||||
if not self.desc.get('native', False):
|
||||
# If this is not light-weight "client", then try to load native libs frist
|
||||
if pupyimporter.native_import(module_name):
|
||||
return True
|
||||
|
||||
start_path=module_name.replace(".", "/")
|
||||
package_found=False
|
||||
package_path=None
|
||||
|
|
Loading…
Reference in New Issue