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);
645 function my_mysqli_test_tabular_response_def_over_read(my_mysqli_fake_server_conn $conn): void
647 $rh = $conn->packet_generator->server_tabular_query_response();
659 $trrh = $conn->packets_to_bytes($rh);
661 $conn->send_server_greetings();
662 $conn->read();
663 $conn->send_server_ok();
664 $conn->read();
665 $conn->send($trrh, "Malicious Tabular Response [Extract heap through buffer over-read]");
666 $conn->read(65536);
669 function my_mysqli_test_upsert_response_filename_over_read(my_mysqli_fake_server_conn $conn): void
671 $rh = $conn->packet_generator->server_upsert_query_response();
676 $trrh = $conn->packets_to_bytes($rh);
678 $conn->send_server_greetings();
679 $conn->read();
680 $conn->send_server_ok();
681 $conn->read();
682 $conn->send($trrh, "Malicious Tabular Response [Extract heap through buffer over-read]");
683 $conn->read(65536);
686 function my_mysqli_test_auth_response_message_over_read(my_mysqli_fake_server_conn $conn): void
688 $p = $conn->packet_generator->server_ok();
692 $conn->send_server_greetings();
693 $conn->read();
694 … $conn->send($p->to_bytes(), "Malicious OK Auth Response [Extract heap through buffer over-read]");
695 $conn->read();
698 function my_mysqli_test_stmt_response_row_over_read_string(my_mysqli_fake_server_conn $conn): void
700 $rh = $conn->packet_generator->server_stmt_execute_items_response();
705 $conn->send_server_greetings();
706 $conn->read();
707 $conn->send_server_ok();
708 $conn->read();
709 $conn->send_server_stmt_prepare_items_response();
710 $conn->read();
711 …$conn->send($conn->packets_to_bytes($rh), "Malicious Stmt Response for items [Extract heap through…
712 $conn->read(65536);
716 my_mysqli_fake_server_conn $conn,
720 $rh = $conn->packet_generator->server_stmt_execute_data_response($field_name);
725 $conn->send_server_greetings();
726 $conn->read();
727 $conn->send_server_ok();
728 $conn->read();
729 $conn->send_server_stmt_prepare_data_response($field_name);
730 $conn->read();
731 $conn->send(
732 $conn->packets_to_bytes($rh),
735 $conn->read(65536);
738 function my_mysqli_test_stmt_response_row_over_read_int(my_mysqli_fake_server_conn $conn): void
740 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'intval');
743 function my_mysqli_test_stmt_response_row_over_read_float(my_mysqli_fake_server_conn $conn): void
745 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'fltval');
748 function my_mysqli_test_stmt_response_row_over_read_double(my_mysqli_fake_server_conn $conn): void
750 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'dblval');
753 function my_mysqli_test_stmt_response_row_over_read_date(my_mysqli_fake_server_conn $conn): void
755 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'datval');
758 function my_mysqli_test_stmt_response_row_over_read_time(my_mysqli_fake_server_conn $conn): void
760 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'timval', '0c');
763 function my_mysqli_test_stmt_response_row_over_read_datetime(my_mysqli_fake_server_conn $conn): void
765 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'dtival');
768 function my_mysqli_test_stmt_response_row_no_space(my_mysqli_fake_server_conn $conn): void
770 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'strval', '09');
773 function my_mysqli_test_stmt_response_row_over_read_bit(my_mysqli_fake_server_conn $conn): void
775 my_mysqli_test_stmt_response_row_over_read_two_fields($conn, 'bitval');
778 function my_mysqli_test_stmt_response_row_read_two_fields(my_mysqli_fake_server_conn $conn): void
780 $conn->send_server_greetings();
781 $conn->read();
782 $conn->send_server_ok();
783 $conn->read();
786 $conn->send_server_stmt_prepare_data_response($field_name);
787 $conn->read(65536);
788 $conn->send_server_stmt_execute_data_response($field_name);
789 $conn->read(65536);
793 function my_mysqli_test_query_response_row_length_overflow(my_mysqli_fake_server_conn $conn): void
795 $rh = $conn->packet_generator->server_query_execute_data_response('strval');
800 $conn->send_server_greetings();
801 $conn->read();
802 $conn->send_server_ok();
803 $conn->read();
804 …$conn->send($conn->packets_to_bytes($rh), "Malicious Query Response for data strval field [length …
805 $conn->read(65536);
808 function my_mysqli_test_query_response_row_read_two_fields(my_mysqli_fake_server_conn $conn): void
810 $conn->send_server_greetings();
811 $conn->read();
812 $conn->send_server_ok();
813 $conn->read();
816 $conn->send_server_query_execute_data_response($field_name);
817 $conn->read();
837 $conn = new my_mysqli_fake_server_conn($socket);
839 call_user_func($test_function_name, $conn);
840 $conn->close();