summarylogtreecommitdiffstats
path: root/unlocker.patch
diff options
context:
space:
mode:
authorJean-Marc Lenoir2019-12-21 18:54:35 +0100
committerJean-Marc Lenoir2019-12-21 19:00:53 +0100
commit1adb99d37b092d344b05501c6d8956a1700092e5 (patch)
treeb23dbc59bde60495d53418adcabe66866d2bb3f6 /unlocker.patch
parent2873101150fa8215d2cdf4b22c7b1142ec5fcc07 (diff)
downloadaur-1adb99d37b092d344b05501c6d8956a1700092e5.tar.gz
Update vmware-networks-configuration.service and fix URL for macOS unlocker files
Diffstat (limited to 'unlocker.patch')
-rw-r--r--unlocker.patch62
1 files changed, 0 insertions, 62 deletions
diff --git a/unlocker.patch b/unlocker.patch
deleted file mode 100644
index 7c32fa83f288..000000000000
--- a/unlocker.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-diff --git a/unlocker.py b/unlocker.py
-index decbc51..0f9d3f6 100755
---- a/unlocker.py
-+++ b/unlocker.py
-@@ -44,6 +44,7 @@
- from __future__ import print_function
- import codecs
- import os
-+import re
- import struct
- import sys
-
-@@ -55,7 +56,11 @@
- if sys.platform == 'win32' \
- or sys.platform == 'cli':
- # noinspection PyUnresolvedReferences
-- from _winreg import *
-+ if sys.version_info > (3, 0):
-+ from winreg import *
-+ else:
-+ from _winreg import *
-+
-
-
- def bytetohex(data):
-@@ -301,9 +306,10 @@ def patchbase(name):
- f = open(name, 'r+b')
-
- # Entry to search for in GOS table
-- # Should work for 12 & 14 of Workstation...
-- darwin = b'\x10\x00\x00\x00\x10\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00' \
-- '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
-+ # Should work for Workstation 12-15...
-+ darwin = re.compile(
-+ b'\x10\x00\x00\x00[\x10|\x20]\x00\x00\x00[\x01|\x02]\x00\x00\x00\x00\x00\x00\x00'
-+ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
-
- # Read file into string variable
- base = f.read()
-@@ -311,19 +317,14 @@ def patchbase(name):
- # Loop through each entry and set top bit
- # 0xBE --> 0xBF (WKS 12)
- # 0x3E --> 0x3F (WKS 14)
-- offset = 0
-- while offset < len(base):
-- offset = base.find(darwin, offset)
-- if offset == -1:
-- break
-+ for m in darwin.finditer(base):
-+ offset = m.start()
- f.seek(offset + 32)
- flag = ord(f.read(1))
- flag = set_bit(flag, 0)
-- flag = chr(flag)
- f.seek(offset + 32)
-- f.write(flag)
-+ f.write(bytes([flag]))
- print('GOS Patched flag @: ' + hex(offset))
-- offset += 40
-
- # Tidy up
- f.flush()