Lines Matching refs:r

40 			fputs($fs, "I am passive.\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 ..\r\n");
48 fputs($fs, "drwxr-x--- 3 owner group 4096 Jul 12 12:16 public_ftp\r\n");
51 fputs($fs, "\r\n");
100 fputs($s, "220----- PHP FTP server 0.3 -----\r\n220 Service ready\r\n");
108 if ($buf !== "AUTH TLS\r\n") {
109 fputs($s, "500 Syntax error, command unrecognized.\r\n");
114 fputs($s, "234 auth type accepted\r\n");
116 fputs($s, "666 dummy\r\n");
117 fputs($s, "666 bogus msg\r\n");
125 if (!preg_match('/^PBSZ \d+\r\n$/', $buf = fread($s, 2048))) {
126 fputs($s, "501 bogus data\r\n");
130 fputs($s, "200 OK\r\n");
133 if ($buf !== "PROT P\r\n") {
134 fputs($s, "504 Wrong protection.\r\n");
138 fputs($s, "200 OK\r\n");
143 if ($buf == "AUTH TLS\r\n") {
144 fputs($s, "500 not supported.\r\n");
146 } else if (!preg_match('/^USER (\w+)\r\n$/', $buf, $m)) {
147 fputs($s, "500 Syntax error, command unrecognized.\r\n");
152 fputs($s, "530 Not logged in.\r\n");
158 fputs($s, "230 Anonymous user logged in\r\n");
161 fputs($s, "331 User name ok, need password\r\n");
163 if (!preg_match('/^PASS (\w+)\r\n$/', $buf = fread($s, 100), $m)) {
164 fputs($s, "500 Syntax error, command unrecognized.\r\n");
170 fputs($s, "230 User logged in\r\n");
172 fputs($s, "530 Not logged in.\r\n");
186 fputs($s, "502 Command not implemented (".$num_bogus_cmds++.").\r\n");
188 } else if ($buf === "HELP\r\n") {
189 fputs($s, "214-There is help available for the following commands:\r\n");
190 fputs($s, " USER\r\n");
191 fputs($s, " HELP\r\n");
192 fputs($s, "214 end of list\r\n");
194 } elseif ($buf === "HELP HELP\r\n") {
195 fputs($s, "214 Syntax: HELP [<SP> <string>] <CRLF>\r\n");
197 } elseif ($buf === "PWD\r\n") {
198 fputs($s, "257 \"$cwd\" is current directory.\r\n");
200 } elseif ($buf === "CDUP\r\n") {
202 fputs($s, "250 CDUP command successful.\r\n");
204 } elseif ($buf === "SYST\r\n") {
206 fputs($s, "215 OS/400 is the remote operating system. The TCP/IP version is \"V5R2M0\"\r\n");
208 fputs($s, "215 UNIX Type: L8.\r\n");
211 } elseif ($buf === "TYPE A\r\n") {
213 fputs($s, "200 OK\r\n");
215 } elseif ($buf === "AUTH SSL\r\n") {
217 fputs($s, "500 not supported\r\n");
219 } elseif ($buf === "TYPE I\r\n") {
221 fputs($s, "200 OK\r\n");
223 } elseif ($buf === "QUIT\r\n") {
226 } elseif (preg_match("~^PORT (\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\r\n$~", $buf, $m)) {
229 fputs($s, "200 OK.\r\n");
231 } elseif (preg_match("~^STOR ([\w/.-]+)\r\n$~", $buf, $m)) {
232 fputs($s, "150 File status okay; about to open data connection\r\n");
237 fputs($s, "425 Can't open data connection\r\n");
246 fputs($s, "226 Closing data Connection.\r\n");
248 …) || isset($bug39583)) && $data === strtr($orig, array("\r\n" => "\n", "\r" => "\n", "\n" => "\r\n…
249 fputs($s, "226 Closing data Connection.\r\n");
254 fputs($s, "552 Requested file action aborted.\r\n");
261 fputs($s, "226 Closing data Connection.\r\n");
266 fputs($s, "552 Requested file action aborted.\r\n");
270 } elseif (preg_match("~^APPE ([\w/.-]+)\r\n$~", $buf, $m)) {
271 fputs($s, "150 File status okay; about to open data connection\r\n");
276 fputs($s, "425 Can't open data connection\r\n");
282 fputs($s, "226 Closing data Connection.\r\n");
287 fputs($s, "226 Closing data Connection.\r\n");
291 }elseif (preg_match("~^CWD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
293 fputs($s, "550 Directory change to $m[1] failed: file does not exist\r\n");
297 fputs($s, "250 CWD command successful.\r\n");
300 } elseif (preg_match("~^NLST(?: ([A-Za-z./]+))?\r\n$~", $buf, $m)) {
303 fputs($s, "250 $m[1]: No such file or directory\r\n");
309 fputs($s, "226 Transfer complete.\r\n");
314 fputs($s, "150 File status okay; about to open data connection\r\n");
316 fputs($s, "425 Can't open data connection\r\n");
320 fputs($s, "125 Data connection already open; transfer starting.\r\n");
330 fputs($fs, "file1\r\nfile1\r\nfile\nb0rk\r\n");
333 fputs($s, "226 Closing data Connection.\r\n");
336 } elseif (preg_match("~^MKD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
338 fputs($s, "257 OK.\r\n");
343 fputs($s, "257 \"/path/to/ftproot$cwd$m[1]\" created.\r\n");
352 fputs($s, "213 19980615100045.014\r\n");
355 fputs($s, "213 19980615100045.014\r\n");
358 fputs($s, "213 19980705132316\r\n");
361 fputs($s, "213 19991005213102\r\n");
364 fputs($s, "550 No file named \"{$matches [1]}\"\r\n");
372 fputs($s, "425 Can't open data connection\r\n");
379 fputs($s, "150 File status okay; about to open data connection.\r\n");
382 fputs($s, "226 Closing data Connection.\r\n");
385 fputs($s, "150 File status okay; about to open data connection.\r\n");
386 fputs($fs, "For sale: baby shoes, never worn.\r\n");
387 fputs($s, "226 Closing data Connection.\r\n");
390 fputs($s, "150 File status okay; about to open data connection.\r\n");
392 fputs($fs, $transfer_type."Foo\0Bar\r\n");
393 fputs($s, "226 Closing data Connection.\r\n");
396 fputs($s, "150 File status okay; about to open data connection.\r\n");
398 fputs($fs, $transfer_type."FooBar\r\n");
399 fputs($s, "226 Closing data Connection.\r\n");
402 fputs($s, "150 File status okay; about to open data connection.\r\n");
404 fputs($fs, "Bar\r\n");
405 fputs($s, "226 Closing data Connection.\r\n");
408 fputs($s, "150 File status okay; about to open data connection.\r\n");
415 fputs($s, "226 Closing data Connection.\r\n");
418 fputs($s, "150 File status okay; about to open data connection.\r\n");
422 fputs($s, "226 Closing data Connection.\r\n");
425 fputs($s, "150 File status okay; about to open data connection.\r\n");
429 fputs($s, "550 {$matches[1]}: No such file or directory \r\n");
465 fputs($s, "227 Entering Passive Mode. (127,0,0,1,{$p1},{$p2})\r\n");
472 fputs($s, "550 Extended passsive mode not supported.\r\n");
474 fputs($s, "200 OK\r\n");
477 fputs($s, "250 OK\r\n");
480 fputs($s, "200 OK\r\n");
483 fputs($s, "200 " . $matches[1] . " bytes allocated\r\n");
486 fputs($s, "150 Opening ASCII mode data connection for file list\r\n");
487 fputs($s, "226 Transfer complete\r\n");
490 fputs($s, "425 Error establishing connection\r\n");
494 fputs($s, "350 OK\r\n");
496 fputs($s, "213 5368709120\r\n");
498 fputs($s, "425 Error establishing connection\r\n");
499 }elseif (preg_match("~^MLSD(?: ([A-Za-z./]+))?\r\n$~", $buf, $m)) {
502 fputs($s, "250 $m[1]: No such file or directory\r\n");
508 fputs($s, "226 Transfer complete.\r\n");
513 fputs($s, "150 File status okay; about to open data connection\r\n");
515 fputs($s, "425 Can't open data connection\r\n");
519 fputs($s, "125 Data connection already open; transfer starting.\r\n");
528 …0002;perm=flcdmpe;type=cdir;unique=811U4340002;UNIX.group=33;UNIX.mode=0755;UNIX.owner=33; .\r\n");
529 …002;perm=flcdmpe;type=pdir;unique=811U4340002;UNIX.group=33;UNIX.mode=0755;UNIX.owner=33; ..\r\n");
530 …rw;size=4729;type=file;unique=811U4340CB9;UNIX.group=33;UNIX.mode=0644;UNIX.owner=33; foobar\r\n");
531 fputs($fs, "fact=val=ue;empty=; path;name\r\n");
532 fputs($fs, "no_space\r\n");
533 fputs($fs, "no_semi pathname\r\n");
534 fputs($fs, "no_eq; pathname\r\n");
537 fputs($s, "226 Closing data Connection.\r\n");
540 fputs($s, "213 10\r\n");
542 fputs($s, "500 Syntax error, command unrecognized.\r\n");