From 4be2560e01ed40e256b5143c8b4f5de2450ffefd Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Sun, 15 Mar 2020 10:01:38 +0100 Subject: tests: remove python_dependencies for smbserver from our tree Users of the SMB tests will have to install impacket manually. Reasoning: our in-tree version of impacket was quite outdated and only compatible with Python 2 which is already end-of-life. Upgrading to Python 3 and a compatible impacket version would require to import additional Python-only and CPython-extension dependencies. This would have hindered portability enormously. Closes #5094 --- tests/python_dependencies/impacket/uuid.py | 73 ------------------------------ 1 file changed, 73 deletions(-) delete mode 100644 tests/python_dependencies/impacket/uuid.py (limited to 'tests/python_dependencies/impacket/uuid.py') diff --git a/tests/python_dependencies/impacket/uuid.py b/tests/python_dependencies/impacket/uuid.py deleted file mode 100644 index 750eba459..000000000 --- a/tests/python_dependencies/impacket/uuid.py +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (c) 2003-2016 CORE Security Technologies -# -# This software is provided under under a slightly modified version -# of the Apache Software License. See the accompanying LICENSE file -# for more information. -# -# Description: -# Generate UUID compliant with http://www.webdav.org/specs/draft-leach-uuids-guids-01.txt. -# A different, much simpler (not necessarily better) algorithm is used. -# -# Author: -# Javier Kohen (jkohen) -# - -import re - -from random import randrange -from struct import pack, unpack - -try: - long # Python 2 -except NameError: - long = int # Python 3 - -def generate(): - # UHm... crappy Python has an maximum integer of 2**31-1. - top = (1<<31)-1 - return pack("IIII", randrange(top), randrange(top), randrange(top), randrange(top)) - -def bin_to_string(uuid): - uuid1, uuid2, uuid3 = unpack('HHL', uuid[8:16]) - return '%08X-%04X-%04X-%04X-%04X%08X' % (uuid1, uuid2, uuid3, uuid4, uuid5, uuid6) - -def string_to_bin(uuid): - matches = re.match('([\dA-Fa-f]{8})-([\dA-Fa-f]{4})-([\dA-Fa-f]{4})-([\dA-Fa-f]{4})-([\dA-Fa-f]{4})([\dA-Fa-f]{8})', uuid) - (uuid1, uuid2, uuid3, uuid4, uuid5, uuid6) = map(lambda x: long(x, 16), matches.groups()) - uuid = pack('HHL', uuid4, uuid5, uuid6) - return uuid - -def stringver_to_bin(s): - (maj,min) = s.split('.') - return pack('