Googleã®æ¤ç´¢çµæãªã³ã¯ãã¼ã¸ã¯ãã©ã¦ã¶æ¯ã«ç°ãªã
ã¾ãã¯ãã¡ããã覧ãã ããã
Google先生の検索結果リンクが予想以上に作り込まれていた件
ä¸é¨å¼ç¨
ã¾ã¨ã
- ï¼ç¥ï¼
- Googleå çã®æ¤ç´¢ãã¼ã¸ã¯httpsã§ãé·ç§»å ã®httpãã¼ã¸ã«Refererãéä¿¡ãã¦ãã¾ãã
- æ¤ç´¢çµæã®ãªã³ã¯ã¯302 Foundã®Redirectå¦çãããã«ã200 OKã®htmlãè¿ãã¾ãã
- 200 OKã®htmlãã¼ã¸ã§ã¯æ¬æ¥ã®é·ç§»å ãã¼ã¸ãèªã¿è¾¼ãå¦çãæ¸ããã¦ãã¦ã200 OKã®URLããé·ç§»ããããã«Refererãéä¿¡ãã¦ãã¾ãããã ãRefererã®æ¤ç´¢Queryãã©ã¡ã¼ã¿ã®q=ã¯äºãåé¤ããã¦ãã¾ãã
- ï¼ç¥ï¼
ãªãã»ã©ã¼ã
200 OKã®ãã¼ã¸ã§window.location.replace()ã使ããã¨ã§ãã©ã¦ã¶ã®historyé·ç§»ã§ãåé¡ãåºãªãããã«ãã¦ãã®ãã¨é¢å¿ããã®ã ããå®ã¯ãã©ã¦ã¶ãã¨ã«ç°ãªãã¨ã®æ
å ±ã@dancerjå
çããæãã¦ããã ããã
ããã©ã«ãã®å¿çãã¿ã¼ã³
å ã®ãµã¤ãã§ãç´¹ä»ããã¦ãããã¿ã¼ã³ããã¡ãã®å¿çã確èªã§ããã®ã¯ãFirefoxãChromeãSafariãiPhoneãAndroidãIE11ãªã©ãæ´å½¢ããã¨ãããªæãã
<script> window.googleJavaScriptRedirect = 1 </script> <script> var m = { navigateTo: function(b, a, d) { if(b != a && b.google) { if(b.google.r) { b.google.r = 0; b.location.href = d; a.location.replace("about:blank"); } } else { a.location.replace(d); } } }; m.navigateTo(window.parent, window, "(ãªã³ã¯å URL)"); </script> <noscript> <META http-equiv="refresh" content="0;URL='(ãªã³ã¯å URL)'"> </noscript>
window.parentãè¦ã¦ãã®ã¯iframeãframesetæ§é ã ã£ãå ´åã®å¯¾çã ãããã
Operaã®å¿çãã¿ã¼ã³
Operaã®UserAgentã®å ´å以ä¸ã®ãããªå¿çã«ãªã£ãããµãã
<script> window.googleJavaScriptRedirect = 1 </script> <script> var m = { navigateTo: function(b, a, d) { if(b != a && b.google) { if(b.google.r) { b.google.r = 0; b.location.href = d; a.location.replace("about:blank"); try{ if(b && b.frames) { var e = b.document.getElementsByTagName("IFRAME"); for(b = 0; b < e.length; ++b) { var c = e[b]; if(c.contentWindow == a) { c.parentNode.removeChild(c); break } } } } catch(n) { } } } else{ a.location.replace(d); } } }; m.navigateTo(window.parent, window, "(ãªã³ã¯å URL)"); </script> <noscript> <META http-equiv="refresh" content="0;URL='(ãªã³ã¯å URL)'"> </noscript>
window.parentãåå¨ããå ´åã®æ±ããOperaã¯ç°ãªãã¨ãããã¨ã ãããã
Internet Explorer 10以åã®å¿çãã¿ã¼ã³
ãã¦ãå¾ ã¡ããã®IEæ§ãIE6ããIE10ã¾ã§ã¯ä»¥ä¸ã®ãããªå¿çã«ãªã£ã¦ãããã¡ãªã¿ã«IE11ã¯ä¸ã®ããã©ã«ãã
<script> window.googleJavaScriptRedirect = 1 </script> <body style="display: none"> <a href="(ãªã³ã¯å URL)" id=link target=_parent> <textarea id="frm"></textarea> </body> <script> var m = { navigateTo: function(b ,a ,d) { if(b != a && b.google) { if(b.google.r) { b.google.r = 0; a.document.getElementById("link").click(); } } else { try{ var f = a.location.search.match(/[\?&]ccnt=([^&]*)/); if(f) { var g = f[1], h = a.sessionStorage, k = h.rds, l = h.rdcnt; "b" == k && l == g ? ( a.sessionStorage.rds = "f", a.history.back(1) ) : ( a.sessionStorage.rds = "b", a.sessionStorage.rdcnt = g.substr(0,5), a.document.getElementById("link").click() ) } else a.location.search.match("[?&]frm=") ? a.setTimeout( function() { var b = a.document.getElementById("frm"); b.value ? ( b.value = "", a.history.back(1) ) : ( b.value="b", a.document.getElementById("link").click() ) }, 0 ) : a.document.getElementById("link").click() } catch(p) { a.document.getElementById("link").click() } } } }; m.navigateTo(window.parent, window, "(ãªã³ã¯å URL)"); </script> <noscript> <META http-equiv="refresh" content="0;URL='(ãªã³ã¯å URL)'"> </noscript>
ãããå ¨ç¶éãããªãã ããã¯ããããããã誰ãå©ãã¦ä¸ããã
ã¾ã¨ã
大å¤ã§ãããã¨ããããIE10以åã¯æ»ãã§ããã