51TestingÈí¼þ²âÊÔÂÛ̳

 ÕÒ»ØÃÜÂë
 (×¢-²á)¼ÓÈë51Testing

QQ怬

Ö»ÐèÒ»²½£¬¿ìËÙ¿ªÊ¼

΢ÐŵǼ£¬¿ìÈËÒ»²½

ÊÖ»úºÅÂ룬¿ì½ÝµÇ¼

²é¿´: 4002|»Ø¸´: 7
´òÓ¡ ÉÏÒ»Ö÷Ìâ ÏÂÒ»Ö÷Ìâ

[Ô­´´] web/winsocket Dual Protocol ЭÒéÊÇʲô

[¸´ÖÆÁ´½Ó]

¸ÃÓû§´Óδǩµ½

Ìøתµ½Ö¸¶¨Â¥²ã
1#
·¢±íÓÚ 2007-1-16 11:57:09 | Ö»¿´¸Ã×÷Õß »ØÌû½±Àø |µ¹Ðòä¯ÀÀ |ÔĶÁģʽ
web/winsocket Dual Protocol ЭÒéÊÇʲô,ËûÊÊÓÃÓÚʲôÑùµÄ³ÌÐò°¡.
ËüºÍ winsocket Çø±ðÔÚÄÄÀï°¡.¾õµÃwinsocket²ÎÊý»¯Ì«Âé·³ÁË°¡.ËùÒÔÏëʹÓÃÆäËüµÄЭÒé,
²âÊÔµÄÊÇ c/s,¿Í»§¶ËÓë·þÎñ¶ËͨÐÅÒ²ÊDzÉÓÃhttp/https,µ«²»ÊÇweb,¶øÊÇÀàËÆÓÚsql server2005,
´ó¼ÒÓÐʲôºÃµÄ°ì·¨Âð.µÈ´ýÖÐ

µÈ´ýÖÐ
µÈ´ýÖÐ
µÈ´ýÖÐ
·ÖÏíµ½:  QQºÃÓѺÍȺQQºÃÓѺÍȺ QQ¿Õ¼äQQ¿Õ¼ä ÌÚѶ΢²©ÌÚѶ΢²© ÌÚѶÅóÓÑÌÚѶÅóÓÑ
ÊÕ²ØÊÕ²Ø

¸ÃÓû§´Óδǩµ½

2#
 Â¥Ö÷| ·¢±íÓÚ 2007-1-16 12:01:39 | Ö»¿´¸Ã×÷Õß
¶¥Ò»Ï°¡ .´ó¼Ò°ï°ïæ°¡.

¸ÃÓû§´Óδǩµ½

3#
·¢±íÓÚ 2007-1-16 13:05:49 | Ö»¿´¸Ã×÷Õß
C/S²ÎÊý»¯ºÜÂ鷳ô£¿²»¾õµÃ°¡

¸ÃÓû§´Óδǩµ½

4#
 Â¥Ö÷| ·¢±íÓÚ 2007-1-16 13:48:08 | Ö»¿´¸Ã×÷Õß
ÓÃwinsocketЭÒéʱ²ÎÊý»¯Âé·³°¡.
recv buf9 4359
        "HTTP/1.1 401 Access Denied\r\n"
        "Server: Microsoft-IIS/5.0\r\n"
        "Date: Mon, 15 Jan 2007 02:14:37 GMT\r\n"
        "WWW-Authenticate: NTLM TlRMTVNTUAACAAAACgAKADgAAAAFwoKi5XD6nlO8mHQAfBQAAAA"
        "AADwAPABCAAAABQCTCAAAAA9MAEkAVQBYAFEAAgAKAEwASQBVAFgAUQABAAoATABJAFUAWABRA"
        "AQACgBsAGkAdQB4AHEAAwAKAGwAaQB1AHgAcQAAAAAA\r\n"
        "Content-Length: 4025\r\n"
        "Content-Type: text/html\r\n"
        "\r\n"
        "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\r\n"
        "<html dir=ltr>\r\n"
        "\r\n"
        "<head>\r\n"
        "<style>\r\n"
        "a:link                  {font:8pt/11pt ‚l‚r ‚oƒSƒVƒbƒN; color:FF0000}\r\n"
        "a:visited               {font:8pt/11pt ‚l‚r ‚oƒSƒVƒbƒN; color:#4e4e4e}\r\n"
        "</style>\r\n"
        "\r\n"
        "<META NAME=\"ROBOTS\" CONTENT=\"NOINDEX\">\r\n"
        "\r\n"
        "<title>‚¡À‚&Igrave;ƒy[ƒW‚&eth;•\Ž&brvbar;‚¡¤‚¨¦Œ&nbsp;Œ&Agrave;‚&ordf;‚&nbsp;‚¨¨‚&Uuml;‚&sup1;‚&ntilde;</title>\r\n"
        "\r\n"
        "<META HTTP-EQUIV=\"Content-Type\" Content=\"text-html; charset=shift_jis\""
        ">\r\n"
        "</head>\r\n"
        "\r\n"
        "<script> \r\n"
        "function Homepage(){\r\n"
        "<!--\r\n"
        "// in real bits, urls get returned to our script like this:\r\n"
        "// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm \r\n"
        "\r\n"
        "\t//For testing use DocURL = \"res://shdocvw.dll/http_404.htm#https://www."
        "microsoft.com/bar.htm\"\r\n"
        "\tDocURL=document.URL;\r\n"
        "\t\r\n"
        "\t//this is where the http or https will be, as found by searching for ://"
        " but skipping the res://\r\n"
        "\tprotocolIndex=DocURL.indexOf(\"://\",4);\r\n"
        "\t\r\n"
        "\t//this finds the ending slash for the domain server \r\n"
        "\tserverIndex=DocURL.indexOf(\"/\",protocolIndex + 3);\r\n"
        "\r\n"
        "\t//for the href, we need a valid URL to the domain. We search for the # s"
        "ymbol to find the begining \r\n"
        "\t//of the true URL, and add 1 to skip it - this is the BeginURL value. We"
        " use serverIndex as the end marker.\r\n"
        "\t//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);\r\n"
        "\tBeginURL=DocURL.indexOf(\"#\",1) + 1;\r\n"
        "\turlresult=DocURL.substring(BeginURL,serverIndex);\r\n"
        "\t\t\r\n"
        "\t//for display, we need to skip after http://, and go to the next slash\r"
        "\n"
        "\tdisplayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);\r\n"
        "\tInsertElementAnchor(urlresult, displayresult);\r\n"
        "}\r\n"
        "\r\n"
        "function HtmlEncode(text)\r\n"
        "{\r\n"
        "    return text.replace(/&/g, '&amp').replace(/'/g, '&quot;').replace(/</g"
        ", '&lt;').replace(/>/g, '&gt;');\r\n"
        "}\r\n"
        "\r\n"
        "function TagAttrib(name, value)\r\n"
        "{\r\n"
        "    return ' '+name+'=\"'+HtmlEncode(value)+'\"';\r\n"
        "}\r\n"
        "\r\n"
        "function PrintTag(tagName, needCloseTag, attrib, inner){\r\n"
        "    document.write( '<' + tagName + attrib + '>' + HtmlEncode(inner) );\r\n"
        "    if (needCloseTag) document.write( '</' + tagName +'>' );\r\n"
        "}\r\n"
        "\r\n"
        "function URI(href)\r\n"
        "{\r\n"
        "    IEVer = window.navigator.appVersion;\r\n"
        "    IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );\r\n"
        "\r\n"
        "    return (IEVer.charAt(1)=='.' && IEVer >= '5.5') ?\r\n"
        "        encodeURI(href) :\r\n"
        "        escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');\r\n"
        "}\r\n"
        "\r\n"
        "function InsertElementAnchor(href, text)\r\n"
        "{\r\n"
        "    PrintTag('A', true, TagAttrib('HREF', URI(href)), text);\r\n"
        "}\r\n"
        "\r\n"
        "//-->\r\n"
        "</script>\r\n"
        "\r\n"
        "<body bgcolor=\"FFFFFF\">\r\n"
        "\r\n"
        "<table width=\"410\" cellpadding=\"3\" cellspacing=\"5\">\r\n"
        "\r\n"
        "  <tr>  \r\n"
        "    <td align=\"left\" valign=\"middle\" width=\"360\">\r\n"
        "\t<h1 style=\"COLOR:000000; FONT: 13pt/15pt ‚l‚r ‚oƒSƒVƒbƒN\"><!--Problem-"
        "->‚¡À‚&Igrave;ƒy[ƒW‚&eth;•\Ž&brvbar;‚¡¤‚¨¦Œ&nbsp;Œ&Agrave;‚&ordf;‚&nbsp;‚¨¨‚&Uuml;‚&sup1;‚&ntilde;</h1>\r\n"
        "    </td>\r\n"
        "  </tr>\r\n"
        "  \r\n"
        "  <tr>\r\n"
        "    <td width=\"400\" colspan=\"2\">\r\n"
        "\t<font style=\"COLOR:000000; FONT: 8pt/11pt ‚l‚r ‚oƒSƒVƒbƒN\">¡¯&ntilde;‹Ÿ‚&sup3;‚¨º‚&frac12;Ž¡®"
        "Ši&icirc;•&ntilde;‚&Eacute;‚&Iacute;A‚¡À‚&Igrave;ƒfƒBƒŒƒNƒgƒŠ‚&Uuml;‚&frac12;‚&Iacute;ƒy[ƒW‚&eth;•\Ž&brvbar;‚¡¤‚¨¦Œ&nbsp;Œ&Agrave;‚&ordf;‚&nbsp;‚¨¨‚&Uuml;‚&sup1;‚&ntilde;B</id><"
        "/font></td>\r\n"
        "  </tr>\r\n"
        "  \r\n"
        "  <tr>\r\n"
        "    <td width=\"400\" colspan=\"2\">\r\n"
        "\t<font style=\"COLOR:000000; FONT: 8pt/11pt ‚l‚r ‚oƒSƒVƒbƒN\">\r\n"
        "\t<hr color=\"#C0C0C0\" noshade>\r\n"
        "<p>¡®&Icirc;ˆ•&ucirc;¨C@</p>\r\n"
        "\r\n"
        "<ul>\r\n"
        "<li>[<a href=\"javascript:location.reload()\">XV</a>] ‚&eth;ƒNƒŠƒbƒN‚&micro;A•&Ecirc;‚&Igrave;"
        "Ž¡®Ši&icirc;•&ntilde;‚&Aring;&Auml;¡°xƒAƒNƒZƒX‚&micro;‚&Auml;‚&shy;‚&frac34;‚&sup3;‚&cent;B</li>\r\n"
        "\r\n"
        "<li>‚¡À‚&Igrave;ƒfƒBƒŒƒNƒgƒŠ‚&Uuml;‚&frac12;‚&Iacute;ƒy[ƒW‚&eth;•\Ž&brvbar;‚&Aring;‚&laquo;‚¨¦‚&Iacute;‚&cedil;‚&Aring;‚&nbsp;‚¨¦¨º‡‚&Iacute;A<script> \r\n"
        "\t<!--\r\n"
        "\tif (!((window.navigator.userAgent.indexOf(\"MSIE\") > 0) && (window.navi"
        "gator.appVersion.charAt(0) == \"2\")))\r\n"
        "\t{\r\n"
        "\t\tHomepage();\r\n"
        "\t}\r\n"
        "\t//-->\r\n"
        "\t</script> ƒz[ƒ€ ƒy[ƒW‚&Eacute;‹L&Uacute;‚&sup3;‚¨º‚&Auml;‚&cent;‚¨¦¡°dŽqƒ[ƒ‹‚&Igrave;ƒAƒhƒŒƒX‚&Uuml;‚&frac12;‚&Iacute;¡°d˜b¡±&Ocirc;†"
        "‚&eth;Žg¡ªp‚&micro;‚&Auml;AWeb ƒTƒCƒg‚&Igrave;Š&Ccedil;¡ªŽ&Ograve;‚&Eacute;¨C&acirc;‚&cent;‡‚¨ª‚&sup1;‚&Auml;‚&shy;‚&frac34;‚&sup3;‚&cent;B\r\n"
        "</li>\r\n"
        "</ul>\r\n"
        "\r\n"
        "    <h2 style=\"font:8pt/11pt ‚l‚r ‚oƒSƒVƒbƒN; color:000000\">HTTP 401.1 -"
        " Œ&nbsp;Œ&Agrave;‚&ordf;‚&nbsp;‚¨¨‚&Uuml;‚&sup1;‚&ntilde;: ƒƒOƒIƒ¡°‚&Eacute;Ž&cedil;¡±s‚&micro;‚&Uuml;‚&micro;‚&frac12;B<br>\r\n"
        "    ƒCƒ¡°ƒ^[ƒlƒbƒg ƒCƒ¡°ƒtƒHƒ[ƒVƒ‡ƒ¡° ƒT[ƒrƒX</h2>\r\n"
        "\t\t\r\n"
        "\t<hr color=\"#C0C0C0\" noshade>\r\n"
        "\t\r\n"
        "\t<p>‹Zp&icirc;•&ntilde; (ƒTƒ|[ƒg¡¯S¡°¨CŽ&Ograve;¡ªp)</p>\r\n"
        "\t\r\n"
        "<ul>\r\n"
        "<li>&Uacute;¡Á<br>\r\n"
        "<a href=\"http://www.microsoft.com/ContentRedirect.asp?prd=iis&sbp=&pver=5"
        ".0&pid=&ID=401.1&cat=web&os=&over=&hrd=&Opt1=&Opt2=&Opt3=\" target=\"_blan"
        "k\">Microsoft Support</a>\r\n"
        "</li>\r\n"
        "\r\n"
        "    </font></td>\r\n"
        "  </tr>\r\n"
        "  \r\n"
        "</table>\r\n"
        "</body>\r\n"
        "</html>\r\n"
½Å±¾ÖÐÎҾͲ»Ã÷°×ÕâЩ¶«Î÷µÄÒâ˼°¡.
±¾À´¾ÍûÓÐѧ¹ýÓйØ,Ö»ÊÇ×î½üæ×ÅÓÃÕâ¸öÖ»ÄÜÏë°ì·¨Ñ§ÁË.
ʱ¼ä½ôÕÅ,´ó¼Ò°ï°ïæ°¡.

¸ÃÓû§´Óδǩµ½

5#
·¢±íÓÚ 2007-1-16 16:16:33 | Ö»¿´¸Ã×÷Õß

¸ÃÓû§´Óδǩµ½

6#
 Â¥Ö÷| ·¢±íÓÚ 2007-1-16 17:07:16 | Ö»¿´¸Ã×÷Õß
¶÷.ÎÒ¿´¹ýÁË.ллÄã°¡.
web/winsocketЭÒéÊÇc/sģʽϵÄÓ¦ÓóÌÐò£¬µ«²ÉÓõÄÊÇhttp»òsocketЭÒé¡£
ÊDZðÈ˸æËßÎÒµÄ.ÌùÉÏÀ´´ó¼Ò¿´¿´.
»¹ÓÐÎÒÏÖÔÚ×öµÄ¶«Î÷.ÊÇÈý²ãµÄ.
ǰ̨¿Í»§¶Ë.Á¬½Ó·þÎñÆ÷,ºǫ́ÊÇsqlserver2005Êý¾Ý¿â.·þÎñÆ÷ÓëÊý¾Ý¿â²»ÔÚÒ»¸ö»úÆ÷.·þÎñÆ÷ÊǼ¯ÈºµÄ.
ÏÖÔÚ½øÐÐѹÁ¦²âÊÔ.Òª¶ÔÊý¾Ý¿â½øÐÐѹÁ¦²âÊÔ.´ó¼ÒÓÐûÓкõķ½·¨°¡

¸ÃÓû§´Óδǩµ½

7#
·¢±íÓÚ 2007-1-16 17:19:17 | Ö»¿´¸Ã×÷Õß
ÄãµÄÇé¿ö£¬¸öÈËÈÏΪֻҪÓÃhttpЭÒé¾Í¿ÉÒÔÁË¡£

¸ÃÓû§´Óδǩµ½

8#
 Â¥Ö÷| ·¢±íÓÚ 2007-1-16 17:25:28 | Ö»¿´¸Ã×÷Õß
¶÷.Óò»ÁË,ËüÖ§³ÖµÄЭÒéÊÇhttp/https,
µ«ÎÒÒª²âµÄ²»ÊÇÒÔwebµÄÄÇÖÖ,¶øÊÇÀàËÆÓÚsqlserver2005 ¿Í»§¶ËµÄÄÇÖֵǽ.
ÄúÐèÒªµÇ¼ºó²Å¿ÉÒÔ»ØÌû µÇ¼ | (×¢-²á)¼ÓÈë51Testing

±¾°æ»ý·Ö¹æÔò

¹Ø±Õ

Õ¾³¤ÍƼöÉÏÒ»Ìõ /1 ÏÂÒ»Ìõ

СºÚÎÝ|ÊÖ»ú°æ|Archiver|51TestingÈí¼þ²âÊÔÍø ( »¦ICP±¸05003035ºÅ ¹ØÓÚÎÒÃÇ

GMT+8, 2024-11-16 06:56 , Processed in 0.078511 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí