aboutsummaryrefslogtreecommitdiff
path: root/tests/python_dependencies/impacket/smb.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/python_dependencies/impacket/smb.py')
-rw-r--r--tests/python_dependencies/impacket/smb.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/python_dependencies/impacket/smb.py b/tests/python_dependencies/impacket/smb.py
index c4ea6fc68..fa3a3d4fe 100644
--- a/tests/python_dependencies/impacket/smb.py
+++ b/tests/python_dependencies/impacket/smb.py
@@ -57,10 +57,14 @@ import hashlib
unicode_support = 0
unicode_convert = 1
-try:
- from cStringIO import StringIO
-except ImportError:
- from StringIO import StringIO
+import sys
+if sys.version_info.major >= 3:
+ from io import StringIO
+else:
+ try:
+ from cStringIO import StringIO
+ except ImportError:
+ from StringIO import StringIO
# Dialect for SMB1
SMB_DIALECT = 'NT LM 0.12'