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 import time
from ctypes import c_char_p from ctypes import c_char_p
import filecmp
from config import WormConfiguration from config import WormConfiguration
from exploit.tools import build_monkey_commandline_explicitly from exploit.tools import build_monkey_commandline_explicitly
from model import MONKEY_CMDLINE_WINDOWS, MONKEY_CMDLINE_LINUX, GENERAL_CMDLINE_LINUX 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 # we copy/move only in case path is different
try: 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: except OSError:
file_moved = False file_moved = False