Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit a2c2c17

Browse files
author
byt3bl33d3r
committed
Added src param for --download (resolves #32)
1 parent 474ded4 commit a2c2c17

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/remotefilesystem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def __init__(self, host, smbconnection):
4949
self.__smbconnection = smbconnection
5050

5151
def download(self):
52-
out = open(settings.args.download.split('\\')[-1], 'wb')
53-
self.__smbconnection.getFile(settings.args.share, settings.args.download, out.write)
52+
out = open(settings.args.download[1], 'wb')
53+
self.__smbconnection.getFile(settings.args.share, settings.args.download[0], out.write)
5454
print_succ("{}:{} Downloaded file".format(self.__host, settings.args.port))
5555

5656
def upload(self):

crackmapexec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125

126126
bgroup = parser.add_argument_group("Filesystem Interaction", "Options for interacting with filesystems")
127127
bgroup.add_argument("--list", metavar='PATH', nargs='?', const='.', type=str, help='List contents of a directory (defaults to top level directory)')
128-
bgroup.add_argument("--download", metavar="PATH", help="Download a file from the remote systems")
128+
bgroup.add_argument("--download", nargs=2, metavar=('SRC', 'DST'), help="Download a file from the remote systems")
129129
bgroup.add_argument("--upload", nargs=2, metavar=('SRC', 'DST'), help="Upload a file to the remote systems")
130130
bgroup.add_argument("--delete", metavar="PATH", help="Delete a remote file")
131131

0 commit comments

Comments
 (0)