def cmd_EXEC(self, rest):
        """
        Run C{rest} using the user's shell (or /bin/sh if they do not have
        one).
        """
        shell = self._pwd.getpwnam(getpass.getuser())[6]
        if not shell:
            shell = '/bin/sh'
        if rest:
            cmds = ['-c', rest]
            return utils.getProcessOutput(shell, cmds, errortoo=1)
        else:
            os.system(shell)

        Run C{rest} using the user's shell (or /bin/sh if they do not have
        one).
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/scripts/cftp.py