diff --git a/extension/ReadMe.txt b/extension/ReadMe.txt index 02db0c8..da692d6 100644 --- a/extension/ReadMe.txt +++ b/extension/ReadMe.txt @@ -1,2 +1,2 @@ ua-parser.min.js: - https://github.com/faisalman/ua-parser-js/releases/tag/0.7.21 + https://github.com/faisalman/ua-parser-js/releases/tag/0.7.23 diff --git a/extension/manifest.json b/extension/manifest.json index 639a7d2..bac8607 100755 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -14,12 +14,8 @@ "webNavigation", "webRequest", "webRequestBlocking", - "contextualIdentities", "contextMenus" ], - "optional_permissions": [ - "cookies" - ], "icons": { "16": "data/icons/active/16.png", diff --git a/extension/ua-parser.min.js b/extension/ua-parser.min.js index edd4d7e..a63af9d 100644 --- a/extension/ua-parser.min.js +++ b/extension/ua-parser.min.js @@ -1,9 +1,9 @@ /*! - * UAParser.js v0.7.21 + * UAParser.js v0.7.23 * Lightweight JavaScript-based User-Agent string parser * https://github.com/faisalman/ua-parser-js * * Copyright © 2012-2019 Faisal Salman * Licensed under MIT License */ -(function(window,undefined){"use strict";var LIBVERSION="0.7.21",EMPTY="",UNKNOWN="?",FUNC_TYPE="function",UNDEF_TYPE="undefined",OBJ_TYPE="object",STR_TYPE="string",MAJOR="major",MODEL="model",NAME="name",TYPE="type",VENDOR="vendor",VERSION="version",ARCHITECTURE="architecture",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",EMBEDDED="embedded";var util={extend:function(regexes,extensions){var mergedRegexes={};for(var i in regexes){if(extensions[i]&&extensions[i].length%2===0){mergedRegexes[i]=extensions[i].concat(regexes[i])}else{mergedRegexes[i]=regexes[i]}}return mergedRegexes},has:function(str1,str2){if(typeof str1==="string"){return str2.toLowerCase().indexOf(str1.toLowerCase())!==-1}else{return false}},lowerize:function(str){return str.toLowerCase()},major:function(version){return typeof version===STR_TYPE?version.replace(/[^\d\.]/g,"").split(".")[0]:undefined},trim:function(str){return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}};var mapper={rgx:function(ua,arrays){var i=0,j,k,p,q,matches,match;while(i0){if(q.length==2){if(typeof q[1]==FUNC_TYPE){this[q[0]]=q[1].call(this,match)}else{this[q[0]]=q[1]}}else if(q.length==3){if(typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){this[q[0]]=match?q[1].call(this,match,q[2]):undefined}else{this[q[0]]=match?match.replace(q[1],q[2]):undefined}}else if(q.length==4){this[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined}}else{this[q]=match?match:undefined}}}}i+=2}},str:function(str,map){for(var i in map){if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j0){if(q.length==2){if(typeof q[1]==FUNC_TYPE){this[q[0]]=q[1].call(this,match)}else{this[q[0]]=q[1]}}else if(q.length==3){if(typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){this[q[0]]=match?q[1].call(this,match,q[2]):undefined}else{this[q[0]]=match?match.replace(q[1],q[2]):undefined}}else if(q.length==4){this[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined}}else{this[q]=match?match:undefined}}}}i+=2}},str:function(str,map){for(var i in map){if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j { } // const list = [ - ...require('./assets/bots.json'), ...require('./assets/list-01.json'), ...require('./assets/list-02.json'), ...require('./assets/list-03.json'), @@ -51,9 +50,24 @@ fs.readdir('./browsers/', async (err, files) => { ...require('./assets/list-07.json'), ...require('./assets/list-08.json'), ...require('./assets/list-09.json'), - ...require('./assets/list-10.json') + ...require('./assets/list-10.json'), + ...require('./assets/list-11.json') ].filter((s, i, l) => l.indexOf(s) === i && ['fb_iab', 'fbsv', 'w3m', 'elinks'].some(k => s.toLowerCase().indexOf(k) !== -1) === false); for (const ua of list) { + if (ua.startsWith('Mozilla/5.0 ') === false) { + continue; + } + if (ua.length < 10) { + console.log('[short agent]\t', ua); + } + if (ua.length > 200) { + console.log('[long agent]\t', ua); + } + if (ua.indexOf('http') !== -1) { + if (ua.indexOf('QtWeb') === -1 && ua.toLowerCase().indexOf('crawler') === -1 && ua.toLowerCase().indexOf('bot') === -1 && ua.toLowerCase().indexOf('spider') === -1) { + console.log('[contains HTTP]\t', ua); + } + } parser.setUA(ua); const o = parser.getResult(); if (o.browser.name && o.os.name) { diff --git a/node/map.json b/node/map.json index f6d364d..accb9cc 100644 --- a/node/map.json +++ b/node/map.json @@ -1 +1 @@ -{"browser":["Bot","IE","Konqueror","Opera","Firefox","Chrome","Mobile Safari","IEMobile","Safari","Android Browser","Opera Mobi","Opera Mini","UCBrowser","Puffin","Samsung Browser","Yandex","MIUI Browser","Edge","WebKit","Blazer","BOLT","Fennec","GoBrowser","Maemo Browser","Minimo","Kindle","Opera Mi","Skyfire","Chromium","Avant ","Maxthon","Arora","Mozilla","Epiphany","Camino","Chimera","Comodo Dragon","Conkeror","Firebird","Swiftfox","Netscape","Flock","iCab","Iceape","IceCat","IceWeasel","Iron","K-Meleon","Links","Lunascape","Lynx","Midori","KHTML","Mosaic","NetSurf","OmniWeb","Opera Tablet","PaleMoon","Phoenix","RockMelt","SeaMonkey","Slim","IceDragon","Waterfox","GSA","Vivaldi","Avast Secure Browser","Chrome WebView","QQBrowser","Iridium","AVG Secure Browser","Basilisk","Chrome Headless","baiduboxapp","Silk","Opera Touch"],"os":["Misc","Windows","Linux","Mac OS","Android","iOS","Windows Phone","BlackBerry","Symbian","Windows Phone OS","OpenBSD","Unix","Ubuntu","Fedora","Debian","BeOS","Haiku","Solaris","Chromium OS","NetBSD","FreeBSD","Slackware","SUSE","Gentoo","Mageia","CentOS","Mint","DragonFly","Kubuntu","Mandriva","Zenwalk","GNU","OS/2","AIX","QNX","RISC OS","Nintendo","OpenSolaris","AmigaOS","BSD","OpenVMS"],"matching":{"bot":["misc"],"ie":["windows","mac os","solaris","linux","unix"],"konqueror":["linux","freebsd","fedora","kubuntu","slackware","openbsd","dragonfly","windows","solaris","netbsd","suse","debian"],"opera":["mac os","windows","android","symbian","linux","ubuntu","debian","mint","freebsd","nintendo","opensolaris","solaris","openbsd","kubuntu","unix"],"firefox":["mac os","windows","android","ios","ubuntu","linux","fedora","openbsd","netbsd","mageia","freebsd","gentoo","suse","centos","slackware","mint","dragonfly","solaris","kubuntu","mandriva","beos","debian"],"chrome":["mac os","windows","android","linux","openbsd","chromium os","netbsd","freebsd","slackware","suse","ubuntu","debian","ios","fedora","unix"],"mobile safari":["ios","blackberry","windows","android","mac os"],"iemobile":["windows phone","windows phone os","windows"],"safari":["mac os","android","symbian","windows","linux","ios","bsd","netbsd"],"android browser":["android","windows"],"opera mobi":["android","symbian","windows","mac os","linux"],"opera mini":["ios","symbian","blackberry","android","windows","mac os","linux","unix"],"ucbrowser":["android","windows"],"puffin":["android"],"samsung browser":["android","linux"],"yandex":["android","windows","mac os","linux"],"miui browser":["android"],"edge":["windows phone","windows","mac os"],"webkit":["blackberry","symbian","mac os","windows","linux","unix","ios"],"blazer":["windows"],"bolt":["windows"],"fennec":["android","windows","linux","mac os"],"gobrowser":["android"],"maemo browser":["linux"],"minimo":["linux","windows","openbsd"],"kindle":["linux","android"],"opera mi":["windows"],"skyfire":["mac os"],"chromium":["ubuntu","linux","netbsd"],"avant ":["windows"],"maxthon":["windows"],"arora":["linux","windows"],"mozilla":["windows","debian","linux","ubuntu","mac os","openbsd","beos","haiku","solaris","suse","fedora","gentoo","slackware","mint","mandriva","kubuntu","centos","freebsd","zenwalk","os/2","aix","qnx","netbsd","android","openvms","unix"],"epiphany":["linux","ubuntu","openbsd","freebsd","suse","fedora","debian","gentoo","solaris"],"camino":["mac os"],"chimera":["mac os"],"comodo dragon":["windows","linux"],"conkeror":["debian","windows","linux"],"firebird":["windows","mac os","solaris","linux"],"swiftfox":["linux"],"netscape":["windows","mac os","linux","solaris","aix"],"flock":["mac os","windows","linux"],"icab":["mac os","windows"],"iceape":["linux"],"icecat":["linux"],"iceweasel":["linux","debian","gentoo","ubuntu","windows"],"iron":["windows","linux","mac os"],"k-meleon":["windows","linux","freebsd"],"links":["unix","linux","gentoo","openbsd","netbsd","freebsd","mac os","solaris","debian"],"lunascape":["windows"],"lynx":["gnu"],"midori":["linux","freebsd","windows","netbsd"],"khtml":["windows"],"mosaic":["windows","aix","solaris"],"netsurf":["risc os","linux","netbsd"],"omniweb":["mac os"],"opera tablet":["windows","symbian"],"palemoon":["windows"],"phoenix":["linux","windows","mac os"],"rockmelt":["windows","mac os"],"seamonkey":["windows","linux","os/2","mac os","freebsd","openbsd","fedora","suse","mandriva","gentoo","beos","haiku","amigaos","centos","netbsd"],"slim":["windows","android"],"icedragon":["windows"],"waterfox":["windows","linux","mac os"],"gsa":["ios"],"vivaldi":["windows","linux","netbsd","mac os"],"avast secure browser":["windows"],"chrome webview":["android"],"qqbrowser":["windows"],"iridium":["windows"],"avg secure browser":["windows"],"basilisk":["windows"],"chrome headless":["linux"],"baiduboxapp":["android"],"silk":["mac os","android","linux"],"opera touch":["ios"]}} \ No newline at end of file +{"browser":["Opera","Firefox","Chrome","IE","Mobile Safari","IEMobile","Safari","Android Browser","Opera Mini","UCBrowser","Puffin","Samsung Browser","Yandex","MIUI Browser","Edge","WebKit","BOLT","Fennec","GoBrowser","Maemo Browser","Minimo","Skyfire","Chromium","Arora","Mozilla","Epiphany","Camino","Chimera","Comodo Dragon","Conkeror","Firebird","Swiftfox","Netscape","Flock","iCab","Iceape","IceCat","IceWeasel","Iron","K-Meleon","Konqueror","Lunascape","Maxthon","Midori","KHTML","OmniWeb","PaleMoon","Phoenix","RockMelt","SeaMonkey","IceDragon","Waterfox","GSA","Bot","Whale","Vivaldi","Avast Secure Browser","Chrome WebView","QQBrowser","Iridium","AVG Secure Browser","Basilisk","Chrome Headless","baiduboxapp","Slim","Silk","Kindle","Opera Touch","TizenBrowser"],"os":["Mac OS","Windows","Android","iOS","Windows Phone","BlackBerry","Symbian","Linux","Windows Phone OS","OpenBSD","Ubuntu","Fedora","Debian","BeOS","Haiku","Solaris","Chromium OS","NetBSD","FreeBSD","Slackware","SUSE","Gentoo","Mageia","CentOS","Mint","DragonFly","Kubuntu","Mandriva","Zenwalk","OS/2","AIX","QNX","AmigaOS","Misc","Unix","BSD","OpenVMS","Tizen"],"matching":{"opera":["mac os","windows","android","symbian","linux","solaris"],"firefox":["mac os","windows","android","ios","ubuntu","linux","fedora","openbsd","netbsd","mageia","freebsd","gentoo","suse","centos","slackware","mint","dragonfly","solaris","kubuntu","mandriva","beos","debian"],"chrome":["mac os","windows","android","linux","openbsd","chromium os","netbsd","freebsd","slackware","suse","ubuntu","debian","ios","fedora","unix"],"ie":["windows","mac os","solaris"],"mobile safari":["ios","android","mac os"],"iemobile":["windows phone","windows phone os"],"safari":["mac os","blackberry","android","windows","linux","ios","bsd","netbsd"],"android browser":["android","windows"],"opera mini":["ios"],"ucbrowser":["android","windows"],"puffin":["android"],"samsung browser":["android","linux","tizen"],"yandex":["android","windows","mac os","linux"],"miui browser":["android"],"edge":["windows phone","windows","mac os"],"webkit":["blackberry","symbian","mac os","windows","linux","ios"],"bolt":["windows"],"fennec":["android","windows","linux","mac os"],"gobrowser":["android"],"maemo browser":["linux"],"minimo":["linux","windows","openbsd"],"skyfire":["mac os"],"chromium":["ubuntu","linux","netbsd","windows"],"arora":["linux","windows"],"mozilla":["windows","debian","linux","ubuntu","mac os","openbsd","beos","haiku","solaris","suse","fedora","slackware","mint","mandriva","kubuntu","gentoo","centos","freebsd","zenwalk","os/2","aix","qnx","netbsd","android","openvms","unix"],"epiphany":["linux","ubuntu","openbsd","freebsd","suse","fedora","debian","gentoo","solaris"],"camino":["mac os"],"chimera":["mac os"],"comodo dragon":["windows","linux"],"conkeror":["debian","windows","linux"],"firebird":["windows","mac os","solaris","linux"],"swiftfox":["linux"],"netscape":["windows","mac os","linux","solaris","aix"],"flock":["mac os","windows","linux"],"icab":["mac os"],"iceape":["linux"],"icecat":["linux"],"iceweasel":["linux","debian","gentoo","ubuntu","windows"],"iron":["windows","linux","mac os"],"k-meleon":["windows","linux","freebsd"],"konqueror":["linux","freebsd","fedora","kubuntu","slackware","openbsd","dragonfly","windows","solaris","netbsd","suse","debian"],"lunascape":["windows"],"maxthon":["windows"],"midori":["linux","netbsd"],"khtml":["windows"],"omniweb":["mac os"],"palemoon":["windows"],"phoenix":["linux","windows","mac os"],"rockmelt":["windows","mac os"],"seamonkey":["windows","linux","os/2","mac os","freebsd","openbsd","fedora","suse","mandriva","gentoo","beos","haiku","amigaos","centos","netbsd"],"icedragon":["windows"],"waterfox":["windows","linux","mac os"],"gsa":["ios"],"bot":["misc"],"whale":["windows"],"vivaldi":["windows","linux","netbsd","mac os"],"avast secure browser":["windows"],"chrome webview":["android"],"qqbrowser":["windows"],"iridium":["windows"],"avg secure browser":["windows"],"basilisk":["windows"],"chrome headless":["linux"],"baiduboxapp":["android"],"slim":["android"],"silk":["mac os","android","linux"],"kindle":["android","linux"],"opera touch":["ios"],"tizenbrowser":["tizen"]}} \ No newline at end of file