SUPER..danke für eure hilfe!
so ist es...!!!!Jetzt wird die Sache Interessant! Das ganze ein wenig Aufzubohren:
-Einschränken auf IP-Bereich
-Auf ThreadingTCPServer umstellen
hmikux
so ist es...!!!!Jetzt wird die Sache Interessant! Das ganze ein wenig Aufzubohren:
-Einschränken auf IP-Bereich
-Auf ThreadingTCPServer umstellen
Was wäre das sonst für eine Sicherheit in der FTP User einfach ihre Server starten?jens hat geschrieben:EDIT: Gesagt, getan: Schade, ich hab's mir schon gedacht, es geht nicht:File "/usr/lib/python2.2/SocketServer.py", line 329, in __init__
self.server_bind()
File "/usr/lib/python2.2/BaseHTTPServer.py", line 94, in server_bind
SocketServer.TCPServer.server_bind(self)
File "/usr/lib/python2.2/SocketServer.py", line 340, in server_bind
self.socket.bind(self.server_address)
socket.error: (13, 'Permission denied')
Also auf dem Server wo ich als normaler User Zugriff habe geht es mit Port 8080, also versuch es doch mal mit einem Port über 1024.jens hat geschrieben:Nein, also ich hab ein Paket bei Hosteurope... Natürlich bieten die erst bei den richtig teuren Versionen echte HTTPs Unterstützung an. Ich dachte mir ganz naiv, das man evtl. mit Python sich halt das selber baut
Das ganze wäre ganz hilfreich, wenn es darum geht einen Login mit Passwort zu verschlüßeln...
Code: Alles auswählen
Exception happened during processing of request from ('127.0.0.1', 1410)
Traceback (most recent call last):
File "D:\Python\Python24\lib\SocketServer.py", line 463, in process_request_thread
self.finish_request(request, client_address)
File "D:\Python\HTTPsServer\tlslite\integration\TLSSocketServerMixIn.py", line 53, in finish_request
self.RequestHandlerClass(tlsConnection, client_address, self)
File "D:\Python\Python24\lib\SocketServer.py", line 521, in __init__
self.handle()
File "D:\Python\Python24\lib\BaseHTTPServer.py", line 314, in handle
self.handle_one_request()
File "D:\Python\Python24\lib\BaseHTTPServer.py", line 308, in handle_one_request
method()
File "D:\Python\Python24\lib\SimpleHTTPServer.py", line 40, in do_GET
f = self.send_head()
File "D:\Python\Python24\lib\CGIHTTPServer.py", line 66, in send_head
return self.run_cgi()
File "D:\Python\Python24\lib\CGIHTTPServer.py", line 265, in run_cgi
while select.select([self.rfile._sock], [], [], 0)[0]:
TypeError: argument must be an int, or have a fileno() method.
I see that CGIHTTPServer will have problems. For one thing, it passes file descriptors when it forks a child process, but the SSL connection isn't an OS file descriptor, it's a python object that just behaves like a file. For the same reason, select() will have problems (like you're seeing).
The CGIHTTPRequestHandler class has some variables which control which code-path it takes: (have_fork, have_popen2, have_popen3). If you set these to False, it will launch the script in-process. That's not a very good solution, but it might work a little bit.
To make it *really* work, you'd have to provide a different CGHttpServer implementation so when the child processes read/write through stdin/stdout, it goes through tlslite. If you wanted to write that, I'd love to integrate it. It seems a little intimidating to me, though.
Trevor