亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? phishingdetector.js

?? 現(xiàn)在很火的郵件客戶端軟件thunderbird的源碼
?? JS
字號:
# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-# ***** BEGIN LICENSE BLOCK *****# Version: MPL 1.1/GPL 2.0/LGPL 2.1## The contents of this file are subject to the Mozilla Public License Version# 1.1 (the "License"); you may not use this file except in compliance with# the License. You may obtain a copy of the License at# http://www.mozilla.org/MPL/## Software distributed under the License is distributed on an "AS IS" basis,# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License# for the specific language governing rights and limitations under the# License.## The Original Code is Thunderbird Phishing Dectector## The Initial Developer of the Original Code is# The Mozilla Foundation.# Portions created by the Initial Developer are Copyright (C) 2005# the Initial Developer. All Rights Reserved.## Contributor(s):#  Scott MacGregor <mscott@mozilla.org>## Alternatively, the contents of this file may be used under the terms of# either the GNU General Public License Version 2 or later (the "GPL"), or# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),# in which case the provisions of the GPL or the LGPL are applicable instead# of those above. If you wish to allow use of your version of this file only# under the terms of either the GPL or the LGPL, and not to allow others to# use your version of this file under the terms of the MPL, indicate your# decision by deleting the provisions above and replace them with the notice# and other provisions required by the GPL or the LGPL. If you do not delete# the provisions above, a recipient may use your version of this file under# the terms of any one of the MPL, the GPL or the LGPL.## ***** END LICENSE BLOCK ******// Dependencies:// gPrefBranch, gBrandBundle, gMessengerBundle should already be defined// gatherTextUnder from utilityOverlay.jsconst kPhishingNotSuspicious = 0;const kPhishingWithIPAddress = 1;const kPhishingWithMismatchedHosts = 2;var gPhishingDetector = {  mPhishingWarden: null,  /**   * initialize the phishing warden.    * initialize the black and white list url tables.    * update the local tables if necessary   */  init: function()   {    try {    // set up the anti phishing service    var appContext = Components.classes["@mozilla.org/phishingprotection/application;1"]                       .getService().wrappedJSObject;    this.mPhishingWarden  = new appContext.PROT_PhishingWarden();    // Register tables    // XXX: move table names to a pref that we originally will download    // from the provider (need to workout protocol details)    this.mPhishingWarden.registerWhiteTable("goog-white-domain");    this.mPhishingWarden.registerWhiteTable("goog-white-url");    this.mPhishingWarden.registerBlackTable("goog-black-url");    this.mPhishingWarden.registerBlackTable("goog-black-enchash");    // Download/update lists if we're in non-enhanced mode    this.mPhishingWarden.maybeToggleUpdateChecking();      } catch (ex) { dump('unable to create the phishing warde: ' + ex + '\n');}  },    /**   * Analyzes the urls contained in the currently loaded message in the message pane, looking for   * phishing URLs.   * Assumes the message has finished loading in the message pane (i.e. OnMsgParsed has fired).   *    * @param aUrl nsIURI for the message being analyzed.   *   * @return asynchronously calls gMessageNotificationBar.setPhishingMsg if the message   *         is identified as a scam.            */  analyzeMsgForPhishingURLs: function (aUrl)  {    if (!aUrl || !gPrefBranch.getBoolPref("mail.phishing.detection.enabled"))      return;            // Ignore nntp and RSS messages    var folder;    try {      folder = aUrl.folder;    } catch (ex) {}        if (folder.server.type == 'nntp' || folder.server.type == 'rss')      return;          // extract the link nodes in the message and analyze them, looking for suspicious URLs...    var linkNodes = document.getElementById('messagepane').contentDocument.links;    for (var index = 0; index < linkNodes.length; index++)      this.analyzeUrl(linkNodes[index].href, gatherTextUnder(linkNodes[index]));          // extract the action urls associated with any form elements in the message and analyze them.    var formNodes = document.getElementById('messagepane').contentDocument.getElementsByTagName("form");    for (index = 0; index < formNodes.length; index++)    {      if (formNodes[index].action)        this.analyzeUrl(formNodes[index].action);    }  },    /**    * Analyze the url contained in aLinkNode for phishing attacks. If a phishing URL is found,   *    * @param aHref the url to be analyzed   * @param aLinkText (optional) user visible link text associated with aHref in case   *        we are dealing with a link node.   * @return asynchronously calls gMessageNotificationBar.setPhishingMsg if the link node   *         conains a phishing URL.     */   analyzeUrl: function (aUrl, aLinkText)   {     if (!aUrl)       return;     var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);     var hrefURL;     // make sure relative link urls don't make us bail out     try {       hrefURL = ioService.newURI(aUrl, null, null);     } catch(ex) { return; }       // only check for phishing urls if the url is an http or https link.     // this prevents us from flagging imap and other internally handled urls     if (hrefURL.schemeIs('http') || hrefURL.schemeIs('https'))     {       var failsStaticTests = false;             var linkTextURL = {};       var unobscuredHostName = {};       unobscuredHostName.value = hrefURL.host;              if (this.hostNameIsIPAddress(hrefURL.host, unobscuredHostName) && !this.isLocalIPAddress(unobscuredHostName))         failsStaticTests = true;       else if (aLinkText && this.misMatchedHostWithLinkText(hrefURL, aLinkText, linkTextURL))         failsStaticTests = true;              // Lookup the url against our local list. We want to do this even if the url fails our static       // test checks because the url might be in the white list.       if (this.mPhishingWarden)       this.mPhishingWarden.isEvilURL(GetLoadedMessage(), failsStaticTests, aUrl, this.localListCallback);       else         this.localListCallback(GetLoadedMessage(), failsStaticTests, aUrl, 2 /* not found */);    }  },    /**    *     * @param aMsgURI the uri for the loaded message when the look up was initiated.    * @param aFailsStaticTests true if our static tests think the url is a phishing scam    * @param aUrl the url we looked up in the phishing tables    * @param aLocalListStatus the result of the local lookup (PROT_ListWarden.IN_BLACKLIST,    *        PROT_ListWarden.IN_WHITELIST or PROT_ListWarden.NOT_FOUND.    */  localListCallback: function (aMsgURI, aFailsStaticTests, aUrl, aLocalListStatus)  {      // for urls in the blacklist, notify the phishing bar.    // for urls in the whitelist, do nothing    // for all other urls, fall back to the static tests    if (aMsgURI == GetLoadedMessage())    {      if (aLocalListStatus == 0 /* PROT_ListWarden.IN_BLACKLIST */ ||          (aLocalListStatus == 2 /* PROT_ListWarden.PROT_ListWarden.NOT_FOUND */ && aFailsStaticTests))        gMessageNotificationBar.setPhishingMsg();    }  },    /**   * Looks up the report phishing url for the current phishing provider, appends aPhishingURL to the url,   * and loads it in the default browser where the user can submit the url as a phish.   * @param aPhishingURL the url we want to report back as a phishing attack   */   reportPhishingURL: function(aPhishingURL)   {     var appContext = Components.classes["@mozilla.org/phishingprotection/application;1"]                       .getService().wrappedJSObject;     var reportUrl = appContext.getReportPhishingURL();     if (reportUrl)     {       reportUrl += "&url=" + encodeURIComponent(aPhishingURL);       // now send the url to the default browser              var ioService = Components.classes["@mozilla.org/network/io-service;1"]                       .getService(Components.interfaces.nsIIOService);                              var uri = ioService.newURI(reportUrl, null, null);       var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]                         .getService(Components.interfaces.nsIExternalProtocolService);       protocolSvc.loadUrl(uri);     }   },       /**   * Private helper method to determine if the link node contains a user visible   * url with a host name that differs from the actual href the user would get taken to.   * i.e. <a href="http://myevilsite.com">http://mozilla.org</a>   *    * @return true if aHrefURL.host matches the host of the link node text.    * @return aLinkTextURL the nsIURI for the link node text   */  misMatchedHostWithLinkText: function(aHrefURL, aLinkNodeText, aLinkTextURL)  {    // gatherTextUnder puts a space between each piece of text it gathers,    // so strip the spaces out (see bug 326082 for details).    aLinkNodeText = aLinkNodeText.replace(/ /g, "");    // only worry about http and https urls    if (aLinkNodeText)    {      // does the link text look like a http url?       if (aLinkNodeText.search(/(^http:|^https:)/) != -1)       {         var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);         aLinkTextURL.value = ioService.newURI(aLinkNodeText, null, null);         return aHrefURL.host != aLinkTextURL.value.host;       }    }    return false;  },    /**   * Private helper method to determine if aHostName is an obscured IP address    * @return unobscured host name (if there is one)   * @return true if aHostName is an IP address   */  hostNameIsIPAddress: function(aHostName, aUnobscuredHostName)  {    // TODO: Add Support for IPv6    var index;    // scammers frequently obscure the IP address by encoding each component as octal, hex    // or in some cases a mix match of each. The IP address could also be represented as a DWORD.    // break the IP address down into individual components.    var ipComponents = aHostName.split(".");    // if we didn't find at least 4 parts to our IP address it either isn't a numerical IP    // or it is encoded as a dword    if (ipComponents.length < 4)    {      // Convert to a binary to test for possible DWORD.      var binaryDword = parseInt(aHostName).toString(2);      if (isNaN(binaryDword))        return false;      // convert the dword into its component IP parts.      ipComponents = new Array;      ipComponents[0] = (aHostName >> 24) & 255;      ipComponents[1] = (aHostName >> 16) & 255;      ipComponents[2] = (aHostName >>  8) & 255;      ipComponents[3] = (aHostName & 255);    }    else    {      for (index = 0; index < ipComponents.length; ++index)      {        // by leaving the radix parameter blank, we can handle IP addresses        // where one component is hex, another is octal, etc.        ipComponents[index] = parseInt(ipComponents[index]);      }    }    // make sure each part of the IP address is in fact a number    for (index = 0; index < ipComponents.length; ++index)      if (isNaN(ipComponents[index])) // if any part of the IP address is not a number, then we can safely return        return false;    var hostName = ipComponents[0] + '.' +  ipComponents[1] + '.' + ipComponents[2] + '.' + ipComponents[3];    // only set aUnobscuredHostName if we are looking at an IPv4 host name    if (this.isIPv4HostName(hostName))    {      aUnobscuredHostName.value = hostName;      return true;    }    return false;  },    /**   * Private helper method.   * @return true if aHostName is an IPv4 address   */  isIPv4HostName: function(aHostName)  {    var ipv4HostRegExp = new RegExp(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/);  // IPv4    // treat 0.0.0.0 as an invalid IP address    return ipv4HostRegExp.test(aHostName) && aHostName != '0.0.0.0';  },    /**    * Private helper method.   * @return true if unobscuredHostName is a local IP address.   */  isLocalIPAddress: function(unobscuredHostName)  {    var ipComponents = unobscuredHostName.value.split(".");    return ipComponents[0] == 10 ||           (ipComponents[0] == 192 && ipComponents[1] == 168) ||           (ipComponents[0] == 169 && ipComponents[1] == 254) ||           (ipComponents[0] == 172 && ipComponents[1] >= 16 && ipComponents[1] < 32);  },    /**    * If the current message has been identified as an email scam, prompts the user with a warning   * before allowing the link click to be processed. The warning prompt includes the unobscured host name   * of the http(s) url the user clicked on.   *   * @param aUrl the url    * @return true if the link should be allowed to load   */  warnOnSuspiciousLinkClick: function(aUrl)  {    // if the loaded message has been flagged as a phishing scam,     if (!gMessageNotificationBar.isFlagSet(kMsgNotificationPhishingBar))      return true;    var ioService = Components.classes["@mozilla.org/network/io-service;1"]                      .getService(Components.interfaces.nsIIOService);    var hrefURL;    // make sure relative link urls don't make us bail out    try {      hrefURL = ioService.newURI(aUrl, null, null);    } catch(ex) { return false; }        // only prompt for http and https urls    if (hrefURL.schemeIs('http') || hrefURL.schemeIs('https'))    {      // unobscure the host name in case it's an encoded ip address..      var unobscuredHostName = {};      unobscuredHostName.value = hrefURL.host;      this.hostNameIsIPAddress(hrefURL.host, unobscuredHostName);            var brandShortName = gBrandBundle.getString("brandShortName");      var titleMsg = gMessengerBundle.getString("confirmPhishingTitle");      var dialogMsg = gMessengerBundle.getFormattedString("confirmPhishingUrl",                         [brandShortName, unobscuredHostName.value], 2);      const nsIPS = Components.interfaces.nsIPromptService;      var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(nsIPS);      return !promptService.confirmEx(window, titleMsg, dialogMsg, nsIPS.STD_YES_NO_BUTTONS + nsIPS.BUTTON_POS_1_DEFAULT,                                      "", "", "", "", {}); /* the yes button is in position 0 */    }    return true; // allow the link to load  }};

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩日日夜夜| 久久精品国产99| 91伊人久久大香线蕉| 国产精品久久午夜夜伦鲁鲁| gogo大胆日本视频一区| 亚洲日本在线天堂| 欧美三片在线视频观看 | 精品写真视频在线观看| 日韩女优电影在线观看| 国产精一区二区三区| 国产日韩欧美电影| 91香蕉国产在线观看软件| 亚洲综合激情网| 欧美成人一区二区三区| 成人性生交大片免费看视频在线| 综合久久给合久久狠狠狠97色| 欧美中文字幕不卡| 精品一区二区免费看| 国产精品免费av| 9191成人精品久久| 国产成人在线看| 夜夜揉揉日日人人青青一国产精品| 欧美绝品在线观看成人午夜影视| 久久成人免费网| 国产精品丝袜一区| 91精品午夜视频| 懂色av中文一区二区三区| 亚洲一区二区三区四区在线| 日韩午夜精品电影| 91麻豆福利精品推荐| 麻豆精品一区二区综合av| **性色生活片久久毛片| 91麻豆精品国产91久久久久久| 国产精品白丝av| 性做久久久久久免费观看| 精品少妇一区二区三区日产乱码 | 蜜臂av日日欢夜夜爽一区| 国产精品美女视频| 日韩欧美一二区| av男人天堂一区| 精品在线免费视频| 成人av在线看| 日韩福利视频导航| ...中文天堂在线一区| 日韩精品一区二区三区swag| 在线免费观看一区| 懂色av中文一区二区三区| 毛片av一区二区| 艳妇臀荡乳欲伦亚洲一区| 日本一区二区高清| 精品剧情在线观看| 欧美顶级少妇做爰| 色嗨嗨av一区二区三区| 国产91精品精华液一区二区三区| 日韩精品午夜视频| 亚洲国产另类精品专区| 国产精品毛片a∨一区二区三区| 精品国产成人在线影院| 欧美日韩和欧美的一区二区| 日本丰满少妇一区二区三区| 成人激情校园春色| 波多野结衣一区二区三区 | 欧美日本精品一区二区三区| 色综合久久精品| www..com久久爱| 国产福利一区在线| 国产乱妇无码大片在线观看| 精品一区在线看| 免费观看久久久4p| 麻豆91免费看| 另类小说欧美激情| 免费美女久久99| 美女一区二区久久| 久久不见久久见中文字幕免费| 日本午夜精品视频在线观看| 日韩中文字幕91| 三级久久三级久久| 青青草国产成人av片免费| 偷拍自拍另类欧美| 捆绑调教美女网站视频一区| 久久er99精品| 国产成人啪免费观看软件| 国产高清在线观看免费不卡| 成人免费视频app| 91丨九色丨国产丨porny| 在线观看视频一区二区| 欧美日韩成人在线一区| 欧美一区二区三区不卡| 欧美成人video| 国产免费成人在线视频| 亚洲图片另类小说| 亚洲一区二区三区中文字幕在线| 日韩在线播放一区二区| 久久国产精品99精品国产 | 久久精品国产澳门| 激情五月激情综合网| 国产在线国偷精品产拍免费yy| 国产毛片精品视频| 91在线视频官网| 欧美精品日韩综合在线| 日韩午夜在线影院| 中文子幕无线码一区tr| 亚洲黄色小说网站| 日韩精品福利网| 国产成人亚洲综合a∨婷婷| 色婷婷精品大在线视频| 日韩欧美国产麻豆| 国产精品免费观看视频| 日韩精品成人一区二区三区| 欧美一区二区在线免费播放| 26uuu国产日韩综合| 亚洲人成小说网站色在线| 日本伊人精品一区二区三区观看方式| 国产美女精品一区二区三区| 在线观看国产日韩| wwwwww.欧美系列| 一区二区三区四区五区视频在线观看| 美女视频网站黄色亚洲| 91尤物视频在线观看| 日韩欧美一级二级三级久久久| 中文幕一区二区三区久久蜜桃| 亚洲国产aⅴ成人精品无吗| 国产一区二区导航在线播放| 欧美手机在线视频| 亚洲国产精品99久久久久久久久| 亚洲线精品一区二区三区| 国产一区二区不卡| 91麻豆精品久久久久蜜臀| 亚洲欧美在线观看| 狠狠网亚洲精品| 欧美日韩国产精品成人| 国产精品久久久久精k8| 九九精品一区二区| 欧美嫩在线观看| 亚洲日本中文字幕区| 国产成人啪免费观看软件| 欧美一区二区三区喷汁尤物| 亚洲精品免费一二三区| 国产91精品在线观看| 日韩三级视频中文字幕| 亚洲国产欧美另类丝袜| 99久久免费精品高清特色大片| 日韩一区二区三区观看| 亚洲一区二区高清| 91蜜桃视频在线| 中文字幕欧美日韩一区| 久久成人免费网| 欧美一个色资源| 奇米精品一区二区三区在线观看一| 91福利视频久久久久| 国产精品成人午夜| 高清beeg欧美| 国产日产欧美一区二区视频| 久久国产免费看| 日韩欧美国产综合在线一区二区三区| 午夜婷婷国产麻豆精品| 欧美在线制服丝袜| 一区二区在线电影| 91视频你懂的| 亚洲视频图片小说| 99riav一区二区三区| 中文字幕亚洲区| 99免费精品视频| 亚洲免费成人av| 在线观看一区日韩| 亚洲国产日韩一区二区| 欧美日韩在线直播| 日本中文字幕一区二区有限公司| 欧美日韩精品一二三区| 亚洲电影第三页| 91精品免费观看| 日本一不卡视频| 久久先锋资源网| 成人黄动漫网站免费app| 国产精品国产自产拍高清av王其| 99热在这里有精品免费| 一片黄亚洲嫩模| 制服丝袜亚洲播放| 毛片av中文字幕一区二区| 久久影音资源网| av在线不卡电影| 一区二区三区中文在线| 欧美日韩电影在线播放| 麻豆久久久久久| 国产精品午夜春色av| 色偷偷久久一区二区三区| 亚洲国产一区二区三区 | 国产精品69毛片高清亚洲| 中文字幕成人在线观看| 久久精品一区八戒影视| 99久久精品免费精品国产| 亚洲一区二区三区免费视频| 欧美一级片在线| 国产91精品在线观看| 亚洲国产视频直播| 日韩免费视频一区| www.欧美亚洲| 日韩电影在线观看网站| 国产日产精品1区| 欧美中文字幕一区|