def do_atexec(self, command): if not command: raise missingOption('Command has not been specified') atexec = self.smb_shell.getAtExec(command) if atexec is not None: atexec.play()
def do_rename(self, srcfile, destfile=None): if not destfile: argvalues = shlex.split(srcfile) if len(argvalues) != 2: raise missingOption('You have to specify source and destination file names') else: srcfile, destfile = argvalues self.smb_shell.rename(srcfile, destfile)
def do_upload(self, pathname, destfile=None): if not destfile: argvalues = shlex.split(pathname) if len(argvalues) < 1: raise missingOption('You have to specify at least the local file name') elif len(argvalues) > 1: destfile = argvalues[1] pathname = argvalues[0] self.smb_shell.upload(pathname, destfile)
def do_atexec(self, command): if not command: raise missingOption('Command has not been specified') self.smb_shell.atexec(command)
def do_download(self, filename): if not filename: raise missingOption('File name has not been specified') self.smb_shell.download(filename)