FTP Verzeichnisnamen nicht lesbar
Moderators: Hacker, Stefan2, white
FTP Verzeichnisnamen nicht lesbar
Hallo,
ich möchte mit einem FTP-Server arbeiten, der mir Verzeichnisnamen mit HTML-Tags zurückliefert.
Beispiel: ">bin</a> bin" wird im Rohformat geliefert, das Verzeichnis heißt aber nur "bin".
GET ftp://*********/>bin</a>%20bin/ HTTP/1.0
geht natürlich schief.
Firefox kommt damit klar. Wie kann ich mir eine FTP-Beschreibungsdatei einrichten, die damit klarkommt?
ich möchte mit einem FTP-Server arbeiten, der mir Verzeichnisnamen mit HTML-Tags zurückliefert.
Beispiel: ">bin</a> bin" wird im Rohformat geliefert, das Verzeichnis heißt aber nur "bin".
GET ftp://*********/>bin</a>%20bin/ HTTP/1.0
geht natürlich schief.
Firefox kommt damit klar. Wie kann ich mir eine FTP-Beschreibungsdatei einrichten, die damit klarkommt?
Gruß
Thomas
Thomas
- ghisler(Author)
- Site Admin
- Posts: 50561
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Eventuell geht es über einen HTTP-Proxy: "HTTP proxy with FTP support". In diesem Fall analysiert TC die HTML-Datei. Dort einfach den Proxy Ihres Providers eintragen.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Danke für den Hinweis, "HTTP proxy with FTP support" ist aber eingetragen. Das funktioniert auch gut mit anderen FTP-Servern. Bei einem kommen aber o.g. HTML-Fragmente mit. In der TEMP-Datei steht folgendes:
Wahrscheinlich ist der HTML-Code innerhalb der <pre>-Tags das Problem. Da es nur beim Betrieb via Proxy auftritt, ist der wahrscheinlich für den HTML-Code verantwortlich. Dort werde ich mal nachhaken.
Code: Select all
<html> <head><title>FTP directory listing</title></head> <body>
<h2>FTP Server www.a-mf.de</h2>
<h2>Current Directory is /</h2>
<pre>total 4
drwxr-xr-x 2 0 0 72 Sep 20 11:54 <a href="/bin">bin</a>
drwxr-xr-x 2 3275 999 128 Sep 20 11:54 <a href="/cgi-bin">cgi-bin</a>
drwxr-xr-x 5 3275 999 248 Sep 25 15:40 <a href="/htdocs">htdocs</a>
drwxr-xr-x 2 0 0 112 Sep 20 11:54 <a href="/logs">logs</a>
</pre>
Generated by IWSS
</body></html>
Gruß
Thomas
Thomas
- ghisler(Author)
- Site Admin
- Posts: 50561
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Bei FTP über HTTP werden solche <a href=" -Konstrukte eigentlich erkannt und korrekt decodiert. Möglicherweise ist der HTML-Code aber fehlerhaft. Bitte mal die Seite im Internet Explorer ansurfen und die Seite speichern - TC filtert die Seiten vor, bevor er sie nach TEMP speichert.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Im IE kommt folgendes unter save as:
und in der Source View:
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>FTP directory listing</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2800.1515" name=GENERATOR></HEAD>
<BODY>
<H2>FTP Server www.a-mf.de</H2>
<H2>Current Directory is /</H2>
<HR>
<PRE>total 4
drwxr-xr-x 2 0 0 72 Sep 20 11:54 <A href="ftp://**:**@www.a-mf.de/bin">bin</A>
drwxr-xr-x 2 3275 999 128 Sep 20 11:54 <A href="ftp://**:**@www.a-mf.de/cgi-bin">cgi-bin</A>
drwxr-xr-x 5 3275 999 248 Sep 25 15:40 <A href="ftp://**:**@www.a-mf.de/htdocs">htdocs</A>
drwxr-xr-x 2 0 0 112 Sep 20 11:54 <A href="ftp://**:**@www.a-mf.de/logs">logs</A>
</PRE>
<HR>
Generated by IWSS<BR></BODY></HTML>
Code: Select all
<html>
<head><title>FTP directory listing</title></head>
<body>
<h2>FTP Server www.a-mf.de</h2>
<h2>Current Directory is /</h2>
<hr>
<pre>total 4
drwxr-xr-x 2 0 0 72 Sep 20 11:54 <a href="/bin">bin</a>
drwxr-xr-x 2 3275 999 128 Sep 20 11:54 <a href="/cgi-bin">cgi-bin</a>
drwxr-xr-x 5 3275 999 248 Sep 25 15:40 <a href="/htdocs">htdocs</a>
drwxr-xr-x 2 0 0 112 Sep 20 11:54 <a href="/logs">logs</a>
</pre>
<hr>
Generated by IWSS<br>
</body></html>
Gruß
Thomas
Thomas
- ghisler(Author)
- Site Admin
- Posts: 50561
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Aha, das scheint das Problem zu sein - äusserst ungewoehnlich, dass da komplette URLs drin stehen statt relative Pfade. Der TC ignoriert solche Zeilen komplett, weil sie in der Regel auf Fremdserver zeigen...href="ftp://**:**@www.a-mf.de/bin"
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Ich denke, das Einfügen von User:password@ vor der Url macht der IE erst beim Speichern - über die Leitung kommt es so, wie in der Browser-Source-View.
Um sicher zu gehen, habe ich die Seite mit den entsprechenden Parametern mal mit c U R L (http://curl.haxx.se/) via Proxy abgerufen. Das Ergebnis entspricht der Source-View:
BTW: wenn der Begriff c u r l (ohne Leerzeichen) im Posting steht, funktioniert Vorschau / Absenden im Forum nicht.
Um sicher zu gehen, habe ich die Seite mit den entsprechenden Parametern mal mit c U R L (http://curl.haxx.se/) via Proxy abgerufen. Das Ergebnis entspricht der Source-View:
Code: Select all
<html>
<head><title>FTP directory listing</title></head>
<body>
<h2>FTP Server www.a-mf.de</h2>
<h2>Current Directory is /</h2>
<hr>
<pre>total 4
drwxr-xr-x 2 0 0 72 Sep 20 11:54 <a href="/bin">bin</a>
drwxr-xr-x 2 3275 999 128 Sep 20 11:54 <a href="/cgi-bin">cgi-bin</a>
drwxr-xr-x 5 3275 999 248 Sep 25 15:40 <a href="/htdocs">htdocs</a>
drwxr-xr-x 2 0 0 112 Sep 20 11:54 <a href="/logs">logs</a>
</pre>
<hr>
Generated by IWSS<br>
</body></html>
BTW: wenn der Begriff c u r l (ohne Leerzeichen) im Posting steht, funktioniert Vorschau / Absenden im Forum nicht.
Gruß
Thomas
Thomas
- ghisler(Author)
- Site Admin
- Posts: 50561
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Ich werde das mal mit einem Debugger genauer untersuchen. Versuchen Sie mal, ob die neue Proxy-Methode "HTTP CONNECT" funktioniert - falls Ihr Proxy das unterstützt, dann haben Sie zusätzlich alle FTP-Funktionen wie Löschen, Verzeichnisse anlegen etc. zur Verfügung.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Leider mag das der (MS-)Proxy nicht:
Hinweis: interne IPs bzw. Namen sind mit xxx oder ** überschrieben.
Code: Select all
Connect to: (11.10.2005 5:15:30 PM)
hostname=www.a-mf.de
username=**
startdir=
Firewall=w3proxy:8080
Firewall user name=***\***
w3proxy=xxx.xxx.xxx.xxx
CONNECT www.a-mf.de:21 HTTP/1.1
Proxy-Authorization: Basic ***********
HTTP/1.1 502 Proxy Error ( The specified Secure Sockets Layer (SSL) port is not allowed. ISA Server is not configured to allow SSL requests from this port. Most Web browsers use port 443 for SSL requests. )
Via:1.1 ******
Connection: close
Proxy-Connection: close
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
Content-Length: 2423
Verzeichnis einlesen
Gruß
Thomas
Thomas
- ghisler(Author)
- Site Admin
- Posts: 50561
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Schade, dann heisst es leider Geduld haben, bis ich eine Lösung für den Proxy gefunden habe...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com