mirror of
https://github.com/DarkSecDevelopers/HiddenEye-Legacy.git
synced 2024-03-22 21:12:55 +08:00
21 lines
14 KiB
Plaintext
21 lines
14 KiB
Plaintext
|
(function(i,s){"use strict"
|
||
|
var e="model",o="name",r="type",a="vendor",n="version",d="mobile",t="tablet",l={extend:function(i,s){var e={}
|
||
|
for(var o in i)s[o]&&s[o].length%2==0?e[o]=s[o].concat(i[o]):e[o]=i[o]
|
||
|
return e},has:function(i,s){return"string"==typeof i&&-1!==s.toLowerCase().indexOf(i.toLowerCase())},lowerize:function(i){return i.toLowerCase()},major:function(i){return"string"==typeof i?i.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(i){return i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},w={rgx:function(i,s){for(var e,o,r,a,n,d,t=0;t<s.length&&!n;){var l=s[t],w=s[t+1]
|
||
|
for(e=o=0;e<l.length&&!n;)if(n=l[e++].exec(i))for(r=0;r<w.length;r++)d=n[++o],"object"==typeof(a=w[r])&&a.length>0?2==a.length?"function"==typeof a[1]?this[a[0]]=a[1].call(this,d):this[a[0]]=a[1]:3==a.length?"function"!=typeof a[1]||a[1].exec&&a[1].test?this[a[0]]=d?d.replace(a[1],a[2]):void 0:this[a[0]]=d?a[1].call(this,d,a[2]):void 0:4==a.length&&(this[a[0]]=d?a[3].call(this,d.replace(a[1],a[2])):void 0):this[a]=d||void 0
|
||
|
t+=2}},str:function(i,s){for(var e in s)if("object"==typeof s[e]&&s[e].length>0){for(var o=0;o<s[e].length;o++)if(l.has(s[e][o],i))return"?"===e?void 0:e}else if(l.has(s[e],i))return"?"===e?void 0:e
|
||
|
return i}},u={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},c={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[o,n],[/(opios)[\/\s]+([\w\.]+)/i],[[o,"Opera Mini"],n],[/\s(opr)\/([\w\.]+)/i],[[o,"Opera"],n],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[o,n],[/(konqueror)\/([\w\.]+)/i],[[o,"Konqueror"],n],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[o,"IE"],n],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[o,"Edge"],n],[/(yabrowser)\/([\w\.]+)/i],[[o,"Yandex"],n],[/(puffin)\/([\w\.]+)/i],[[o,"Puffin"],n],[/(focus)\/([\w\.]+)/i],[[o,"Firefox Focus"],n],[/(opt)\/([\w\.]+)/i],[[o,"Opera Touch"],n],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[o,"UCBrowser"],n],[/(comodo_dragon)\/([\w\.]+)/i],[[o,/_/g," "],n],[/(windowswechat qbcore)\/([\w\.]+)/i],[[o,"WeChat(Win) Desktop"],n],[/(micromessenger)\/([\w\.]+)/i],[[o,"WeChat"],n],[/(brave)\/([\w\.]+)/i],[[o,"Brave"],n],[/(qqbrowserlite)\/([\w\.]+)/i],[o,n],[/(QQ)\/([\d\.]+)/i],[o,n],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[o,n],[/(BIDUBrowser)[\/\s]?([\w\.]+)/i],[o,n],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[o,n],[/(MetaSr)[\/\s]?([\w\.]+)/i],[o],[/(LBBROWSER)/i],[o],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[n,[o,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[n,[o,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[o,n],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[n,[o,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[o,/(.+)/,"$1 WebView"],n],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[o,/(.+(?:g|us))(.+)/,"$1 $2"],n],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[n,[o,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[o,"Sailfish Browser"],n],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[o,n],[/(dolfin)\/([\w\.]+)/i],[[o,"Dolphin"],n],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[o,"Chrome"],n],[/(coast)\/([\w\.]+)/i],[[o,"Opera Coast"],n],[/fxios\/([\w\.-]+)/i],[n,[o,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[n,[o,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[n,o],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[o,"GSA"],n],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[o,[n,w.str,u.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[o,n],[/(navigator|netscape)\/([\w\.-]+)/i],[[o,"Netscape"],n],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[o,n]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",l.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",l.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",l.lowerize]]],device
|
||
|
var o=s||(i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=e?l.extend(c,e):c
|
||
|
return this.getBrowser=function(){var i={name:void 0,version:void 0}
|
||
|
return w.rgx.call(i,o,r.browser),i.major=l.major(i.version),i},this.getCPU=function(){var i={architecture:void 0}
|
||
|
return w.rgx.call(i,o,r.cpu),i},this.getDevice=function(){var i={vendor:void 0,model:void 0,type:void 0}
|
||
|
return w.rgx.call(i,o,r.device),i},this.getEngine=function(){var i={name:void 0,version:void 0}
|
||
|
return w.rgx.call(i,o,r.engine),i},this.getOS=function(){var i={name:void 0,version:void 0}
|
||
|
return w.rgx.call(i,o,r.os),i},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return o},this.setUA=function(i){return o=i,this},this}
|
||
|
m.VERSION="0.7.20",m.BROWSER={NAME:o,MAJOR:"major",VERSION:n},m.CPU={ARCHITECTURE:"architecture"},m.DEVICE={MODEL:e,VENDOR:a,TYPE:r,CONSOLE:"console",MOBILE:d,SMARTTV:"smarttv",TABLET:t,WEARABLE:"wearable",EMBEDDED:"embedded"},m.ENGINE={NAME:o,VERSION:n},m.OS={NAME:o,VERSION:n},"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports.UAParser=m):"function"==typeof define&&define.amd?define(function(){return m}):i&&(i.UAParser=m)
|
||
|
var b=i&&(i.jQuery||i.Zepto)
|
||
|
if(void 0!==b&&!b.ua){var p=new m
|
||
|
b.ua=p.getResult(),b.ua.get=function(){return p.getUA()},b.ua.set=function(i){p.setUA(i)
|
||
|
var s=p.getResult()
|
||
|
for(var e in s)b.ua[e]=s[e]}}})("object"==typeof window?window:this)
|