3
0
Stefan Schmidt преди 6 години
родител
ревизия
2e4c37a138
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  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.SMBLib as SMBLib
 import ID2TLib.Utility as Util
+import pytz as pytz
+import datetime as dt
 
 logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
 
@@ -332,7 +334,7 @@ class SMBScanAttack(BaseAttack.BaseAttack):
                     self.packets.append(confirm_smb_req)
 
                     # 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 =\
                         SMBLib.get_smb_platform_data(self.host_os, first_timestamp)