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

Commit

Permalink
Added src param for --download (resolves #32)
Browse files Browse the repository at this point in the history
  • Loading branch information
byt3bl33d3r committed Nov 21, 2015
1 parent 474ded4 commit a2c2c17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/remotefilesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def __init__(self, host, smbconnection):
self.__smbconnection = smbconnection

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

def upload(self):
Expand Down
2 changes: 1 addition & 1 deletion crackmapexec.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@

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

Expand Down

0 comments on commit a2c2c17

Please sign in to comment.