forked from p15670423/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")
|
||||
|
||||
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():
|
||||
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
|
||||
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):
|
||||
if is_32bit:
|
||||
|
|
|
@ -30,7 +30,7 @@ int samba_init_module(void)
|
|||
#endif
|
||||
const char RUNNER_RESULT_FILENAME[] = "monkey_runner_result";
|
||||
const char COMMANDLINE_FILENAME[] = "monkey_commandline.txt";
|
||||
const int ACCESS_MODE_STRING = 0777;
|
||||
const int ACCESS_MODE = 0777;
|
||||
const char RUN_MONKEY_CMD[] = "sudo ./";
|
||||
|
||||
int found = 0;
|
||||
|
@ -38,7 +38,6 @@ int samba_init_module(void)
|
|||
char commandline[LINE_MAX_LENGTH] = {'\0'};
|
||||
char* monkeyDirectory = NULL;
|
||||
char* fileNamePointer = NULL;
|
||||
int accessMode = 0;
|
||||
FILE * pFile = NULL;
|
||||
pid_t pid = 0;
|
||||
int monkeySize = 0;
|
||||
|
@ -145,7 +144,7 @@ int samba_init_module(void)
|
|||
free(monkeyBinary);
|
||||
|
||||
// Change monkey permissions
|
||||
if (0 != chmod(MONKEY_COPY_NAME, ACCESS_MODE_STRING))
|
||||
if (0 != chmod(MONKEY_COPY_NAME, ACCESS_MODE))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue