40 |
self.pw=pw |
self.pw=pw |
41 |
self.s=socket(AF_INET,SOCK_STREAM) |
self.s=socket(AF_INET,SOCK_STREAM) |
42 |
try: |
try: |
43 |
self.s.connect(host,self.port) |
self.s.connect((host,self.port)) |
44 |
self.sf=self.s.makefile("rw") |
self.sf=self.s.makefile("rw") |
45 |
line=self.readline() |
line=self.readline() |
46 |
self.writeline("USER " + user + "\n") |
self.writeline("USER " + user + "\n") |
107 |
addr=a1 + "." + a2 + "." + a3 + "." + a4 |
addr=a1 + "." + a2 + "." + a3 + "." + a4 |
108 |
port=string.atoi(p1)*256 + string.atoi(p2) |
port=string.atoi(p1)*256 + string.atoi(p2) |
109 |
self.d=socket(AF_INET,SOCK_STREAM) |
self.d=socket(AF_INET,SOCK_STREAM) |
110 |
self.d.connect(addr,port) |
self.d.connect((addr,port)) |
111 |
self.df=self.d.makefile() |
self.df=self.d.makefile() |
112 |
self.writeline("list "+folder+"\n") |
self.writeline("list "+folder+"\n") |
113 |
fdata="" |
fdata="" |
130 |
addr=a1 + "." + a2 + "." + a3 + "." + a4 |
addr=a1 + "." + a2 + "." + a3 + "." + a4 |
131 |
port=string.atoi(p1)*256 + string.atoi(p2) |
port=string.atoi(p1)*256 + string.atoi(p2) |
132 |
self.d=socket(AF_INET,SOCK_STREAM) |
self.d=socket(AF_INET,SOCK_STREAM) |
133 |
self.d.connect(addr,port) |
self.d.connect((addr,port)) |
134 |
self.df=self.d.makefile("w") |
self.df=self.d.makefile("w") |
135 |
|
|
136 |
self.writeline("STOT\n") |
self.writeline("STOT\n") |
156 |
addr=a1 + "." + a2 + "." + a3 + "." + a4 |
addr=a1 + "." + a2 + "." + a3 + "." + a4 |
157 |
port=string.atoi(p1) * 256 + string.atoi(p2) |
port=string.atoi(p1) * 256 + string.atoi(p2) |
158 |
self.d=socket(AF_INET,SOCK_STREAM) |
self.d=socket(AF_INET,SOCK_STREAM) |
159 |
self.d.connect(addr,port) |
self.d.connect((addr,port)) |
160 |
self.df=self.d.makefile("rb") |
self.df=self.d.makefile("rb") |
161 |
|
|
162 |
self.writeline("RETR " + filename + "\n") |
self.writeline("RETR " + filename + "\n") |