Lines Matching refs:conn
526 private $conn;
532 $this->conn = stream_socket_accept($socket);
533 if ($this->conn) {
550 fwrite($this->conn, $payload);
557 $data = fread($this->conn, $bytes_len);
565 fclose($this->conn);
634 function my_mysqli_test_tabular_response_def_over_read(my_mysqli_fake_server_conn $conn): void
636 $rh = $conn->packet_generator->server_tabular_query_response();
648 $trrh = $conn->packets_to_bytes($rh);
650 $conn->send_server_greetings();
651 $conn->read();
652 $conn->send_server_ok();
653 $conn->read();
654 $conn->send($trrh, "Malicious Tabular Response [Extract heap through buffer over-read]");
655 $conn->read(65536);
658 function my_mysqli_test_upsert_response_filename_over_read(my_mysqli_fake_server_conn $conn): void
660 $rh = $conn->packet_generator->server_upsert_query_response();
665 $trrh = $conn->packets_to_bytes($rh);
667 $conn->send_server_greetings();
668 $conn->read();
669 $conn->send_server_ok();
670 $conn->read();
671 $conn->send($trrh, "Malicious Tabular Response [Extract heap through buffer over-read]");
672 $conn->read(65536);
675 function my_mysqli_test_auth_response_message_over_read(my_mysqli_fake_server_conn $conn): void
677 $p = $conn->packet_generator->server_ok();
681 $conn->send_server_greetings();
682 $conn->read();
683 … $conn->send($p->to_bytes(), "Malicious OK Auth Response [Extract heap through buffer over-read]");
684 $conn->read();
687 function my_mysqli_test_stmt_response_row_over_read_string(my_mysqli_fake_server_conn $conn): void
689 $rh = $conn->packet_generator->server_stmt_execute_items_response();
694 $conn->send_server_greetings();
695 $conn->read();
696 $conn->send_server_ok();
697 $conn->read();
698 $conn->send_server_stmt_prepare_items_response();
699 $conn->read();
700 …$conn->send($conn->packets_to_bytes($rh), "Malicious Stmt Response for items [Extract heap through…
701 $conn->read(65536);
705 my_mysqli_fake_server_conn $conn,
709 $rh = $conn->packet_generator->server_stmt_execute_data_response($field_name);
714 $conn->send_server_greetings();
715 $conn->read();
716 $conn->send_server_ok();
717 $conn->read();
718 $conn->send_server_stmt_prepare_data_response($field_name);
719 $conn->read();
720 $conn->send(
721 $conn->packets_to_bytes($rh),
724 $conn->read(65536);
727 function my_mysqli_test_stmt_response_row_over_read_int(my_mysqli_fake_server_conn $conn): void
729 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'intval');
732 function my_mysqli_test_stmt_response_row_over_read_float(my_mysqli_fake_server_conn $conn): void
734 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'fltval');
737 function my_mysqli_test_stmt_response_row_over_read_double(my_mysqli_fake_server_conn $conn): void
739 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'dblval');
742 function my_mysqli_test_stmt_response_row_over_read_date(my_mysqli_fake_server_conn $conn): void
744 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'datval');
747 function my_mysqli_test_stmt_response_row_over_read_time(my_mysqli_fake_server_conn $conn): void
749 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'timval', '0c');
752 function my_mysqli_test_stmt_response_row_over_read_datetime(my_mysqli_fake_server_conn $conn): void
754 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'dtival');
757 function my_mysqli_test_stmt_response_row_no_space(my_mysqli_fake_server_conn $conn): void
759 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'strval', '09');
762 function my_mysqli_test_stmt_response_row_over_read_bit(my_mysqli_fake_server_conn $conn): void
764 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'bitval');
767 function my_mysqli_test_stmt_response_row_read_two_fields(my_mysqli_fake_server_conn $conn): void
769 $conn->send_server_greetings();
770 $conn->read();
771 $conn->send_server_ok();
772 $conn->read();
775 $conn->send_server_stmt_prepare_data_response($field_name);
776 $conn->read(65536);
777 $conn->send_server_stmt_execute_data_response($field_name);
778 $conn->read(65536);
782 function my_mysqli_test_query_response_row_length_overflow(my_mysqli_fake_server_conn $conn): void
784 $rh = $conn->packet_generator->server_query_execute_data_response('strval');
789 $conn->send_server_greetings();
790 $conn->read();
791 $conn->send_server_ok();
792 $conn->read();
793 …$conn->send($conn->packets_to_bytes($rh), "Malicious Query Response for data strval field [length …
794 $conn->read(65536);
797 function my_mysqli_test_query_response_row_read_two_fields(my_mysqli_fake_server_conn $conn): void
799 $conn->send_server_greetings();
800 $conn->read();
801 $conn->send_server_ok();
802 $conn->read();
805 $conn->send_server_query_execute_data_response($field_name);
806 $conn->read();
821 $conn = new my_mysqli_fake_server_conn($socket);
823 call_user_func($test_function_name, $conn);
824 $conn->close();