'This method should be implemented according to the remote operating
system. The idea here is to send the exe_file to the remote server and
save it in a file.
:param exe_file: The local path to the executable file
:return: The name of the remote file that was uploaded.'

def _send_exe_to_server(self, exe_file):

    om.out.debug('Called    _send_exe_to_server()')
    om.out.console('Wait    while    w3af    uploads    the    payload    to    the    remote    server...')
    ptf = payload_transfer_factory(self._exec_method)
    wait_time_for_extrusion_scan = ptf.estimate_transfer_time()
    transferHandler = ptf.get_transfer_handler()
    if (not transferHandler.can_transfer()):
        raise BaseFrameworkException("Can't    transfer    the    file    to    remote    host,    can_transfer()    returned    False.")
    else:
        om.out.debug('The    transferHandler    can    upload    files    to    the    remote    end.')
        estimatedTime = transferHandler.estimate_transfer_time(len(exe_file))
        om.out.debug((('The    payload    transfer    will    take    "' + str(estimatedTime)) + '"    seconds.'))
        self._remote_filename = get_remote_temp_file(self._exec_method)
        om.out.debug((('Starting    payload    upload,    remote    filename    is:    "' + self._remote_filename) + '".'))
        if transferHandler.transfer(file(exe_file).read(), self._remote_filename):
            om.out.console(('Finished    payload    upload    to    "%s"' % self._remote_filename))
            return self._remote_filename
        else:
            raise BaseFrameworkException('The    payload    upload    failed,    remote    md5sum    is    different.')
