fakeftp: nur IPv4

This commit is contained in:
madmaurice 2015-05-08 03:16:16 +02:00
parent 1d47a69361
commit 7bad267652

View file

@ -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):
@ -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