Lines Matching refs:buf

56 	function dump_and_exit($buf)
58 var_dump($buf);
94 $buf = fread($s, 2048);
97 function user_auth($buf) {
101 if ($buf !== "AUTH TLS\r\n") {
103 dump_and_exit($buf);
118 if (!preg_match('/^PBSZ \d+\r\n$/', $buf = fread($s, 2048))) {
120 dump_and_exit($buf);
124 $buf = fread($s, 2048);
126 if ($buf !== "PROT P\r\n") {
128 dump_and_exit($buf);
133 $buf = fread($s, 2048);
136 if ($buf == "AUTH TLS\r\n") {
139 } else if (!preg_match('/^USER (\w+)\r\n$/', $buf, $m)) {
141 dump_and_exit($buf);
156 if (!preg_match('/^PASS (\w+)\r\n$/', $buf = fread($s, 100), $m)) {
158 dump_and_exit($buf);
172 user_auth($buf);
177 while($buf = fread($s, 4098)) {
181 } else if ($buf === "HELP\r\n") {
187 } elseif ($buf === "HELP HELP\r\n") {
190 } elseif ($buf === "PWD\r\n") {
193 } elseif ($buf === "CDUP\r\n") {
197 } elseif ($buf === "SYST\r\n") {
204 } elseif ($buf === "TYPE A\r\n") {
208 } elseif ($buf === "AUTH SSL\r\n") {
212 } elseif ($buf === "TYPE I\r\n") {
216 } elseif ($buf === "QUIT\r\n") {
219 } elseif (preg_match("~^PORT (\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\r\n$~", $buf, $m)) {
224 } elseif (preg_match("~^STOR ([\w/.-]+)\r\n$~", $buf, $m)) {
263 } elseif (preg_match("~^APPE ([\w/.-]+)\r\n$~", $buf, $m)) {
284 }elseif (preg_match("~^CWD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
287 var_dump($buf);
293 } elseif (preg_match("~^NLST(?: ([A-Za-z./]+))?\r\n$~", $buf, $m)) {
329 } elseif (preg_match("~^MKD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
334 var_dump($buf);
339 } elseif (preg_match('/^USER /', $buf)) {
340 user_auth($buf);
342 } elseif (preg_match('/^MDTM ([\w\h]+)/', $buf, $matches)) {
360 }elseif (preg_match('/^RETR ([\/]*[\w\h]+)/', $buf, $matches)) {
429 }elseif (preg_match('/^PASV/', $buf, $matches)) {
464 } elseif (preg_match('/^EPSV/', $buf, $matches)) {
466 } elseif (preg_match('/^SITE EXEC/', $buf, $matches)) {
469 } elseif (preg_match('/^RMD/', $buf, $matches)) {
472 } elseif (preg_match('/^SITE CHMOD/', $buf, $matches)) {
475 } elseif (preg_match('/^DELE/', $buf, $matches)) {
478 } elseif (preg_match('/^ALLO (\d+)/', $buf, $matches)) {
481 }elseif (preg_match('/^LIST www\//', $buf, $matches)) {
484 }elseif (preg_match('/^LIST no_exists\//', $buf, $matches)) {
487 }elseif (preg_match('/^REST (\d+)/', $buf, $matches)) {
490 }elseif (preg_match('/^SIZE largefile/', $buf)) {
492 }elseif (preg_match('/^RNFR existing_file/', $buf, $matches)) {
494 }elseif (preg_match('/^RNFR nonexisting_file/', $buf, $matches)) {
496 }elseif (preg_match('/^RNTO nonexisting_file/', $buf, $matches)) {
498 }elseif (preg_match('/^MLSD no_exists\//', $buf, $matches)) {
500 }elseif (preg_match("~^MLSD(?: ([A-Za-z./]+))?\r\n$~", $buf, $m)) {
540 }elseif (preg_match('/^SIZE \/bug73457/', $buf)) {
542 }elseif (preg_match("/^SITE/", $buf)) {
545 dump_and_exit($buf);