Changed to a better file comparison function

This commit is contained in:
Vakaris 2018-07-18 20:48:15 +03:00
parent dfecc6d6ac
commit d78e81db06
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import sys
import time
from ctypes import c_char_p
import filecmp
from config import WormConfiguration
from exploit.tools import build_monkey_commandline_explicitly
from model import MONKEY_CMDLINE_WINDOWS, MONKEY_CMDLINE_LINUX, GENERAL_CMDLINE_LINUX
@ -57,7 +58,7 @@ class MonkeyDrops(object):
# we copy/move only in case path is different
try:
file_moved = os.stat(self._config['source_path']) == os.stat(self._config['destination_path'])
file_moved = filecmp.cmp(self._config['source_path'], self._config['destination_path'])
except OSError:
file_moved = False