예제 #1
0
    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()
예제 #2
0
    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)
예제 #3
0
    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)
예제 #4
0
    def do_atexec(self, command):
        if not command:
            raise missingOption('Command has not been specified')

        self.smb_shell.atexec(command)
예제 #5
0
    def do_download(self, filename):
        if not filename:
            raise missingOption('File name has not been specified')

        self.smb_shell.download(filename)