Navicat for Premium 9.0.2激活(ntunnel_mysql_Navicat 使用HTTP代理连接mysql ntunnel_mysql.php)

Navicat for Premium 9.0.2激活(ntunnel_mysql_Navicat 使用HTTP代理连接mysql ntunnel_mysql.php)

Navicat

/// zjfree 使用mysqli代理Navicat

const USER_ACCOUNT = ‘admin’;const USER_PASSWORD = ”;//检测用户授权

functioncheck()

{if (!isset($_SERVER[‘PHP_AUTH_USER’])) {header(‘WWW-Authenticate: Basic realm=”My Realm”‘);header(‘HTTP/1.0 401 Unauthorized’);//echo ‘Text to send if user hits Cancel button’;

exit;

}if (!($_SERVER[‘PHP_AUTH_USER’] == USER_ACCOUNT && $_SERVER[‘PHP_AUTH_PW’] ==USER_PASSWORD)) {exit;

}

}

check();//set allowTestMenu to false to disable System/Server test page

$allowTestMenu = true;$use_mysqli = function_exists(“mysqli_connect”);header(“Content-Type: text/plain; charset=x-user-defined”);error_reporting(0);set_time_limit(0);functionphpversion_int()

{list($maVer, $miVer, $edVer) = preg_split(“(/|.|-)”, phpversion());return $maVer * 10000 + $miVer * 100 + $edVer;

}if (phpversion_int() < 50300) {set_magic_quotes_runtime(0);

}function GetLongBinary($num)

{return pack(“N”, $num);

}function GetShortBinary($num)

{return pack(“n”, $num);

}function GetDummy($count)

{$str = “”;for ($i = 0; $i < $count; $i++)$str .= “x00”;return $str;

}function GetBlock($val)

{$len = strlen($val);if ($len < 254)return chr($len) . $val;else

return “xFE” . GetLongBinary($len) . $val;

}function EchoHeader($errno)

{$str = GetLongBinary(1111);$str .= GetShortBinary(202);$str .= GetLongBinary($errno);$str .= GetDummy(6);echo $str;

}function EchoConnInfo($conn)

{if ($GLOBALS[‘use_mysqli’]) {$str = GetBlock(mysqli_get_host_info($conn));$str .= GetBlock(mysqli_get_proto_info($conn));$str .= GetBlock(mysqli_get_server_info($conn));echo $str;

}else{$str = GetBlock(mysql_get_host_info($conn));$str .= GetBlock(mysql_get_proto_info($conn));$str .= GetBlock(mysql_get_server_info($conn));echo $str;

}

}function EchoResultSetHeader($errno, $affectrows, $insertid, $numfields, $numrows)

{$str = GetLongBinary($errno);$str .= GetLongBinary($affectrows);$str .= GetLongBinary($insertid);$str .= GetLongBinary($numfields);$str .= GetLongBinary($numrows);$str .= GetDummy(12);echo $str;

}function EchoFieldsHeader($res, $numfields)

{$str = “”;for ($i = 0; $i < $numfields; $i++) {if ($GLOBALS[‘use_mysqli’]) {$finfo = mysqli_fetch_field_direct($res, $i);$str .= GetBlock($finfo->name);$str .= GetBlock($finfo->table);$type = $finfo->type;$length = $finfo->length;$str .= GetLongBinary($type);$intflag = $finfo->flags;$str .= GetLongBinary($intflag);$str .= GetLongBinary($length);

}else{$str .= GetBlock(mysql_field_name($res, $i));$str .= GetBlock(mysql_field_table($res, $i));$type = mysql_field_type($res, $i);$length = mysql_field_len($res, $i);switch ($type) {case “int”:

if ($length > 11) $type = 8;else $type = 3;break;case Navicat for Premium 9.0.2激活 “real

今天的文章
Navicat for Premium 9.0.2激活(ntunnel_mysql_Navicat 使用HTTP代理连接mysql ntunnel_mysql.php)分享到此就结束了,感谢您的阅读。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/119669.html

(0)
编程小号编程小号
上一篇 2024-07-10 20:06
下一篇 2024-07-10

相关推荐