Lines Matching refs:r

39 			fputs($fs, "I am passive.\r\n");
45 fputs($fs, "drwxr-x--- 3 owner group 4096 Jul 12 12:16 .\r\n");
46 fputs($fs, "drwxr-x--- 3 owner group 4096 Jul 12 12:16 ..\r\n");
47 fputs($fs, "drwxr-x--- 3 owner group 4096 Jul 12 12:16 public_ftp\r\n");
50 fputs($fs, "\r\n");
99 fputs($s, "220----- PHP FTP server 0.3 -----\r\n220 Service ready\r\n");
107 if ($buf !== "AUTH TLS\r\n") {
108 fputs($s, "500 Syntax error, command unrecognized.\r\n");
113 fputs($s, "234 auth type accepted\r\n");
115 fputs($s, "666 dummy\r\n");
116 fputs($s, "666 bogus msg\r\n");
124 if (!preg_match('/^PBSZ \d+\r\n$/', $buf = fread($s, 2048))) {
125 fputs($s, "501 bogus data\r\n");
129 fputs($s, "200 OK\r\n");
132 if ($buf !== "PROT P\r\n") {
133 fputs($s, "504 Wrong protection.\r\n");
137 fputs($s, "200 OK\r\n");
142 if ($buf == "AUTH TLS\r\n") {
143 fputs($s, "500 not supported.\r\n");
145 } else if (!preg_match('/^USER (\w+)\r\n$/', $buf, $m)) {
146 fputs($s, "500 Syntax error, command unrecognized.\r\n");
151 fputs($s, "530 Not logged in.\r\n");
157 fputs($s, "230 Anonymous user logged in\r\n");
160 fputs($s, "331 User name ok, need password\r\n");
162 if (!preg_match('/^PASS (\w+)\r\n$/', $buf = fread($s, 100), $m)) {
163 fputs($s, "500 Syntax error, command unrecognized.\r\n");
169 fputs($s, "230 User logged in\r\n");
171 fputs($s, "530 Not logged in.\r\n");
185 fputs($s, "502 Command not implemented (".$num_bogus_cmds++.").\r\n");
187 } else if ($buf === "HELP\r\n") {
188 fputs($s, "214-There is help available for the following commands:\r\n");
189 fputs($s, " USER\r\n");
190 fputs($s, " HELP\r\n");
191 fputs($s, "214 end of list\r\n");
193 } elseif ($buf === "HELP HELP\r\n") {
194 fputs($s, "214 Syntax: HELP [<SP> <string>] <CRLF>\r\n");
196 } elseif ($buf === "PWD\r\n") {
197 fputs($s, "257 \"$cwd\" is current directory.\r\n");
199 } elseif ($buf === "CDUP\r\n") {
201 fputs($s, "250 CDUP command successful.\r\n");
203 } elseif ($buf === "SYST\r\n") {
205 fputs($s, "215 OS/400 is the remote operating system. The TCP/IP version is \"V5R2M0\"\r\n");
207 fputs($s, "215 UNIX Type: L8.\r\n");
210 } elseif ($buf === "TYPE A\r\n") {
212 fputs($s, "200 OK\r\n");
214 } elseif ($buf === "AUTH SSL\r\n") {
216 fputs($s, "500 not supported\r\n");
218 } elseif ($buf === "TYPE I\r\n") {
220 fputs($s, "200 OK\r\n");
222 } elseif ($buf === "QUIT\r\n") {
225 } elseif (preg_match("~^PORT (\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\r\n$~", $buf, $m)) {
228 fputs($s, "200 OK.\r\n");
230 } elseif (preg_match("~^STOR ([\w/.-]+)\r\n$~", $buf, $m)) {
231 fputs($s, "150 File status okay; about to open data connection\r\n");
236 fputs($s, "425 Can't open data connection\r\n");
245 fputs($s, "226 Closing data Connection.\r\n");
247 …) || isset($bug39583)) && $data === strtr($orig, array("\r\n" => "\n", "\r" => "\n", "\n" => "\r\n…
248 fputs($s, "226 Closing data Connection.\r\n");
253 fputs($s, "552 Requested file action aborted.\r\n");
260 fputs($s, "226 Closing data Connection.\r\n");
265 fputs($s, "552 Requested file action aborted.\r\n");
269 } elseif (preg_match("~^CWD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
271 fputs($s, "250 CWD command successful.\r\n");
273 } elseif (preg_match("~^NLST(?: ([A-Za-z./]+))?\r\n$~", $buf, $m)) {
276 fputs($s, "250 $m[1]: No such file or directory\r\n");
282 fputs($s, "226 Transfer complete.\r\n");
287 fputs($s, "150 File status okay; about to open data connection\r\n");
289 fputs($s, "425 Can't open data connection\r\n");
293 fputs($s, "125 Data connection already open; transfer starting.\r\n");
303 fputs($fs, "file1\r\nfile1\r\nfile\nb0rk\r\n");
306 fputs($s, "226 Closing data Connection.\r\n");
309 } elseif (preg_match("~^MKD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
311 fputs($s, "257 OK.\r\n");
313 fputs($s, "257 \"/path/to/ftproot$cwd$m[1]\" created.\r\n");
322 fputs($s, "213 19980615100045.014\r\n");
325 fputs($s, "213 19980615100045.014\r\n");
328 fputs($s, "213 19980705132316\r\n");
331 fputs($s, "213 19991005213102\r\n");
334 fputs($s, "550 No file named \"{$matches [1]}\"\r\n");
342 fputs($s, "425 Can't open data connection\r\n");
349 fputs($s, "150 File status okay; about to open data connection.\r\n");
352 fputs($s, "226 Closing data Connection.\r\n");
355 fputs($s, "150 File status okay; about to open data connection.\r\n");
356 fputs($fs, "For sale: baby shoes, never worn.\r\n");
357 fputs($s, "226 Closing data Connection.\r\n");
360 fputs($s, "150 File status okay; about to open data connection.\r\n");
362 fputs($fs, $transfer_type."Foo\0Bar\r\n");
363 fputs($s, "226 Closing data Connection.\r\n");
366 fputs($s, "150 File status okay; about to open data connection.\r\n");
368 fputs($fs, $transfer_type."FooBar\r\n");
369 fputs($s, "226 Closing data Connection.\r\n");
372 fputs($s, "150 File status okay; about to open data connection.\r\n");
374 fputs($fs, "Bar\r\n");
375 fputs($s, "226 Closing data Connection.\r\n");
378 fputs($s, "150 File status okay; about to open data connection.\r\n");
385 fputs($s, "226 Closing data Connection.\r\n");
388 fputs($s, "150 File status okay; about to open data connection.\r\n");
392 fputs($s, "226 Closing data Connection.\r\n");
395 fputs($s, "550 {$matches[1]}: No such file or directory \r\n");
413 fputs($s, "227 Entering Passive Mode. (127,0,0,1,{$p1},{$p2})\r\n");
418 fputs($s, "550 Extended passsive mode not supported.\r\n");
420 fputs($s, "200 OK\r\n");
423 fputs($s, "250 OK\r\n");
426 fputs($s, "200 OK\r\n");
429 fputs($s, "200 " . $matches[1] . " bytes allocated\r\n");
432 fputs($s, "150 Opening ASCII mode data connection for file list\r\n");
433 fputs($s, "226 Transfer complete\r\n");
436 fputs($s, "425 Error establishing connection\r\n");
440 fputs($s, "350 OK\r\n");
442 fputs($s, "213 5368709120\r\n");
444 fputs($s, "500 Syntax error, command unrecognized.\r\n");