<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[WinSocket - FTP-Login]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich habe Schwierigkeiten mich auf <a href="http://ftp.mozilla.org" rel="nofollow">ftp.mozilla.org</a> einzuloggen. Ich bekomme zwar die Verbindung zum Server, weiß jedoch nicht wie ich die USER und PASS an den FTP schicken soll.</p>
<p>Auf die Art wie ich es bis jetzt mache (siehe unten) klappt es jedenfalls nicht. Ich erhalte meistens die Willkommens-Message oder manchmal nach erneutem senden von Enter ein Login successful, woraufhin jedoch jeder weitere Befehle mit einem Session-Timeout endet.</p>
<p>Was mache ich falsch?</p>
<pre><code class="language-cpp">send (s, &quot;USER ftp\r\n&quot;, strlen(&quot;USER ftp\r\n&quot;), 0);
    rc = recv (s, buf, sizeof(buf), 0);
	printf( &quot;logging in with user name 'ftp'\nserver response is %s&quot;, buf );

	strcpy( buf, &quot;PASS test@gmx.net\r\n&quot; );
	send (s, buf, strlen(buf), 0);
	rc = recv (s, buf, sizeof(buf), 0);
	printf( &quot;entering password\nserver response is %s&quot;, buf );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/243569/winsocket-ftp-login</link><generator>RSS for Node</generator><lastBuildDate>Fri, 03 Apr 2026 20:01:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/243569.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Jun 2009 12:44:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WinSocket - FTP-Login on Thu, 18 Jun 2009 12:44:47 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich habe Schwierigkeiten mich auf <a href="http://ftp.mozilla.org" rel="nofollow">ftp.mozilla.org</a> einzuloggen. Ich bekomme zwar die Verbindung zum Server, weiß jedoch nicht wie ich die USER und PASS an den FTP schicken soll.</p>
<p>Auf die Art wie ich es bis jetzt mache (siehe unten) klappt es jedenfalls nicht. Ich erhalte meistens die Willkommens-Message oder manchmal nach erneutem senden von Enter ein Login successful, woraufhin jedoch jeder weitere Befehle mit einem Session-Timeout endet.</p>
<p>Was mache ich falsch?</p>
<pre><code class="language-cpp">send (s, &quot;USER ftp\r\n&quot;, strlen(&quot;USER ftp\r\n&quot;), 0);
    rc = recv (s, buf, sizeof(buf), 0);
	printf( &quot;logging in with user name 'ftp'\nserver response is %s&quot;, buf );

	strcpy( buf, &quot;PASS test@gmx.net\r\n&quot; );
	send (s, buf, strlen(buf), 0);
	rc = recv (s, buf, sizeof(buf), 0);
	printf( &quot;entering password\nserver response is %s&quot;, buf );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1728800</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1728800</guid><dc:creator><![CDATA[FrEEzE2046]]></dc:creator><pubDate>Thu, 18 Jun 2009 12:44:47 GMT</pubDate></item><item><title><![CDATA[Reply to WinSocket - FTP-Login on Thu, 18 Jun 2009 16:30:10 GMT]]></title><description><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/library/aa383630(VS.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa383630(VS.85).aspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1728948</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1728948</guid><dc:creator><![CDATA[rul0r]]></dc:creator><pubDate>Thu, 18 Jun 2009 16:30:10 GMT</pubDate></item><item><title><![CDATA[Reply to WinSocket - FTP-Login on Mon, 06 Jul 2009 08:15:46 GMT]]></title><description><![CDATA[<p>rul0r schrieb:</p>
<blockquote>
<p><a href="http://msdn.microsoft.com/en-us/library/aa383630(VS.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa383630(VS.85).aspx</a></p>
</blockquote>
<p>Nein, die FTP-Funktionen kenne ich. Die möchte ich aber nicht nutzen. Keiner eine Ahnung woran es liegt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1737744</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1737744</guid><dc:creator><![CDATA[FrEEzE2046]]></dc:creator><pubDate>Mon, 06 Jul 2009 08:15:46 GMT</pubDate></item><item><title><![CDATA[Reply to WinSocket - FTP-Login on Mon, 06 Jul 2009 08:28:03 GMT]]></title><description><![CDATA[<p>1. Prüfe den Return Wert von recv(..).<br />
. - Es könnte ein Fehler auftreten (return value &lt; 0)<br />
. - Es könnte die Verbindung unterbrochen sein (return value == 0)<br />
. - Es können nicht alle Daten auf einmal angekommen sein (return value irgendwas zwischen der 1 und der Länge deiner Meldung.)<br />
2. sizeof(buf) geht nur bei lokal definierten char[]. Ist das so?</p>
<p>Simon</p>
<p><strong>Edit</strong></p>
<blockquote>
<p>Die möchte ich aber nicht nutzen. Keiner eine Ahnung woran es liegt?</p>
</blockquote>
<p>Woher sollen wir wissen, warum du diese Funktionen nicht nutzen möchtest? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f576.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--sunglasses"
      title=":sunglasses:"
      alt="🕶"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1737750</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1737750</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Mon, 06 Jul 2009 08:28:03 GMT</pubDate></item><item><title><![CDATA[Reply to WinSocket - FTP-Login on Mon, 06 Jul 2009 08:58:39 GMT]]></title><description><![CDATA[<p>1. sizeof() funktioniert auch in diesem Zusammenhang<br />
2. Wenn ich die Ftp-Klassen benutzen würde, dann bräuchte ich auch keinen Socket<br />
3. return-Wert ist okay. Das hab ich natürlich überprüft <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";-)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1737759</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1737759</guid><dc:creator><![CDATA[FrEEzE2046]]></dc:creator><pubDate>Mon, 06 Jul 2009 08:58:39 GMT</pubDate></item><item><title><![CDATA[Reply to WinSocket - FTP-Login on Mon, 06 Jul 2009 09:16:12 GMT]]></title><description><![CDATA[<blockquote>
<p>2. Wenn ich die Ftp-Klassen benutzen würde, dann bräuchte ich auch keinen Socket</p>
</blockquote>
<p>Aha. Ja, natürlich. Das ist eine Folge, kleine Ursache für deine Entscheidung.</p>
<blockquote>
<p>3. return-Wert ist okay. Das hab ich natürlich überprüft <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";-)"
      alt="😉"
    /></p>
</blockquote>
<p>So natürlich ist das nicht, denn im Code ist es nicht ersichtlich. Bei deiner printf Ausgabe gehst Du von einem null- terminierten char Array aus, was Du aber nicht kannst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1737776</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1737776</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Mon, 06 Jul 2009 09:16:12 GMT</pubDate></item></channel></rss>