网站可以检测正在使用的浏览器扩展吗?

时间:2010-11-02 14:41:40

标签: extension-methods

网站可以检测正在使用的浏览器扩展程序吗?特别是在这种情况下,分机的作者希望阻止网站识别用户何时使用该分机。所以,对于一个通用的例子,雅虎的程序员可以!编写代码,以便www.yahoo.com可以告诉用户何时使用Firebug?如果雅虎!可以做到这一点,Firebug的制造商能做些什么来防止这种情况发生?

3 个答案:

答案 0 :(得分:4)

看起来您可以使用javascript在Firefox中检测其中一些,这是一篇文章:

http://jeremiahgrossman.blogspot.com/2006/08/i-know-what-youve-got-firefox.html

还有一个:

http://ha.ckers.org/blog/20060823/detecting-firefox-extentions/

以下是检测方法:

// popular extensions.
var e = {
 "Adblock Plus" : "chrome://adblockplus/skin/adblockplus.png",
 "Auto Copy" : "chrome://autocopy/skin/autocopy.png",
 "ColorZilla" : "chrome://colorzilla/skin/logo.png",
 "Customize Google" : "chrome://customizegoogle/skin/32x32.png",
 "DownThemAll!" : "chrome://dta/content/immagini/icon.png",
 "Faster Fox" : "chrome://fasterfox/skin/icon.png",
 "Flash Block" : "chrome://flashblock/skin/flash-on-24.png",
 "FlashGot" : "chrome://flashgot/skin/icon32.png",
 "Forecastfox" : "chrome://forecastfox/skin/images/icon.png",
 "Google Toolbar" : "chrome://google-toolbar/skin/icon.png",
 "Greasemonkey" : "chrome://greasemonkey/content/status_on.gif",
 "IE Tab" : "chrome://ietab/skin/ietab-button-ie16.png",
 "IE View" : "chrome://ieview/skin/ieview-icon.png",
 "JS View" : "chrome://jsview/skin/jsview.gif",
 "Live HTTP Headers" : "chrome://livehttpheaders/skin/img/Logo.png",
 "MeasureIt" : "chrome://measureit/skin/measureit.png",
 "SEO For Firefox" : "chrome://seo4firefox/content/icon32.png",
 "SEOpen" : "chrome://seopen/skin/seopen.png",
 "Search Status" : "chrome://searchstatus/skin/cax10.png",
 "Server Switcher" : "chrome://switcher/skin/icon.png",
 "StumbleUpon" : "chrome://stumbleupon/content/skin/logo32.png",
 "Tab Mix Plus" : "chrome://tabmixplus/skin/tmp.png",
 "Torrent-Search Toolbar" : "chrome://torrent-search/skin/v.png",
 "User Agent Switcher" : "chrome://useragentswitcher/content/logo.png",
 "View Source With" : "chrome://viewsourcewith/skin/ff/tb16.png",
 "Web Developer" : "chrome://webdeveloper/content/images/logo.png",
 "Unhide Passwords" : "chrome://unhidepw/skin/unhidepw.png",
 "UrlParams" : "chrome://urlparams/skin/urlparams32.png",
 "NewsFox" : "chrome://newsfox/skin/images/home.png",
 "Add N Edit Cookies" : "chrome://addneditcookies/skin/images/anec32.png",
 "GTDGmail" : "chrome://gtdgmail/content/gtd_lineitem.png",
 "QuickJava" : "chrome://quickjava/content/js.png",
 "Adblock Filterset.G Updater" : "chrome://unplug/skin/unplug.png",
 "BBCode" : "chrome://bbcode/skin/bbcode.png",
 "BugMeNot" : "chrome://bugmenot/skin/bugmenot.png",
 "ConQuery" : "chrome://conquery/skin/conquery.png",
 "Download Manager Tweak" : "chrome://downloadmgr/skin/downloadIcon.png",
 "Extended Cookie Manager" : "chrome://xcm/content/allowed.png",
 "FireBug" : "chrome://firebug/content/firebug32.png",
 "FoxyTunes" : "chrome://foxytunes/skin/logo.png",
 "MR Tech Disable XPI Install Delay" : "chrome://disable_xpi_delay/content/icon.png",
 "SessionSaver .2" : "chrome://sessionsaver/content/ss.png",
 "spooFX" : "chrome://spoofx/skin/main/spoofx.png",
 "Statusbar Clock" : "chrome://timestatus/skin/icon.png",
 "Torbutton" : "chrome://torbutton/skin/bigbutton_gr.png",
 "UnPlug" : "chrome://unplug/skin/unplug.png",
 "View Source Chart" : "chrome://vrs/skin/vrssmall.png",
 "XPather" : "chrome://xpather/content/iconka.png", 

};

if (is_mozilla) {
 showExtensions(); 
}

function showExtensions() {
 for (var i in e) {
  var img = document.createElement("img");
  img.setAttribute("border", '0');
  img.setAttribute("width", '0');
  img.setAttribute("height", '0');
  img.setAttribute("onload", "document.getElementById('ext').
appendChild(document.createElement('li')).innerHTML='" + i + "'");
  img.setAttribute("src", e[i]);
 }

}

因此,看起来要阻止这种检测,您不需要拥有可以识别插件的唯一资源,也不需要将您的资源命名为与要屏蔽的现有插件相同的名称。

答案 1 :(得分:1)

此信息不是http协议的一部分,如果服务器端收到来自浏览器的请求,它几乎不会影响http标头中的信息类型。唯一可行的方法是通过JavaScript,以便您作为程序员创建从浏览器中获取此信息的JavaScript。但仅在浏览器具有此要求的可用功能的情况下。

答案 2 :(得分:1)

是。当用户请求帮助时,我用它来自动填充隐藏的表单字段,所以我知道是否有插件导致问题:

var plugins = "";
for (var i = 0; i < navigator.plugins.length; i++)
{
    plugins += navigator.plugins[i].name;
    if (i != (navigator.plugins.length - 1))
    {
        plugins += ", ";
    }
}