├── README.md └── snort.yml /README.md: -------------------------------------------------------------------------------- 1 | # Snort 2 | 3 | A collection of terrible UA sniffs found online. A historical document of shooting oneself in the foot, if you will. 4 | 5 | ## Pull Requests 6 | 7 | Pull requests are welcome. It helps if it's valid [YAML](http://yaml.org/spec/1.2/spec.html) too. 8 | 9 | ### Special Thanks 10 | To nlogax for the name. -------------------------------------------------------------------------------- /snort.yml: -------------------------------------------------------------------------------- 1 | site: 2 | name: cornify.com 3 | script: http://www.cornify.com/js/rainbow.js 4 | date: 2011-01-26 5 | sniff: | 6 | // Only create rainbow canvas if browser supports the canvas tag. 7 | var rainbowCanvas; 8 | function startRainbow(){ 9 | var canvas = document.createElement('canvas'); 10 | var isFirefox = (/firefox|minefield/i.test(navigator.userAgent)); 11 | //isFirefox = false; 12 | if (!!canvas.getContext && !isFirefox) { 13 | rainbowCanvas = new RainbowCanvas(); 14 | rainbowCanvas.init(canvas); 15 | } 16 | } 17 | 18 | site: 19 | name: dynamat.com 20 | script: http://dynamat.com/trivantis.js 21 | date: 2011-01-26 22 | sniff: | 23 | function BrowserProps() { 24 | var name = navigator.appName 25 | 26 | if (name=="Netscape") name = "ns" 27 | else if (name=="Microsoft Internet Explorer") name = "ie" 28 | 29 | this.v = parseInt(navigator.appVersion,10) 30 | this.ns = (name=="ns" && this.v>=4) 31 | this.ns4 = (this.ns && this.v==4) 32 | this.ns5 = (this.ns && this.v==5) 33 | this.nsMac = (this.ns && navigator.platform.indexOf("Mac") >= 0 ) 34 | this.ie = (name=="ie" && this.v>=4) 35 | this.ie4 = (this.ie && navigator.appVersion.indexOf('MSIE 4')>0) 36 | this.ie5 = (this.ie && navigator.appVersion.indexOf('MSIE 5')>0) 37 | this.ieMac = (this.ie && navigator.platform.indexOf("Mac") >= 0 ) 38 | this.op = navigator.userAgent.indexOf("Opera")!=-1 39 | this.min = (this.ns||this.ie) 40 | this.Mac = (navigator.platform.indexOf("Mac") >= 0) 41 | this.activeX = ( this.ie ) ? true : false; 42 | this.wmpVersion = 6; // default version number we only support 7 and up 43 | var player = null; 44 | try 45 | { 46 | if(window.ActiveXObject) 47 | player = new ActiveXObject("WMPlayer.OCX.7"); 48 | else if (window.GeckoActiveXObject) 49 | player = new GeckoActiveXObject("WMPlayer.OCX.7"); 50 | else 51 | player = navigator.mimeTypes["application/x-mplayer2"].enabledPlugin; 52 | } 53 | catch(e) 54 | { 55 | // Handle error only if title has wmp-- no WMP control 56 | } 57 | if( player && player.versionInfo ) { 58 | this.wmpVersion = player.versionInfo.slice(0,player.versionInfo.indexOf('.')); 59 | } 60 | } 61 | 62 | is = new BrowserProps() 63 | inline: | 64 | if( !is.min ) 65 | document.write( 'Your browser does not support dynamic html. Please download a current version of either Microsoft Internet Explorer or Mozilla Firefox and try visiting our site again. Thank You.

' ) 66 | 67 | site: 68 | name: philosophy.com 69 | script: http://www.philosophy.com/wcsstore/RosettaStore/javascript/BrowserDetect.js 70 | date: 2011-01-26 71 | sniff: | 72 | var BrowserDetect = { 73 | init: function () { 74 | this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; 75 | this.version = this.searchVersion(navigator.userAgent) 76 | || this.searchVersion(navigator.appVersion) 77 | || "an unknown version"; 78 | this.OS = this.searchString(this.dataOS) || "an unknown OS"; 79 | }, 80 | searchString: function (data) { 81 | for (var i=0;i= 7){ 197 | //Browser Supported 198 | document.writeln('