Stefan Schmidt 6 years ago
parent
commit
2e4c37a138
1 changed files with 3 additions and 1 deletions
  1. 3 1
      code/Attack/SMBScanAttack.py

+ 3 - 1
code/Attack/SMBScanAttack.py

@@ -9,6 +9,8 @@ import Attack.BaseAttack as BaseAttack
 import ID2TLib.SMB2 as SMB2
 import ID2TLib.SMB2 as SMB2
 import ID2TLib.SMBLib as SMBLib
 import ID2TLib.SMBLib as SMBLib
 import ID2TLib.Utility as Util
 import ID2TLib.Utility as Util
+import pytz as pytz
+import datetime as dt
 
 
 logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
 logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
 
 
@@ -332,7 +334,7 @@ class SMBScanAttack(BaseAttack.BaseAttack):
                     self.packets.append(confirm_smb_req)
                     self.packets.append(confirm_smb_req)
 
 
                     # smb response package
                     # smb response package
-                    first_timestamp = time.mktime(time.strptime(first_timestamp_smb, "%Y-%m-%d %H:%M:%S"))
+                    first_timestamp = pytz.timezone('UTC').localize(dt.datetime.strptime(first_timestamp_smb, "%Y-%m-%d %H:%M:%S")).timestamp()
                     server_guid, security_blob, capabilities, data_size, server_start_time =\
                     server_guid, security_blob, capabilities, data_size, server_start_time =\
                         SMBLib.get_smb_platform_data(self.host_os, first_timestamp)
                         SMBLib.get_smb_platform_data(self.host_os, first_timestamp)