From fcd156cee7848078a405083b937258508d82de72 Mon Sep 17 00:00:00 2001 From: Vinit Malik <154793573+vinitmalik01@users.noreply.github.com> Date: Wed, 25 Nov 2026 11:02:37 +0530 Subject: [PATCH] Change output filename and share path in dcomexec.py --- examples/dcomexec.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/dcomexec.py b/examples/dcomexec.py index 21ac0cdc4c..c44fe60577 100755 --- a/examples/dcomexec.py +++ b/examples/dcomexec.py @@ -58,7 +58,7 @@ from impacket.smbconnection import SMBConnection, SMB_DIALECT, SMB2_DIALECT_002, SMB2_DIALECT_21 from impacket.krb5.keytab import Keytab -OUTPUT_FILENAME = '__' + str(time.time())[:5] +OUTPUT_FILENAME = 'temp-_1' + str(time.time())[:5] CODEC = sys.stdout.encoding class DCOMEXEC: @@ -206,7 +206,7 @@ class RemoteShell(cmd.Cmd): def __init__(self, share, quit, executeShellCommand, smbConnection, shell_type, silentCommand=False): cmd.Cmd.__init__(self) self._share = share - self._output = '\\' + OUTPUT_FILENAME + self._output = '\\ProgramData\\' + OUTPUT_FILENAME self.__outputBuffer = '' self._shell = 'cmd.exe' self.__shell_type = shell_type @@ -541,7 +541,7 @@ def load_smbclient_auth_file(path): "ShellBrowserWindow DCOM object.") parser.add_argument('target', action='store', help='[[domain/]username[:password]@]') - parser.add_argument('-share', action='store', default = 'ADMIN$', help='share where the output will be grabbed from ' + parser.add_argument('-share', action='store', default = 'C$', help='share where the output will be grabbed from ' '(default ADMIN$)') parser.add_argument('-nooutput', action='store_true', default = False, help='whether or not to print the output ' '(no SMB connection created)')