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("~^CWD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
272 fputs($s, "250 CWD command successful.\r\n");
274 } elseif (preg_match("~^NLST(?: ([A-Za-z./]+))?\r\n$~", $buf, $m)) {
277 fputs($s, "250 $m[1]: No such file or directory\r\n");
283 fputs($s, "226 Transfer complete.\r\n");
288 fputs($s, "150 File status okay; about to open data connection\r\n");
290 fputs($s, "425 Can't open data connection\r\n");
294 fputs($s, "125 Data connection already open; transfer starting.\r\n");
304 fputs($fs, "file1\r\nfile1\r\nfile\nb0rk\r\n");
307 fputs($s, "226 Closing data Connection.\r\n");
310 } elseif (preg_match("~^MKD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
312 fputs($s, "257 OK.\r\n");
314 fputs($s, "257 \"/path/to/ftproot$cwd$m[1]\" created.\r\n");
323 fputs($s, "213 19980615100045.014\r\n");
326 fputs($s, "213 19980615100045.014\r\n");
329 fputs($s, "213 19980705132316\r\n");
332 fputs($s, "213 19991005213102\r\n");
335 fputs($s, "550 No file named \"{$matches [1]}\"\r\n");
343 fputs($s, "425 Can't open data connection\r\n");
350 fputs($s, "150 File status okay; about to open data connection.\r\n");
353 fputs($s, "226 Closing data Connection.\r\n");
356 fputs($s, "150 File status okay; about to open data connection.\r\n");
357 fputs($fs, "For sale: baby shoes, never worn.\r\n");
358 fputs($s, "226 Closing data Connection.\r\n");
361 fputs($s, "150 File status okay; about to open data connection.\r\n");
363 fputs($fs, $transfer_type."Foo\0Bar\r\n");
364 fputs($s, "226 Closing data Connection.\r\n");
367 fputs($s, "150 File status okay; about to open data connection.\r\n");
369 fputs($fs, $transfer_type."FooBar\r\n");
370 fputs($s, "226 Closing data Connection.\r\n");
373 fputs($s, "150 File status okay; about to open data connection.\r\n");
375 fputs($fs, "Bar\r\n");
376 fputs($s, "226 Closing data Connection.\r\n");
379 fputs($s, "150 File status okay; about to open data connection.\r\n");
386 fputs($s, "226 Closing data Connection.\r\n");
389 fputs($s, "150 File status okay; about to open data connection.\r\n");
393 fputs($s, "226 Closing data Connection.\r\n");
396 fputs($s, "550 {$matches[1]}: No such file or directory \r\n");
428 fputs($s, "227 Entering Passive Mode. (127,0,0,1,{$p1},{$p2})\r\n");
433 fputs($s, "550 Extended passsive mode not supported.\r\n");
435 fputs($s, "200 OK\r\n");
438 fputs($s, "250 OK\r\n");
441 fputs($s, "200 OK\r\n");
444 fputs($s, "200 " . $matches[1] . " bytes allocated\r\n");
447 fputs($s, "150 Opening ASCII mode data connection for file list\r\n");
448 fputs($s, "226 Transfer complete\r\n");
451 fputs($s, "425 Error establishing connection\r\n");
455 fputs($s, "350 OK\r\n");
457 fputs($s, "213 5368709120\r\n");
459 fputs($s, "500 Syntax error, command unrecognized.\r\n");