如何在php中使用协议tslv1发送数据包

时间:2016-05-18 07:40:32

标签: php packet-sniffers

我正在尝试通过PHP发送测试数据包,但它不起作用,请参阅以下代码:

$str = "..H..u$.......E.\r\n";
$str .= ".i..@.@.......n.\r\n";
$str .= "...........]X...\r\n";
$str .= ".i...........e a\r\n";
$str .= ".:....0....e.4.\\\r\n";
$str .= ".t......n{._...~\r\n";
$str .= "0.x..{........K:\r\n";
$str .= "..<./H.\r\n";

$fp = stream_socket_client("sslv3://110.164.180.167:443", $errno, $errstr);

if (!$fp) {
    echo "$errstr ($errno)<br />\n";
} else {
    fwrite($fp, $str);
    fclose($fp);
}

产生的错误如下:

image of error

以下是数据的wirehark捕获:

packet sniff by wireshark

0 个答案:

没有答案