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 (!preg_match('/^USER (\w+)\r\n$/', $buf, $m)) {
143 fputs($s, "500 Syntax error, command unrecognized.\r\n");
148 fputs($s, "530 Not logged in.\r\n");
154 fputs($s, "230 Anonymous user logged in\r\n");
157 fputs($s, "331 User name ok, need password\r\n");
159 if (!preg_match('/^PASS (\w+)\r\n$/', $buf = fread($s, 100), $m)) {
160 fputs($s, "500 Syntax error, command unrecognized.\r\n");
166 fputs($s, "230 User logged in\r\n");
168 fputs($s, "530 Not logged in.\r\n");
182 fputs($s, "502 Command not implemented (".$num_bogus_cmds++.").\r\n");
184 } else if ($buf === "HELP\r\n") {
185 fputs($s, "214-There is help available for the following commands:\r\n");
186 fputs($s, " USER\r\n");
187 fputs($s, " HELP\r\n");
188 fputs($s, "214 end of list\r\n");
190 } elseif ($buf === "HELP HELP\r\n") {
191 fputs($s, "214 Syntax: HELP [<SP> <string>] <CRLF>\r\n");
193 } elseif ($buf === "PWD\r\n") {
194 fputs($s, "257 \"$cwd\" is current directory.\r\n");
196 } elseif ($buf === "CDUP\r\n") {
198 fputs($s, "250 CDUP command successful.\r\n");
200 } elseif ($buf === "SYST\r\n") {
202 fputs($s, "215 OS/400 is the remote operating system. The TCP/IP version is \"V5R2M0\"\r\n");
204 fputs($s, "215 UNIX Type: L8.\r\n");
207 } elseif ($buf === "TYPE A\r\n") {
209 fputs($s, "200 OK\r\n");
211 } elseif ($buf === "TYPE I\r\n") {
213 fputs($s, "200 OK\r\n");
215 } elseif ($buf === "QUIT\r\n") {
218 } elseif (preg_match("~^PORT (\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\r\n$~", $buf, $m)) {
221 fputs($s, "200 OK.\r\n");
223 } elseif (preg_match("~^STOR ([\w/.-]+)\r\n$~", $buf, $m)) {
224 fputs($s, "150 File status okay; about to open data connection\r\n");
229 fputs($s, "425 Can't open data connection\r\n");
238 fputs($s, "226 Closing data Connection.\r\n");
240 …) || isset($bug39583)) && $data === strtr($orig, array("\r\n" => "\n", "\r" => "\n", "\n" => "\r\n…
241 fputs($s, "226 Closing data Connection.\r\n");
246 fputs($s, "552 Requested file action aborted.\r\n");
253 fputs($s, "226 Closing data Connection.\r\n");
258 fputs($s, "552 Requested file action aborted.\r\n");
262 } elseif (preg_match("~^CWD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
264 fputs($s, "250 CWD command successful.\r\n");
266 } elseif (preg_match("~^NLST(?: ([A-Za-z./]+))?\r\n$~", $buf, $m)) {
269 fputs($s, "250 $m[1]: No such file or directory\r\n");
275 fputs($s, "226 Transfer complete.\r\n");
279 fputs($s, "150 File status okay; about to open data connection\r\n");
282 fputs($s, "425 Can't open data connection\r\n");
287 fputs($fs, "file1\r\nfile1\r\nfile\nb0rk\r\n");
290 fputs($s, "226 Closing data Connection.\r\n");
293 } elseif (preg_match("~^MKD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
295 fputs($s, "257 OK.\r\n");
297 fputs($s, "257 \"/path/to/ftproot$cwd$m[1]\" created.\r\n");
306 fputs($s, "213 19980615100045.014\r\n");
309 fputs($s, "213 19980615100045.014\r\n");
312 fputs($s, "213 19980705132316\r\n");
315 fputs($s, "213 19991005213102\r\n");
318 fputs($s, "550 No file named \"{$matches [1]}\"\r\n");
326 fputs($s, "425 Can't open data connection\r\n");
333 fputs($s, "150 File status okay; about to open data connection.\r\n");
336 fputs($s, "226 Closing data Connection.\r\n");
339 fputs($s, "150 File status okay; about to open data connection.\r\n");
340 fputs($fs, "For sale: baby shoes, never worn.\r\n");
341 fputs($s, "226 Closing data Connection.\r\n");
344 fputs($s, "150 File status okay; about to open data connection.\r\n");
346 fputs($fs, $transfer_type."Foo\0Bar\r\n");
347 fputs($s, "226 Closing data Connection.\r\n");
350 fputs($s, "150 File status okay; about to open data connection.\r\n");
352 fputs($fs, $transfer_type."FooBar\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");
358 fputs($fs, "Bar\r\n");
359 fputs($s, "226 Closing data Connection.\r\n");
362 fputs($s, "150 File status okay; about to open data connection.\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");
376 fputs($s, "226 Closing data Connection.\r\n");
379 fputs($s, "550 {$matches[1]}: No such file or directory \r\n");
391 fputs($s, "227 Entering Passive Mode. (127,0,0,1,{$p1},{$p2})\r\n");
395 fputs($s, "200 OK\r\n");
398 fputs($s, "250 OK\r\n");
401 fputs($s, "200 OK\r\n");
404 fputs($s, "200 " . $matches[1] . " bytes allocated\r\n");
407 fputs($s, "150 Opening ASCII mode data connection for file list\r\n");
408 fputs($s, "226 Transfer complete\r\n");
411 fputs($s, "425 Error establishing connection\r\n");
415 fputs($s, "350 OK\r\n");
417 fputs($s, "213 5368709120\r\n");
419 fputs($s, "500 Syntax error, command unrecognized.\r\n");