Lines Matching refs:r
60 fputs($s, "220----- PHP FTP server 0.3 -----\r\n220 Service ready\r\n");
67 if ($buf !== "AUTH TLS\r\n") {
68 fputs($s, "500 Syntax error, command unrecognized.\r\n");
73 fputs($s, "234 auth type accepted\r\n");
75 fputs($s, "666 dummy\r\n");
77 fputs($s, "666 bogus msg\r\n");
85 if (!preg_match('/^PBSZ \d+\r\n$/', $buf = fread($s, 2048))) {
86 fputs($s, "501 bogus data\r\n");
90 fputs($s, "200 OK\r\n");
93 if ($buf !== "PROT P\r\n") {
94 fputs($s, "504 Wrong protection.\r\n");
98 fputs($s, "200 OK\r\n");
103 if ($buf == "AUTH TLS\r\n") {
104 fputs($s, "500 not supported.\r\n");
106 } else if (!preg_match('/^USER (\w+)\r\n$/', $buf, $m)) {
107 fputs($s, "500 Syntax error, command unrecognized.\r\n");
112 fputs($s, "530 Not logged in.\r\n");
117 fputs($s, "230 Anonymous user logged in\r\n");
120 fputs($s, "331 User name ok, need password\r\n");
122 if (!preg_match('/^PASS (\w+)\r\n$/', $buf = fread($s, 100), $m)) {
123 fputs($s, "500 Syntax error, command unrecognized.\r\n");
129 fputs($s, "230 User logged in\r\n");
131 fputs($s, "530 Not logged in.\r\n");
144 fputs($s, "502 Command not implemented (".$num_bogus_cmds++.").\r\n");
146 } else if ($buf === "HELP\r\n") {
147 fputs($s, "214-There is help available for the following commands:\r\n");
148 fputs($s, " USER\r\n");
149 fputs($s, " HELP\r\n");
150 fputs($s, "214 end of list\r\n");
152 } elseif ($buf === "HELP HELP\r\n") {
153 fputs($s, "214 Syntax: HELP [<SP> <string>] <CRLF>\r\n");
155 } elseif ($buf === "PWD\r\n") {
156 fputs($s, "257 \"$cwd\" is current directory.\r\n");
158 } elseif ($buf === "CDUP\r\n") {
160 fputs($s, "250 CDUP command successful.\r\n");
162 } elseif ($buf === "SYST\r\n") {
164 … fputs($s, "215 OS/400 is the remote operating system. The TCP/IP version is \"V5R2M0\"\r\n");
168 fputs($s, "\r\n" . str_repeat("*", 4096) . "\r\n");
170 fputs($s, "215 UNIX Type: L8.\r\n");
173 } elseif ($buf === "TYPE A\r\n") {
175 fputs($s, "200 OK\r\n");
177 } elseif ($buf === "AUTH SSL\r\n") {
179 fputs($s, "500 not supported\r\n");
181 } elseif ($buf === "TYPE I\r\n") {
183 fputs($s, "200 OK\r\n");
185 } elseif ($buf === "QUIT\r\n") {
186 fputs($s, "221 Bye\r\n");
189 } elseif (preg_match("~^PORT (\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\r\n$~", $buf, $m)) {
192 fputs($s, "200 OK.\r\n");
194 } elseif (preg_match("~^STOR ([\w/.-]+)\r\n$~", $buf, $m)) {
195 fputs($s, "150 File status okay; about to open data connection\r\n");
200 fputs($s, "425 Can't open data connection\r\n");
209 fputs($s, "226 Closing data Connection.\r\n");
211 …) || isset($bug39583)) && $data === strtr($orig, array("\r\n" => "\n", "\r" => "\n", "\n" => "\r\n…
212 fputs($s, "226 Closing data Connection.\r\n");
217 fputs($s, "552 Requested file action aborted.\r\n");
224 fputs($s, "226 Closing data Connection.\r\n");
229 fputs($s, "552 Requested file action aborted.\r\n");
233 } elseif (preg_match("~^APPE ([\w/.-]+)\r\n$~", $buf, $m)) {
234 fputs($s, "150 File status okay; about to open data connection\r\n");
239 fputs($s, "425 Can't open data connection\r\n");
245 fputs($s, "226 Closing data Connection.\r\n");
250 fputs($s, "226 Closing data Connection.\r\n");
254 }elseif (preg_match("~^CWD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
256 fputs($s, "550 Directory change to $m[1] failed: file does not exist\r\n");
260 fputs($s, "250 CWD command successful.\r\n");
263 } elseif (preg_match("~^NLST(?: ([A-Za-z./]+))?\r\n$~", $buf, $m)) {
266 fputs($s, "250 $m[1]: No such file or directory\r\n");
272 fputs($s, "226 Transfer complete.\r\n");
277 fputs($s, "150 File status okay; about to open data connection\r\n");
279 fputs($s, "425 Can't open data connection\r\n");
283 fputs($s, "125 Data connection already open; transfer starting.\r\n");
293 fputs($fs, "file1\r\nfile1\r\nfile\nb0rk\r\n");
296 fputs($s, "226 Closing data Connection.\r\n");
299 } elseif (preg_match("~^MKD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
301 fputs($s, "257 OK.\r\n");
306 fputs($s, "257 \"/path/to/ftproot$cwd$m[1]\" created.\r\n");
315 fputs($s, "213 19980615100045.014\r\n");
318 fputs($s, "213 19980615100045.014\r\n");
321 fputs($s, "213 19980705132316\r\n");
324 fputs($s, "213 19991005213102\r\n");
327 fputs($s, "550 No file named \"{$matches [1]}\"\r\n");
335 fputs($s, "425 Can't open data connection\r\n");
342 fputs($s, "150 File status okay; about to open data connection.\r\n");
345 fputs($s, "226 Closing data Connection.\r\n");
348 fputs($s, "150 File status okay; about to open data connection.\r\n");
349 fputs($fs, "For sale: baby shoes, never worn.\r\n");
350 fputs($s, "226 Closing data Connection.\r\n");
353 fputs($s, "150 File status okay; about to open data connection.\r\n");
355 fputs($fs, $transfer_type."Foo\0Bar\r\n");
356 fputs($s, "226 Closing data Connection.\r\n");
359 fputs($s, "150 File status okay; about to open data connection.\r\n");
361 fputs($fs, $transfer_type."FooBar\r\n");
362 fputs($s, "226 Closing data Connection.\r\n");
365 fputs($s, "150 File status okay; about to open data connection.\r\n");
367 fputs($fs, "Bar\r\n");
368 fputs($s, "226 Closing data Connection.\r\n");
371 fputs($s, "150 File status okay; about to open data connection.\r\n");
378 fputs($s, "226 Closing data Connection.\r\n");
381 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, "425 Can't open data connection (".$GLOBALS['rest_pos'].").\r\n");
396 fputs($s, "550 {$matches[1]}: No such file or directory \r\n");
427 fputs($s, "227 Entering Passive Mode. (127,0,0,1,{$p1},{$p2})\r\n");
434 fputs($s, "550 Extended passive mode not supported.\r\n");
436 fputs($s, "200 OK\r\n");
439 fputs($s, "250 OK\r\n");
442 fputs($s, "200 OK\r\n");
446 fputs($s, "250 Delete successful\r\n");
448 fputs($s, "550 No such file or directory\r\n");
451 fputs($s, "200 " . $matches[1] . " bytes allocated\r\n");
455 fputs($s, "150 File status okay; about to open data connection\r\n");
457 fputs($s, "425 Can't open data connection\r\n");
461 fputs($s, "125 Data connection already open; transfer starting.\r\n");
470 fputs($fs, "file1\r\nfile1\r\nfile\nb0rk\r\n");
471 fputs($s, "226 Closing data Connection.\r\n");
474 fputs($s, "226 Transfer complete\r\n");
476 fputs($s, "425 Error establishing connection\r\n");
480 fputs($s, "350 OK\r\n");
482 fputs($s, "213 5368709120\r\n");
484 fputs($s, "350 File or directory exists, ready for destination name\r\n");
486 fputs($s, "550 No such file or directory\r\n");
488 fputs($s, "250 Rename successful\r\n");
490 fputs($s, "425 Error establishing connection\r\n");
491 }elseif (preg_match("~^MLSD(?: ([A-Za-z./]+))?\r\n$~", $buf, $m)) {
494 fputs($s, "250 $m[1]: No such file or directory\r\n");
500 fputs($s, "226 Transfer complete.\r\n");
505 fputs($s, "150 File status okay; about to open data connection\r\n");
507 fputs($s, "425 Can't open data connection\r\n");
511 fputs($s, "125 Data connection already open; transfer starting.\r\n");
520 …0002;perm=flcdmpe;type=cdir;unique=811U4340002;UNIX.group=33;UNIX.mode=0755;UNIX.owner=33; .\r\n");
521 …002;perm=flcdmpe;type=pdir;unique=811U4340002;UNIX.group=33;UNIX.mode=0755;UNIX.owner=33; ..\r\n");
522 …rw;size=4729;type=file;unique=811U4340CB9;UNIX.group=33;UNIX.mode=0644;UNIX.owner=33; foobar\r\n");
523 fputs($fs, "fact=val=ue;empty=; path;name\r\n");
524 fputs($fs, "no_space\r\n");
525 fputs($fs, "no_semi pathname\r\n");
526 fputs($fs, "no_eq; pathname\r\n");
529 fputs($s, "226 Closing data Connection.\r\n");
532 fputs($s, "213 10\r\n");
534 fputs($s, "500 Syntax error, command unrecognized.\r\n");