fakeftp: nur IPv4
This commit is contained in:
parent
1d47a69361
commit
7bad267652
1 changed files with 5 additions and 3 deletions
|
@ -4,6 +4,8 @@ import socket
|
|||
from random import randint
|
||||
import datetime
|
||||
|
||||
SocketServer.ThreadingTCPServer.address_family = socket.AF_INET
|
||||
|
||||
class Utils:
|
||||
@staticmethod
|
||||
def mask(rights):
|
||||
|
@ -605,7 +607,7 @@ class State:
|
|||
except Exception:
|
||||
handler.send( FatalServerErrorMessage() )
|
||||
handler.running = False
|
||||
|
||||
|
||||
|
||||
class BaseState(State):
|
||||
handlers = [ QuitCommandHandler(), NoOperationCommandHandler() ]
|
||||
|
@ -784,10 +786,10 @@ handler.rootDirectory = Directory("",files=[
|
|||
File("initrd.img",size=4000000)
|
||||
])
|
||||
|
||||
port = 1234
|
||||
port = 21
|
||||
while True:
|
||||
try:
|
||||
server = SocketServer.ThreadingTCPServer(("",port),handler)
|
||||
server = SocketServer.ThreadingTCPServer(("0.0.0.0",port),handler)
|
||||
print "Listening on port %d" % port
|
||||
server.serve_forever()
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue