HTTP-BrowserDetect-1.68000755000765000024 012271355404 14211 5ustar00olafstaff000000000000TODO100644000765000024 35712271355404 14747 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68 - Test script can be cleaned up quite a lot by using the match/no_match for all boolean tests. (Robin Smidsrød - 2009-10-20) - Consider getting more UA strings from http://www.user-agents.org/. (Robin Smidsrød - 2009-10-20) README100644000765000024 3421712271355404 15201 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68NAME HTTP::BrowserDetect - Determine Web browser, version, and platform from an HTTP user agent string VERSION version 1.68 SYNOPSIS use HTTP::BrowserDetect; my $browser = HTTP::BrowserDetect->new($user_agent_string); # Detect operating system if ($browser->windows) { if ($browser->winnt) ... if ($browser->win95) ... } print $browser->mac; # Detect browser vendor and version print $browser->netscape; print $browser->ie; if (browser->major(4)) { if ($browser->minor() > .5) { ... } } if ($browser->version() > 4) { ...; } DESCRIPTION The HTTP::BrowserDetect object does a number of tests on an HTTP user agent string. The results of these tests are available via methods of the object. This module is based upon the JavaScript browser detection code available at . CONSTRUCTOR AND STARTUP new() HTTP::BrowserDetect->new( $user_agent_string ) The constructor may be called with a user agent string specified. Otherwise, it will use the value specified by $ENV{'HTTP_USER_AGENT'}, which is set by the web server when calling a CGI script. You may also use a non-object-oriented interface. For each method, you may call HTTP::BrowserDetect::method_name(). You will then be working with a default HTTP::BrowserDetect object that is created behind the scenes. SUBROUTINES/METHODS user_agent() Returns the value of the user agent string. Calling this method with a parameter has now been deprecated and this feature will be removed in an upcoming release. country() Returns the country string as it may be found in the user agent string. This will be in the form of an upper case 2 character code. ie: US, DE, etc language() Returns the language string as it is found in the user agent string. This will be in the form of an upper case 2 character code. ie: EN, DE, etc device() Returns the method name of the actual hardware, if it can be detected. Currently returns one of: android, audrey, blackberry, dsi, iopener, ipad, iphone, ipod, kindle, n3ds, palm, ps3, psp, wap, webos. Returns "undef" if no hardware can be detected device_name() Returns a human formatted version of the hardware device name. These names are subject to change and are really meant for display purposes. You should use the device() method in your logic. Returns one of: Android, Audrey, BlackBerry, Nintendo DSi, iopener, iPad, iPhone, iPod, Amazon Kindle, Nintendo 3DS, Palm, Sony PlayStation 3, Sony Playstation Portable, WAP capable phone, webOS. Also Windows-based smartphones will output various different names like HTC T7575. Returns "undef" if this is not a device or if no device name can be detected. browser_properties() Returns a list of the browser properties, that is, all of the tests that passed for the provided user_agent string. Operating systems, devices, browser names, mobile and robots are all browser properties. Detecting Browser Version Please note that that the version(), major() and minor() methods have been superceded as of release 1.07 of this module. They are not yet deprecated, but should be replaced with public_version(), public_major() and public_minor() in new development. The reasoning behind this is that version() method will, in the case of Safari, return the Safari/XXX numbers even when Version/XXX numbers are present in the UserAgent string. Because this behaviour has been in place for so long, some clients may have come to rely upon it. So, it has been retained in the interest of "bugwards compatibility", but in almost all cases, the numbers returned by public_version(), public_major() and public_minor() will be what you are looking for. public_version() Returns the browser version as a floating-point number. public_major() Returns the integer portion of the browser version. public_minor() Returns the decimal portion of the browser version as a floating-point number less than 1. For example, if the version is 4.05, this method returns .05; if the version is 4.5, this method returns .5. On occasion a version may have more than one decimal point, such as 'Wget/1.4.5'. The minor version does not include the second decimal point, or any further digits or decimals. version($version) Returns the version as a floating-point number. If passed a parameter, returns true if it is equal to the version specified by the user agent string. major($major) Returns the integer portion of the browser version. If passed a parameter, returns true if it equals the browser major version. minor($minor) Returns the decimal portion of the browser version as a floating-point number less than 1. For example, if the version is 4.05, this method returns .05; if the version is 4.5, this method returns .5. This is a change in behavior from previous versions of this module, which returned a string. If passed a parameter, returns true if equals the minor version. On occasion a version may have more than one decimal point, such as 'Wget/1.4.5'. The minor version does not include the second decimal point, or any further digits or decimals. beta($beta) Returns any the beta version, consisting of any non-numeric characters after the version number. For instance, if the user agent string is 'Mozilla/4.0 (compatible; MSIE 5.0b2; Windows NT)', returns 'b2'. If passed a parameter, returns true if equal to the beta version. If the beta starts with a dot, it is thrown away. Detecting Rendering Engine engine_string() Returns one of the following: Gecko, KHTML, Trident, MSIE, NetFront Returns "undef" if no string can be found. engine_version() Returns the version number of the rendering engine. Currently this only returns a version number for Gecko and Trident. Returns "undef" for all other engines. The output is simply "engine_major" added with "engine_minor". engine_major() Returns the major version number of the rendering engine. Currently this only returns a version number for Gecko and Trident. Returns "undef" for all other engines. engine_minor() Returns the minor version number of the rendering engine. Currently this only returns a version number for Gecko and Trident. Returns "undef" for all other engines. Detecting OS Platform and Version The following methods are available, each returning a true or false value. Some methods also test for the operating system version. The indentations below show the hierarchy of tests (for example, win2k is considered a type of winnt, which is a type of win32) windows() win16 win3x win31 win32 winme win95 win98 winnt win2k winxp win2k3 winvista win7 win8 win8_0 win8_1 wince winphone winphone7 winphone7_5 winphone8 dotnet() firefoxos() mac() mac68k macppc macosx ios os2() rimtabletos() unix() sun sun4 sun5 suni86 irix irix5 irix6 hpux hpux9 hpux10 aix aix1 aix2 aix3 aix4 linux sco unixware mpras reliant dec sinix freebsd bsd vms() amiga() ps3gameos() pspgameos() It may not be possibile to detect Win98 in Netscape 4.x and earlier. On Opera 3.0, the userAgent string includes "Windows 95/NT4" on all Win32, so you can't distinguish between Win95 and WinNT. os_string() Returns one of the following strings, or undef. This method exists solely for compatibility with the HTTP::Headers::UserAgent module. Win95, Win98, WinNT, Win2K, WinXP, Win2k3, WinVista, Win7, Win8, Win8.1, Windows Phone, Mac, Mac OS X, iOS, Win3x, OS2, Unix, Linux, Firefox OS, Playstation 3 GameOS, Playstation Portable GameOS, RIM Tablet OS Detecting Browser Vendor The following methods are available, each returning a true or false value. Some methods also test for the browser version, saving you from checking the version separately. aol aol3 aol4 aol5 aol6 chrome curl emacs firefox gecko icab ie ie3 ie4 ie4up ie5 ie55 ie6 ie7 ie8 ie9 ie10 ie11 ie_compat_mode The ie_compat_mode is used to determine if the IE user agent is for the compatibility mode view, in which case the real version of IE is higher than that detected. The true version of IE can be inferred from the version of Trident in the engine_version method. java konqueror lotusnotes lynx links elinks mobile_safari mosaic mozilla neoplanet neoplanet2 netfront netscape nav2 nav3 nav4 nav4up nav45 nav45up navgold nav6 nav6up opera opera3 opera4 opera5 opera6 opera7 realplayer realplayer_browser The realplayer method above tests for the presence of either the RealPlayer plug-in "(r1 " or the browser "RealPlayer". To preserve "bugwards compatibility" and prevent false reporting, browser_string calls this method which ignores the "(r1 " plug-in signature. safari staroffice webtv Netscape 6, even though its called six, in the User-Agent string has version number 5. The nav6 and nav6up methods correctly handle this quirk. The Firefox test correctly detects the older-named versions of the browser (Phoenix, Firebird). browser_string() Returns undef on failure. Otherwise returns one of the following: Netscape, Firefox, Safari, Chrome, MSIE, WebTV, AOL Browser, Opera, Mosaic, Lynx, Links, ELinks, RealPlayer, IceWeasel, curl, puf, NetFront, Mobile Safari, BlackBerry. gecko_version() If a Gecko rendering engine is used (as in Mozilla or Firefox), returns the version of the renderer (e.g. 1.3a, 1.7, 1.8) This might be more useful than the particular browser name or version when correcting for quirks in different versions of this rendering engine. If no Gecko browser is being used, or the version number can't be detected, returns undef. Detecting Other Devices The following methods are available, each returning a true or false value. android audrey avantgo blackberry dsi iopener iphone ipod ipad kindle n3ds obigo palm webos wap psp ps3 mobile() Returns true if the browser appears to belong to a handheld device. tablet() Returns true if the browser appears to belong to a tablet device. robot() Returns true if the user agent appears to be a robot, spider, crawler, or other automated Web client. The following additional methods are available, each returning a true or false value. This is by no means a complete list of robots that exist on the Web. ahrefs altavista askjeeves baidu facebook getright google googleadsbot googleadsense googlemobile infoseek linkexchange lwp lycos msn (same as bing) puf slurp webcrawler wget yahoo yandex yandeximages CREDITS Lee Semel, lee@semel.net (Original Author) Peter Walsham (co-maintainer) Olaf Alders, "olaf at wundercounter.com" (co-maintainer) ACKNOWLEDGEMENTS Thanks to the following for their contributions: cho45 Leonardo Herrera Denis F. Latypoff merlynkline Simon Waters Toni Cebrin Florian Merges david.hilton.p Steve Purkis Andrew McGregor Robin Smidsrod Richard Noble Josh Ritter Mike Clarke Marc Sebastian Pelzer Alexey Surikov Maros Kollar Jay Rifkin Luke Saunders Jacob Rask Heiko Weber Jon Jensen Jesse Thompson Graham Barr Enrico Sorcinelli Olivier Bilodeau Yoshiki Kurihara Paul Findlay Uwe Voelker Douglas Christopher Wilson John Oatis Atsushi Kato Ronald J. Kimball Bill Rhodes Thom Blake Aran Deltac yeahoffline David Ihnen Hao Wu Perlover TO DO The "_engine()" method currently only handles Gecko and Trident. It needs to be expanded to handle other rendering engines. POD coverage is also not 100%. SEE ALSO "Browser ID (User-Agent) Strings", HTML::ParseBrowser. SUPPORT You can find documentation for this module with the perldoc command. perldoc HTTP::BrowserDetect You can also look for information at: * GitHub Source Repository * Reporting Issues * AnnoCPAN: Annotated CPAN documentation * CPAN Ratings * Search CPAN BUGS AND LIMITATIONS The biggest limitation at this point is the test suite, which really needs to have many more UserAgent strings to test against. CONTRIBUTING Patches are certainly welcome, with many thanks for the excellent contributions which have already been received. The preferred method of patching would be to fork the GitHub repo and then send me a pull request, but plain old patch files are also welcome. If you're able to add test cases, this will speed up the time to release your changes. Just edit t/useragents.json so that the test coverage includes any changes you have made. Please contact me if you have any questions. This distribution uses Dist::Zilla. If you're not familiar with this module, please see for some helpful tips to get you started. AUTHORS * Lee Semel * Peter Walsham * Olaf Alders (current maintainer) COPYRIGHT AND LICENSE This software is copyright (c) 2013 by Lee Semel. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Changes100644000765000024 2602712271355404 15614 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68Revision history for Perl extension HTTP::BrowserDetect. 1.68 2014-01-26 23:05:14 America/Toronto - Adds Yandex & Ahrefs bots (Perlover) 1.67 2014-01-22 16:18:36 America/Toronto - Adds detection for tablet Firefox OS (Douglas Christopher Wilson) 1.66 2013-12-17 11:37:20 America/Toronto - Adds detection for IE Compatibility View (Douglas Christopher Wilson) 1.65 2013-12-10 21:08:07 America/Toronto - Adds os_version for FireFox in OS X (Hao Wu) 1.64 2013-11-25 10:10:23 America/Toronto - Adds detection for Opera 15+ (Douglas Christopher Wilson) 1.63 2013-11-21 21:39:46 America/Toronto - Adds detection for Internet Explorer 11 (Douglas Christopher Wilson) - Adds detection for Windows 8.1 (Douglas Christopher Wilson) 1.62 2013-10-25 14:40:57 America/Toronto - Returns explicit undef more consistently (David Ihnen) 1.61 2013-09-06 15:47:57 America/Toronto - Reverts a commit that was causing a test to fail when a warning about File::Slurp was detected 1.60 2013-08-29 23:02:13 America/Toronto - Fixes bug where "Linux" rather than "Android" was returned as os_string for Android devices. 1.59 2013-08-18 00:38:21 America/Toronto - Revert 1.57's behaviour of returning a robot name in browser_string. - Fix bug where OS X identied as just Mac in os_string. - Add linkchecker, YandexImages and archive.org_bot bots. - Add undocumented os_version() for OS X, winPhone, Android, iOS, Firefox OS. 1.58 2013-08-16 23:37:23 America/Toronto - Break up parsing into smaller chunks. - Return better names for Googlebot News, Images and Video. - Fix bug where Yahoo! Slurp reported as Firefox. 1.57 2013-08-16 01:21:35 America/Toronto - Make internals a little less quirky. - Stop returning explicit undef for browser_string and os_string. (Why would you ever call these in list context?) - Return name of robot for browser_string when browser is, in fact, a bot. Previous behaviour was to return undef or something just really wrong. 1.56 2013-08-15 01:02:32 America/Toronto - Adds experimental and undocumented robot_name method. 1.55 2013-07-22 23:06:40 America/Toronto - Add all current Google robot user agents (Douglas Christopher Wilson) 1.54 2013-07-21 - Fix generic version parsing not to cross whitespace (Douglas Christopher Wilson) - Compare Safari build numbers by parts instead of floats (Douglas Christopher Wilson) - Removes Exporter 1.53 2013-07-19 - Detect IE on ARM as tablet (Douglas Christopher Wilson) - Add BlackBerry PlayBook detection (Douglas Christopher Wilson) - Split version parsing into two expressions (Douglas Christopher Wilson) 1.52 2013-05-03 - Fixes warning when MSIE does not have a minor version - Simplifies MSIE version regex logic - Removes a test for AskJeeves browser 1.51 2013-04-25 - Adds Android tablet detection (yeahoffline ) 1.50 2013-03-01 - Adds Firefox OS detection (Douglas Christopher Wilson) 1.49 2013-02-27 - Fixes language/country detectio for Safari (Douglas Christopher Wilson) 1.48 2013-02-26 - Adds Obigo browser detection (Douglas Christopher Wilson) 1.47 2012-12-10 - Distinguishes version of Windows Phone (Douglas Christopher Wilson) - Enables warnings and traps warnings in tests (Douglas Christopher Wilson) 1.46 2012-12-05 - Add Windows 8 detection (Douglas Christopher Wilson) 1.45 2012-12-02 - Removes Data::Dump from deps - Supports Windows Phone 8.0 devices (Douglas Christopher Wilson) - Fixes mistaken WAP detection for Nokia Windows Phones - Fixes warnings on browser version when running under -w (Aran Deltac) 1.44 2012-05-03 - Fixes "sort (...) interpreted as function" introduced in 1.43, which was causing tests to fail 1.43 2012-05-02 - Sorts keys when iterating for consistency across Perl implementations (Thom Blake) 1.42 2012-03-01 - Adds bot detection for askjeeves, baidu and googleadsbot (Bill Rhodes) 1.41 2012-01-19 - Exposes test categorization via our (Olivier Bilodeau) 1.40 2012-01-05 - Fixes false positive results for RealPlayer browser (John Oatis) 1.39 2011-12-01 - Adds logical groupings of test cases BrowserDetect.pm (Olivier Bilodeau) - Fixes win-based device names (Olivier Bilodeau) 1.38 2011-11-30 - Ensures that all methods return undef where advertised (Ronald J. Kimball) 1.37 2011-11-29 - Adds nintendo mobile browsers (Nintendo DSi, Nintendo 3DS) (cho45) - Adds kindle, dsi, n3ds to device and device_name methods 1.36 2011-11-07 - Tweaks detection of Yahoo robot (Atsushi Kato) 1.35 2011-11-02 - Fixes false positive for bot() with Puffin browser (Atsushi Kato) 1.34 2011-10-24 - Adds BlackBerry to the list of possible return values of browser_string() (John Oatis) 1.33 2011-10-15 - Adds detections for the Trident engine (Douglas Christopher Wilson) 1.32 2011-10-12 - Fixes RealPlayer false positives (John Oatis) 1.31 2011-10-12 - Adds detection and device name for Windows Phone (Douglas Christopher Wilson) 1.30 2011-09-15 - Tweaks language regexes to reduce false positives 1.29 2011-09-01 - Adds ios method for ipod, ipad and iphone (os_string returns "iOS") 1.28 2011-08-31 - Adds ie9 and ie10 methods (Douglas Christopher Wilson) 1.27 2011-08-30 - Google and MSN mobile bots are now detected as mobile agents (Uwe Voelker) 1.26 2011-07-12 - Fixes Pod typo 1.25 2011-07-12 - Fix warnings about iceweasel test being defined twice (Paul Findlay) - Adds Opera Tablet to mobile devices (Jacob Rask) 1.24 2011-05-13 - Removes dependency on Modern::Perl, which was accidentally introduced (Yoshiki Kurihara) 1.23 2011-05-02 - Adds a browser_properties() call that exposes all the browser "properties" (Olivier Bilodeau) - Fixes issues where a Chrome string would return 1 to a ->nav45up check (Olivier Bilodeau) - Fixes issue where some WebKit/KHTML browsers returned 1 on ->gecko (Olivier Bilodeau) - Adds wince method (Windows CE) (Olivier Bilodeau) - Now detects Java UserAgent as a robot (Graham Barr) - Now detects Jakarta Commons-HttpClient as a Java client (Graham Barr) - UserAgent tests moved from YAML to JSON - Moves issue tracking to Github - Dist now includes META.json rather than META.yaml 1.22 2011-03-10 - Adds Namoroka to list of Firefox browsers (Viacheslav Tykhanovskyi) 1.21 2010-12-23 - Test suite now uses YAML rather than YAML::Tiny as YAML::Tiny 1.46 refuses to load useragents.yaml - Alphabetically re-ordered some of the documentation 1.20 2010-11-23 - Be a little more selective in marking ua as robot when contains search or seek (Graham Barr) - Add facebook crawler as a robot (Graham Barr) (Enrico Sorcinelli) 1.19 2010-09-24 - Added support for WebOS (Jesse Thompson) RT #61437 1.18 2010-09-06 - Added support for Netfront and Safari on Kindle 1.17 2010-08-28 - Added support for Mobile Safari, Links and Elinks (Jon Jensen) - Added more UserAgents to test suite (Jon Jensen) 1.16 2010-08-19 - Added support for the < 3.0 Safari public versions (Jon Jensen) - Added new UserAgents to useragents.yaml (Jon Jensen) 1.15 2010-08-18 - Re-releasing after some folders unintentionally included in build 1.14 2010-08-18 - Fixed uninitialized value warnings for Safari (Heiko Weber) RT #60440 1.13 2010-08-10 - Firefox Mobile (Fennec) is now detected as mobile RT #60186 (Jacob Rask) - Double digit Opera version #s now detected correctly RT #50717, #59817 1.12 2010-08-01 - Added msn and msnmobile (Luke Saunders: f5c87a17b8fa2b09e294) - Added googlemobile (Luke Saunders: ec28d49d7218b43788b9) - SymbOS and Opera Mobi added to mobile detection RT #59817 (Jacob Rask) - Distribution is now managed with Dist::Zilla 1.11 2010-06-03 - Added ps3 and psp (commit 85a619c9a977c0a8e403) (Alexey Surikov) 1.10 2010-05-05 - Google toolbar no longer triggers false positive for Googlebot (Jay Rifkin) 1.09 2010-04-04 - Better language detection (commit 68025ca1a58afa1db9b4eeffe8c246d129825cc0) (Maroš Kollár) 1.08 2010-03-19 - Added ipad(), device() and device_name() methods 1.07 2010-02-10 - Added realplayer() and _realplayer_version() methods RT #52355 (Marc Sebastian Pelzer) - Added engine_string(), engine_version(), engine_major(), engine_minor() methods - Added Windows 7 detection (commit 73795d8189faded8b07717e55488f128eaa00752) (Alexey Surikov) - Added public_version(), public_major() and public_minor() methods 1.06 2009-11-24 - Added missing file t/useragents.yaml to MANIFEST 1.05 2009-11-23 - Fixed RT #31847 (Mike Clarke) SCO/Unix false positives 1.04 2009-11-23 - Moved test config to a YAML file - Added language() method - Added iphone() method - Added ipod() method - Added android() method - Fixed RT #12259 (guest) Netscape 6 version detection - Fixed RT #52007 (Josh Ritter) Chrome browser false positives - Added country() method 1.03 2009-10-24 - Added mobile() method with support for various handsets (Richard Noble) - perltidied source 1.02 2009-10-21 - Fixed RT #48727 (Robin Smidsrod) - Made "KHTML, like Gecko" not match gecko - Properly detect Safari version >4.0 1.01 2009-10-20 - Switched to Module::Build from ExtUtils::MakeMaker - Re-organized file structure - Re-organized tests and expanded coverage to check major and minor methods - Manually added patch for Iceweasel from RT #41263 (merlynkline) - Added test for RT #41541 and RT #41263 (merlynkline) - curl added back to list of supported browsers RT #27878 (RT #Toni Cebrián) - Added test for RT #8547 (Steve Purkis) - Added test for RT #30705 (david.hilton.p) - Applied patch and added test for RT #7443 1.00 2009-10-19 - Applied patch from RT #47271 (Denis F. Latypoff), which adds support for Chrome - Have moved repository to GitHub 0.99 2007-02-22 - Modifications by Peter Walsham - Added support for Windows Server 2003 and Windows Vista 0.98 2004-06-21 - Added more browsers including Mozilla, Firefox, Safari - added Mac OS X, WinXP, Win2k detection - added more test cases 0.962 2001-01-31 - changed how minor() method to return minor version as a floating point - added additional browsers - added additional 'up' methods - added detection for mobile devices: wap, avantgo, audrey, etc. - added netscape 6 detection and gecko - added Windows ME detection - updated url to javascript browser sniffer page 0.95 2000-08-04 - added additional browsers 0.94 2000-03-19 - changed copyright notice - changed object's internal structure - added Windows 2000 detection - eliminated AUTOLOAD subroutine 0.92 2000-02-07 - fixed version numbering problem, would return '.' instead of undef if useragent's version couldn't be found - added more detection for AOL 0.9 1999-02-17 - original version; created by h2xs 1.18 LICENSE100644000765000024 4364212271355404 15330 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68This software is copyright (c) 2013 by Lee Semel. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2013 by Lee Semel. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2013 by Lee Semel. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End INSTALL100644000765000024 174412271355404 15331 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68 This is the Perl distribution HTTP-BrowserDetect. Installing HTTP-BrowserDetect is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm HTTP::BrowserDetect If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S HTTP::BrowserDetect ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan HTTP::BrowserDetect ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install ## Documentation HTTP-BrowserDetect documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc HTTP::BrowserDetect dist.ini100644000765000024 154212271355404 15740 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68name = HTTP-BrowserDetect author = Lee Semel author = Peter Walsham author = Olaf Alders (current maintainer) license = Perl_5 copyright_holder = Lee Semel copyright_year = 2013 version = 1.68 main_module = lib/HTTP/BrowserDetect.pm [GatherDir] [PruneCruft] [ManifestSkip] [License] [ExtraTests] [ExecDir] [ShareDir] [PkgVersion] [MakeMaker] [Manifest] [TestRelease] [ConfirmRelease] [UploadToCPAN] [MetaResources] [MetaJSON] [Bugtracker] web = http://github.com/oalders/%s/issues [GithubMeta] homepage = https://metacpan.org/release/HTTP-BrowserDetect [AutoPrereqs] ;[Test::Perl::Critic] [Test::CPAN::Changes] [ReadmeFromPod] [InstallGuide] [ModuleBuild] [PodWeaver] [CopyReadmeFromBuild] [NextRelease] format = %-1v %{yyyy-MM-dd HH:mm:ss VVVV}d [ContributorsFromGit] [ContributorsFile] [@Git] [CPANFile] MANIFEST100644000765000024 43712271355404 15407 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.012. Build.PL CONTRIBUTORS Changes INSTALL LICENSE MANIFEST META.json Makefile.PL README TODO cpanfile dist.ini lib/HTTP/BrowserDetect.pm t/01-detect.t t/03-language.t t/release-cpan-changes.t t/useragents.json cpanfile100644000765000024 110512271355404 15773 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68requires "strict" => "0"; requires "vars" => "0"; requires "warnings" => "0"; on 'build' => sub { requires "Module::Build" => "0.3601"; }; on 'test' => sub { requires "File::Slurp" => "0"; requires "FindBin" => "0"; requires "JSON::PP" => "0"; requires "Test::FailWarnings" => "0"; requires "Test::More" => "0"; requires "Test::Most" => "0"; requires "Test::NoWarnings" => "0"; }; on 'configure' => sub { requires "ExtUtils::MakeMaker" => "6.30"; requires "Module::Build" => "0.3601"; }; on 'develop' => sub { requires "Test::CPAN::Changes" => "0.19"; }; Build.PL100644000765000024 300112271355404 15560 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68 # This file was automatically generated by Dist::Zilla::Plugin::ModuleBuild v5.012. use strict; use warnings; use Module::Build 0.3601; my %module_build_args = ( "build_requires" => { "Module::Build" => "0.3601" }, "configure_requires" => { "ExtUtils::MakeMaker" => "6.30", "Module::Build" => "0.3601" }, "dist_abstract" => "Determine Web browser, version, and platform from an HTTP user agent string", "dist_author" => [ "Lee Semel ", "Peter Walsham", "Olaf Alders (current maintainer)" ], "dist_name" => "HTTP-BrowserDetect", "dist_version" => "1.68", "license" => "perl", "module_name" => "HTTP::BrowserDetect", "recommends" => {}, "recursive_test_files" => 1, "requires" => { "strict" => 0, "vars" => 0, "warnings" => 0 }, "script_files" => [], "test_requires" => { "File::Slurp" => 0, "FindBin" => 0, "JSON::PP" => 0, "Test::FailWarnings" => 0, "Test::More" => 0, "Test::Most" => 0, "Test::NoWarnings" => 0 } ); my %fallback_build_requires = ( "File::Slurp" => 0, "FindBin" => 0, "JSON::PP" => 0, "Module::Build" => "0.3601", "Test::FailWarnings" => 0, "Test::More" => 0, "Test::Most" => 0, "Test::NoWarnings" => 0 ); unless ( eval { Module::Build->VERSION(0.4004) } ) { delete $module_build_args{test_requires}; $module_build_args{build_requires} = \%fallback_build_requires; } my $build = Module::Build->new(%module_build_args); $build->create_build_script; META.json100644000765000024 545612271355404 15725 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68{ "abstract" : "Determine Web browser, version, and platform from an HTTP user agent string", "author" : [ "Lee Semel ", "Peter Walsham", "Olaf Alders (current maintainer)" ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.012, CPAN::Meta::Converter version 2.133380", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "HTTP-BrowserDetect", "prereqs" : { "build" : { "requires" : { "Module::Build" : "0.3601" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.30", "Module::Build" : "0.3601" } }, "develop" : { "requires" : { "Test::CPAN::Changes" : "0.19" } }, "runtime" : { "requires" : { "strict" : "0", "vars" : "0", "warnings" : "0" } }, "test" : { "requires" : { "File::Slurp" : "0", "FindBin" : "0", "JSON::PP" : "0", "Test::FailWarnings" : "0", "Test::More" : "0", "Test::Most" : "0", "Test::NoWarnings" : "0" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "http://github.com/oalders/HTTP-BrowserDetect/issues" }, "homepage" : "https://metacpan.org/release/HTTP-BrowserDetect", "repository" : { "type" : "git", "url" : "https://github.com/oalders/http-browserdetect.git", "web" : "https://github.com/oalders/http-browserdetect" } }, "version" : "1.68", "x_contributors" : [ "Aran Deltac ", "David Ihnen ", "Douglas Christopher Wilson ", "Graham Barr ", "Hao Wu ", "Jon Jensen ", "Maros Kollar ", "Olaf Alders ", "Olaf Alders ", "Olivier Bilodeau ", "Paul Findlay ", "Perlover ", "Robin Smidsr\u00f8d ", "Ronald J Kimball ", "Surikov Alexey ", "Thom Blake ", "Uwe ", "cho45 ", "joatis ", "ktat ", "lsaunders ", "vti ", "yeahoffline " ] } Makefile.PL100644000765000024 312712271355404 16247 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.012. use strict; use warnings; use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "Determine Web browser, version, and platform from an HTTP user agent string", "AUTHOR" => "Lee Semel , Peter Walsham, Olaf Alders (current maintainer)", "BUILD_REQUIRES" => { "Module::Build" => "0.3601" }, "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.30", "Module::Build" => "0.3601" }, "DISTNAME" => "HTTP-BrowserDetect", "EXE_FILES" => [], "LICENSE" => "perl", "NAME" => "HTTP::BrowserDetect", "PREREQ_PM" => { "strict" => 0, "vars" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "File::Slurp" => 0, "FindBin" => 0, "JSON::PP" => 0, "Test::FailWarnings" => 0, "Test::More" => 0, "Test::Most" => 0, "Test::NoWarnings" => 0 }, "VERSION" => "1.68", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "File::Slurp" => 0, "FindBin" => 0, "JSON::PP" => 0, "Module::Build" => "0.3601", "Test::FailWarnings" => 0, "Test::More" => 0, "Test::Most" => 0, "Test::NoWarnings" => 0, "strict" => 0, "vars" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); CONTRIBUTORS100644000765000024 216012271355404 16151 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68 # HTTP-BROWSERDETECT CONTRIBUTORS # This is the (likely incomplete) list of people who have helped make this distribution what it is, either via code contributions, patches, bug reports, help with troubleshooting, etc. A huge thank to all of them. * Aran Deltac * David Ihnen * Douglas Christopher Wilson * Graham Barr * Hao Wu * Jon Jensen * Maros Kollar * Olaf Alders * Olaf Alders * Olivier Bilodeau * Paul Findlay * Perlover * Robin Smidsrød * Ronald J Kimball * Surikov Alexey * Thom Blake * Uwe * cho45 * joatis * ktat * lsaunders * vti * yeahoffline t000755000765000024 012271355404 14375 5ustar00olafstaff000000000000HTTP-BrowserDetect-1.6801-detect.t100644000765000024 520412271355404 16411 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68/t#!/usr/bin/perl use strict; use warnings; use Test::Most; use Test::FailWarnings; use File::Slurp; use FindBin; use JSON::PP; # test that the module loads without errors my $w; { local $SIG{__WARN__} = sub { $w = shift }; require_ok( 'HTTP::BrowserDetect' ); } ok !$w; my $json = read_file( "$FindBin::Bin/useragents.json" ); my $tests = JSON::PP->new->ascii->decode( $json ); foreach my $ua ( sort keys %{$tests} ) { my $test = $tests->{$ua}; my $detected = HTTP::BrowserDetect->new( $ua ); diag( $detected->user_agent ); foreach my $method ( 'browser_string', 'engine_string', 'os_string', 'os_version' ) { if ( $test->{$method} ) { cmp_ok( $detected->$method, 'eq', $test->{$method}, "$method: $test->{$method}" ); } } foreach my $method ( qw( public_version public_major public_minor version major minor engine_version engine_major engine_minor ios tablet ) ) { if ( exists $test->{$method} and defined $test->{$method} and length $test->{$method} ) { cmp_ok( $detected->$method, '==', $test->{$method}, "$method: $test->{$method}" ); } } foreach my $method ( 'language', 'device', 'device_name', 'robot_name' ) { if ( exists $test->{$method} and defined $test->{$method} and length $test->{$method} ) { cmp_ok( $detected->$method, 'eq', $test->{$method}, "$method: $test->{$method}" ); } } $test->{os} =~ tr[A-Z][a-z] if $test->{os}; if ( $test->{os} ) { $test->{os} =~ s{\s}{}gxms; my $method = $test->{os}; ok( $detected->$method, $test->{os} ) if $test->{os}; } foreach my $type ( @{ $test->{match} } ) { ok( $detected->$type, "$type should match" ); } is_deeply( [ sort $detected->browser_properties() ], [ sort @{ $test->{match} } ], "browser properties match" ); # Test that $ua doesn't match a specific method foreach my $type ( @{ $test->{no_match} } ) { ok( !$detected->$type, "$type shouldn't match (and doesn't)" ); } } my $detected = HTTP::BrowserDetect->new( 'Nonesuch' ); diag( $detected->user_agent ); foreach my $method ( qw( engine_string engine_version engine_major engine_minor device device_name gecko_version ) ) { is_deeply( [ $detected->$method ], [undef], "$method should return undef in list context" ); } done_testing(); 03-language.t100644000765000024 55112271355404 16706 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68/t#!/usr/bin/env perl use strict; use warnings; use Test::More; use Test::NoWarnings (); use HTTP::BrowserDetect; my $browser = HTTP::BrowserDetect->new( "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)" ); ok( !$browser->language, "no language detected" ); diag( $browser->language ); Test::NoWarnings::had_no_warnings(); done_testing(); useragents.json100644000765000024 25622412271355404 17663 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68/t{ "AdsBot-Google (+http://www.google.com/adsbot.html)" : { "browser_string" : null, "country" : null, "language" : null, "major" : null, "match" : [ "googleadsbot", "robot" ], "minor" : null, "no_match" : null, "os" : null, "other" : null, "version" : null }, "AmigaVoyager/3.3.50 (AmigaOS/PPC)" : { "browser_string" : null, "country" : null, "ios" : 0, "language" : null, "major" : "3", "match" : [ "amiga" ], "minor" : "0.3", "no_match" : null, "os" : null, "other" : null, "version" : "3.3" }, "Baiduspider+(+http://www.baidu.com/search/spider.htm)" : { "browser_string" : null, "country" : null, "language" : null, "major" : null, "match" : [ "baidu", "robot" ], "minor" : "0", "no_match" : null, "os" : null, "other" : null, "version" : null }, "BlackBerry7730/3.7.1 UP.Link/5.1.2.5" : { "browser_string" : null, "country" : null, "device" : "blackberry", "device_name" : "BlackBerry", "language" : null, "major" : "3", "match" : [ "blackberry", "mobile", "device" ], "minor" : "0.7", "no_match" : null, "os" : null, "other" : null, "version" : "3.7" }, "DoCoMo/2.0 N905i(c100;TB;W24H16) (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)" : { "major" : "2", "minor" : "0.1", "match" : [ "googlemobile", "google", "mobile", "robot" ], "public_major" : "2", "public_minor" : ".1", "public_version" : "2.1", "robot_name" : "Google Mobile", "version" : "2.1" }, "ELinks/0.12~pre5-2ubuntu1 (textmode; Ubuntu; Linux 2.6.32-24-generic x86_64; 135x85-2)" : { "browser_string" : "ELinks", "match" : [ "linux", "unix", "elinks", "links" ], "os" : "Linux" }, "Emacs-W3/2.1.105 URL/1.267 ((Unix?) ; TTY ; sparc-sun-solaris2.3)" : { "browser_string" : null, "country" : null, "language" : null, "major" : "2", "match" : [ "emacs", "sun", "unix" ], "minor" : "0.1", "no_match" : null, "os" : "Unix", "other" : null, "version" : "2.1" }, "GetRight/3.2.1" : { "browser_string" : null, "country" : null, "language" : null, "major" : "3", "match" : [ "getright", "robot" ], "minor" : "0.2", "no_match" : null, "os" : null, "other" : null, "version" : "3.2" }, "Googlebot-News" : { "match" : [ "google", "googlebotnews", "robot" ], "robot_name" : "Googlebot News" }, "Googlebot-Image/1.0" : { "major" : "1", "minor" : "0", "match" : [ "google", "googlebotimage", "robot" ], "robot_name" : "Googlebot Images", "version" : "1" }, "Googlebot-Video/1.0" : { "major" : "1", "minor" : "0", "match" : [ "google", "googlebotvideo", "robot" ], "robot_name" : "Googlebot Video", "version" : "1" }, "Googlebot/1.0 (googlebot@googlebot.com http://googlebot.com/)" : { "major" : "1", "minor" : "0", "match" : [ "google", "robot" ], "version" : "1" }, "Googlebot/2.1 (+http://www.google.com/bot.html)" : { "major" : "2", "minor" : "0.1", "match" : [ "google", "robot" ], "version" : "2.1" }, "Konqueror/1.1.2" : { "browser_string" : null, "country" : null, "language" : null, "major" : "1", "match" : [ "konqueror" ], "minor" : "0.1", "no_match" : [ "robot" ], "os" : null, "other" : null, "version" : "1.1" }, "Links (2.1pre15; Linux 2.4.26-vc4 i586; x)" : { "browser_string" : "Links", "match" : [ "linux", "unix", "links" ], "os" : "Linux" }, "Links (2.2; Linux 2.6.32-24-generic x86_64; 135x85)" : { "browser_string" : "Links", "match" : [ "linux", "unix", "links" ], "os" : "Linux" }, "Lotus-Notes/4.5 ( OS/2 )" : { "browser_string" : null, "country" : null, "language" : null, "major" : "4", "match" : [ "lotusnotes", "os2" ], "minor" : "0.5", "no_match" : null, "os" : "OS2", "other" : null, "version" : "4.5" }, "Mediapartners-Google/2.1" : { "major" : "2", "minor" : "0.1", "match" : [ "googleadsense", "robot" ], "version" : "2.1" }, "MOT-EX128 Obigo/WAP2.0 MIDP-2.0/CLDC-1.1" : { "browser_string" : "Obigo", "device_name" : "Motorola EX128", "language" : null, "major" : null, "match" : [ "device", "obigo", "wap" ], "minor" : null, "no_match" : null, "os" : null, "other" : null, "version" : null }, "Mozilla/1.1 (Windows 3.0; I)" : { "browser_string" : "Netscape", "country" : null, "language" : null, "major" : "1", "match" : [ "netscape", "windows", "win3x", "win16" ], "minor" : "0.1", "no_match" : null, "os" : "Win3x", "other" : null, "version" : "1.1" }, "Mozilla/1.1 (Windows 3.1; I)" : { "browser_string" : "Netscape", "country" : null, "language" : null, "major" : "1", "match" : [ "netscape", "windows", "win31", "win3x", "win16" ], "minor" : "0.1", "no_match" : null, "os" : "Win3x", "other" : null, "version" : "1.1" }, "Mozilla/2.0 (Win95; I)" : { "browser_string" : "Netscape", "country" : null, "language" : null, "major" : "2", "match" : [ "netscape", "nav2", "windows", "win32", "win95" ], "minor" : "0", "no_match" : null, "os" : "Win95", "other" : null, "version" : "2" }, "Mozilla/2.0 (compatible; MSIE 3.01; Windows 95)" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "3", "match" : [ "ie", "ie3", "windows", "win32", "win95" ], "minor" : "0.01", "no_match" : null, "os" : "Win95", "other" : null, "version" : "3.01" }, "Mozilla/2.0 (compatible; MSIE 3.01; Windows NT)" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "3", "match" : [ "ie", "ie3", "windows", "win32", "winnt" ], "minor" : "0.01", "no_match" : null, "os" : "WinNT", "other" : null, "version" : "3.01" }, "Mozilla/2.0 (compatible; MSIE 3.0; AOL 3.0; Windows 95)" : { "browser_string" : "AOL Browser", "country" : null, "language" : null, "major" : "3", "match" : [ "ie", "ie3", "windows", "win32", "win95", "aol", "aol3" ], "minor" : "0", "no_match" : null, "os" : "Win95", "other" : null, "version" : "3" }, "Mozilla/2.0 (compatible; MSIE 4.0; Windows 95)" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "4", "match" : [ "ie", "ie4", "ie4up", "windows", "win32", "win95" ], "minor" : "0", "no_match" : null, "os" : "Win95", "other" : null, "version" : "4" }, "Mozilla/3.0 (Macintosh; I; PPC)" : { "browser_string" : "Netscape", "country" : null, "language" : null, "major" : "3", "match" : [ "netscape", "nav3", "mac", "macppc" ], "minor" : "0", "no_match" : null, "os" : "Mac", "other" : null, "version" : "3" }, "Mozilla/3.0 (compatible; MSIE 4.0; Windows 95)" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "4", "match" : [ "ie", "ie4", "ie4up", "windows", "win32", "win95" ], "minor" : "0", "no_match" : null, "os" : "Win95", "other" : null, "version" : "4" }, "Mozilla/3.0 (compatible; StarOffice/5.1; Linux)" : { "browser_string" : null, "country" : null, "language" : null, "major" : "5", "match" : [ "linux", "unix", "staroffice" ], "minor" : "0.1", "no_match" : null, "os" : "Linux", "other" : null, "version" : "5.1" }, "Mozilla/3.0 (compatible; StarOffice/5.1; Win32)" : { "browser_string" : null, "country" : null, "language" : null, "major" : "5", "match" : [ "win32", "windows", "staroffice" ], "minor" : "0.1", "no_match" : null, "os" : null, "other" : null, "version" : "5.1" }, "Mozilla/3.03Gold (Win95; I)" : { "browser_string" : "Netscape", "country" : null, "language" : null, "major" : "3", "match" : [ "netscape", "nav3", "navgold", "windows", "win32", "win95" ], "minor" : "0.03", "no_match" : null, "os" : "Win95", "other" : null, "version" : "3.03" }, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)" : { "match" : [ "dotnet", "ie", "ie_compat_mode", "ie4up", "ie55up", "ie5up", "ie7", "trident", "windows", "winnt", "win32", "win7" ], "public_major" : "7", "public_minor" : "0", "public_version" : "7.0", "version" : "7.0", "engine_major" : "5", "engine_minor" : "0", "engine_version" : "5.0", "engine_string" : "Trident" }, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Win64; x64; Trident/6.0; .NET4.0E; .NET4.0C)" : { "match" : [ "ie", "ie_compat_mode", "ie4up", "ie55up", "ie5up", "ie7", "trident", "win32", "win8", "win8_0", "windows", "winnt" ], "public_major" : "7", "public_minor" : "0", "public_version" : "7.0", "version" : "7.0", "engine_major" : "6", "engine_minor" : "0", "engine_version" : "6.0", "engine_string" : "Trident" }, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; Trident/7.0)" : { "match" : [ "ie", "ie_compat_mode", "ie4up", "ie55up", "ie5up", "ie7", "trident", "win32", "win8", "win8_1", "windows", "winnt" ], "public_major" : "7", "public_minor" : "0", "public_version" : "7.0", "version" : "7.0", "engine_major" : "7", "engine_minor" : "0", "engine_version" : "7.0", "engine_string" : "Trident" }, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GoogleT5; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" : { "major" : "8", "match" : [ "winxp", "windows", "winnt", "win32", "dotnet", "trident", "ie", "ie8", "ie55up", "ie5up", "ie4up" ], "minor" : "0", "no_match" : [ "ie_compat_mode", "robot" ], "public_major" : "8", "public_minor" : "0", "public_version" : "8.0", "version" : "8.0", "engine_major" : "4", "engine_minor" : "0", "engine_version" : "4.0", "engine_string" : "Trident" }, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)" : { "major" : "8", "match" : [ "winxp", "windows", "winnt", "win32", "dotnet", "trident", "ie", "ie8", "ie55up", "ie5up", "ie4up" ], "minor" : "0", "no_match" : [ "ie_compat_mode", "robot" ], "public_major" : "8", "public_minor" : "0", "public_version" : "8.0", "version" : "8.0", "engine_major" : "4", "engine_minor" : "0", "engine_version" : "4.0", "engine_string" : "Trident" }, "Mozilla/4.0 (PSP (PlayStation Portable); 2.00)" : { "device_name" : "Sony PlayStation Portable", "engine_string" : "NetFront", "match" : [ "psp", "pspgameos", "mobile", "netfront", "device" ], "no_match" : [ "netscape" ] }, "Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.5 (screen 600x800; rotate)" : { "browser_string" : "NetFront", "match" : [ "device", "kindle", "linux", "netfront", "tablet", "unix" ], "os" : "linux", "public_major" : "3", "public_minor" : "0.4", "public_version" : "3.4" }, "Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "4", "match" : [ "ie", "ie4", "ie4up", "windows", "win32", "win95" ], "minor" : "0.01", "no_match" : null, "os" : "Win95", "other" : null, "version" : "4.01" }, "Mozilla/4.0 (compatible; MSIE 5.0; Win32)" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "5", "match" : [ "ie", "ie4up", "ie5", "ie5up", "windows", "win32" ], "minor" : "0", "no_match" : null, "os" : null, "other" : null, "version" : "5" }, "Mozilla/4.0 (compatible; MSIE 5.0b1; Windows NT 5.0)" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "5", "match" : [ "ie", "ie4up", "ie5", "ie5up", "windows", "win32", "winnt", "win2k" ], "minor" : "0", "no_match" : null, "os" : "Win2k", "other" : null, "version" : "5" }, "Mozilla/4.0 (compatible; MSIE 5.0b2; Windows NT)" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "5", "match" : [ "ie", "ie5", "ie5up", "ie4up", "windows", "win32", "winnt" ], "minor" : "0", "no_match" : null, "os" : "WinNT", "other" : null, "version" : "5" }, "Mozilla/4.0 (compatible; MSIE 5.22; Mac_PowerPC) " : { "browser_string" : "MSIE", "major" : "5", "match" : [ "mac", "macppc", "ie", "ie4up", "ie5", "ie5up" ], "minor" : "0.22", "no_match" : null, "os" : "Mac", "other" : null, "version" : "5.22" }, "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) via proxy gateway Something/1.23" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "5", "match" : [ "ie", "ie5", "ie5up", "ie55", "ie55up", "ie4up", "windows", "win32", "winnt", "win2k" ], "minor" : "0.5", "no_match" : null, "os" : "Win2k", "other" : null, "version" : "5.5" }, "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "5", "match" : [ "ie", "ie5", "ie5up", "ie55", "ie55up", "ie4up", "windows", "win32", "winnt" ], "minor" : "0.5", "no_match" : null, "os" : "WinNT", "other" : null, "version" : "5.5" }, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "6", "match" : [ "windows", "winnt", "win2k", "win32", "ie", "ie4up", "ie5up", "ie55up", "ie6", "dotnet" ], "minor" : "0", "no_match" : null, "os" : "Win2k", "other" : null, "version" : "6.0" }, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322" : { "browser_string" : "MSIE", "match" : [ "windows", "winnt", "win2k", "win32", "ie", "ie4up", "ie5up", "ie55up", "ie6", "dotnet" ], "os" : "Win2k", "public_major" : "6", "public_minor" : "0", "public_version" : "6.0" }, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "6", "match" : [ "windows", "winnt", "winxp", "win32", "ie", "ie4up", "ie5up", "ie55up", "ie6" ], "minor" : "0", "no_match" : null, "os" : "WinXP", "other" : null, "version" : "6.0" }, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "6", "match" : [ "windows", "winnt", "winxp", "win32", "ie", "ie4up", "ie5up", "ie55up", "ie6", "dotnet" ], "minor" : "0", "no_match" : null, "os" : "WinXP", "other" : null, "version" : "6.0" }, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" : { "browser_string" : "MSIE", "match" : [ "windows", "winnt", "winxp", "win32", "ie", "ie4up", "ie5up", "ie55up", "ie6" ], "os" : "WinXP", "public_major" : "6", "public_minor" : "0", "public_version" : "6.0" }, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" : { "browser_string" : "MSIE", "match" : [ "windows", "win32", "winnt", "winxp", "ie", "ie6", "ie55up", "ie5up", "ie4up", "dotnet" ], "os" : "WinXP", "public_major" : "6", "public_minor" : "0", "public_version" : "6.0" }, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; GTB6.6; PicMorphSearchToolbar 1.2; InfoPath.2)" : { "browser_string" : "MSIE", "major" : "6", "match" : [ "winxp", "windows", "win32", "winnt", "ie", "ie6", "ie4up", "ie5up", "ie55up" ], "minor" : "0", "no_match" : [ "robot" ] }, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6.5; SearchToolbar 1.2)" : { "browser_string" : "MSIE", "major" : "6", "match" : [ "winxp", "windows", "win32", "winnt", "ie", "ie6", "ie4up", "ie5up", "ie55up" ], "minor" : "0", "no_match" : [ "robot" ] }, "Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.5; AOLBuild 4337.5400; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; Seekmo 10.0.430.0; 3P_UPCPC 1.0.21.2; .NET CLR 3.5.30729; Tablet PC 2.0; .NET CLR 3.0.30729; .NET4.0C)" : { "browser_string" : "AOL Browser", "major" : "7", "match" : [ "winvista", "windows", "win32", "winnt", "dotnet", "trident", "ie", "ie_compat_mode", "ie7", "ie4up", "ie5up", "ie55up", "aol" ], "minor" : "0", "no_match" : [ "robot" ], "engine_major" : "4", "engine_minor" : "0", "engine_version" : "4.0", "engine_string" : "Trident" }, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; SeekmoToolbar 4.8.4)" : { "browser_string" : "MSIE", "major" : "7", "match" : [ "winxp", "windows", "win32", "winnt", "dotnet", "ie", "ie7", "ie4up", "ie5up", "ie55up" ], "minor" : "0", "no_match" : [ "robot" ] }, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.6; .NET CLR 1.1.4322; Seekmo 10.3.79.0)" : { "browser_string" : "MSIE", "major" : "7", "match" : [ "winxp", "windows", "win32", "winnt", "dotnet", "ie", "ie7", "ie4up", "ie5up", "ie55up" ], "minor" : "0", "no_match" : [ "robot" ] }, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Tesco; YPC 3.2.0; .NET CLR 1.1.4322; yplus 5.3.04b)" : { "browser_string" : "MSIE", "country" : null, "engine_string" : "MSIE", "language" : null, "major" : "7", "match" : [ "winxp", "windows", "winnt", "win32", "dotnet", "ie", "ie7", "ie55up", "ie5up", "ie4up" ], "minor" : "0", "no_match" : [ "unix", "sco" ], "os" : null, "other" : null, "public_major" : "7", "public_minor" : "0", "public_version" : "7.0", "version" : "7.0" }, "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; OfficeLive" : { "browser_string" : "MSIE", "country" : null, "language" : null, "major" : "7", "match" : [ "windows", "win32", "winnt", "winvista", "dotnet", "ie", "ie7", "ie4up", "ie5up", "ie55up" ], "minor" : "0", "no_match" : null, "os" : "WinVista", "other" : null, "version" : "7.0" }, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; eMusic DLM/4; .NET4.0C)" : { "browser_string" : "MSIE", "match" : [ "winxp", "windows", "winnt", "win32", "dotnet", "trident", "ie", "ie4up", "ie55up", "ie5up", "ie8" ], "no_match": [ "ie_compat_mode" ], "os" : "WinXP", "public_major" : "8", "public_minor" : "0", "public_version" : "8.0", "engine_major" : "4", "engine_minor" : "0", "engine_version" : "4.0", "engine_string" : "Trident" }, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NETi CLR 3.0.30729; Media Center PC 6.0; MS-RTC LM 8; InfoPath.3; .NET4.0C) chromeframe/4.0" : { "browser_string" : "MSIE", "major" : "8", "match" : [ "windows", "win7", "winnt", "win32", "dotnet", "trident", "ie", "ie8", "ie55up", "ie5up", "ie4up" ], "no_match": [ "ie_compat_mode" ], "minor" : "0", "no_match" : null, "os" : "Win7", "other" : null, "version" : "8.0", "engine_major" : "4", "engine_minor" : "0", "engine_version" : "4.0", "engine_string" : "Trident" }, "Mozilla/5.0 ( ; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)": { "browser_string": "MSIE", "major" : "9", "match" : [ "windows", "win7", "winnt", "win32", "trident", "ie", "ie9", "ie55up", "ie5up", "ie4up" ], "no_match": [ "ie_compat_mode" ], "minor" : "0", "no_match" : null, "os" : "Win7", "other" : null, "version" : "9.0", "engine_major" : "5", "engine_minor" : "0", "engine_version" : "5.0", "engine_string" : "Trident" }, "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)": { "browser_string": "MSIE", "major" : "9", "match" : [ "windows", "win7", "winnt", "win32", "trident", "ie", "ie9", "ie55up", "ie5up", "ie4up" ], "no_match": [ "ie_compat_mode" ], "minor" : "0", "no_match" : null, "os" : "Win7", "other" : null, "version" : "9.0", "engine_major" : "5", "engine_minor" : "0", "engine_version" : "5.0", "engine_string" : "Trident" }, "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)": { "browser_string": "MSIE", "major" : "10", "match" : [ "windows", "win7", "winnt", "win32", "trident", "ie", "ie10", "ie55up", "ie5up", "ie4up" ], "no_match": [ "ie_compat_mode" ], "minor" : "0", "no_match" : null, "os" : "Win7", "other" : null, "version" : "10.0", "engine_major" : "6", "engine_minor" : "0", "engine_version" : "6.0", "engine_string" : "Trident" }, "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0; Touch)": { "browser_string": "MSIE", "major" : "10", "match" : [ "ie", "ie10", "ie55up", "ie4up", "ie5up", "mobile", "tablet", "trident", "win32", "win8", "win8_0", "windows", "winnt" ], "no_match": [ "ie_compat_mode" ], "minor" : "0", "no_match" : null, "os_string" : "Win8", "other" : null, "version" : "10.0", "engine_major" : "6", "engine_minor" : "0", "engine_version" : "6.0", "engine_string" : "Trident" }, "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0)": { "browser_string": "MSIE", "major" : "10", "match" : [ "windows", "win8", "win8_0", "winnt", "win32", "trident", "ie", "ie10", "ie55up", "ie5up", "ie4up" ], "no_match": [ "ie_compat_mode" ], "minor" : "0", "no_match" : null, "os_string" : "Win8", "other" : null, "version" : "10.0", "engine_major" : "6", "engine_minor" : "0", "engine_version" : "6.0", "engine_string" : "Trident" }, "Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko": { "browser_string": "MSIE", "major" : "11", "match" : [ "windows", "win7", "winnt", "win32", "trident", "ie", "ie11", "ie55up", "ie5up", "ie4up" ], "no_match": [ "ie_compat_mode" ], "minor" : "0", "no_match" : null, "os_string" : "Win7", "other" : null, "version" : "11.0", "engine_major" : "7", "engine_minor" : "0", "engine_version" : "7.0", "engine_string" : "Trident" }, "Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko": { "browser_string": "MSIE", "major" : "11", "match" : [ "windows", "win8", "win8_1", "winnt", "win32", "trident", "ie", "ie11", "ie55up", "ie5up", "ie4up" ], "no_match": [ "ie_compat_mode" ], "minor" : "0", "no_match" : null, "os_string" : "Win8.1", "other" : null, "version" : "11.0", "engine_major" : "7", "engine_minor" : "0", "engine_version" : "7.0", "engine_string" : "Trident" }, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 OPR/15.0.1147.100" : { "browser_string" : "Opera", "major" : "15", "match" : [ "windows", "win7", "winnt", "win32", "opera" ], "minor" : "0", "no_match" : null, "os_string" : "Win7", "other" : null, "version" : "15.0" }, "Mozilla/4.0 (compatible; Opera/3.0; Windows 4.10) 3.50" : { "browser_string" : "Opera", "country" : null, "language" : null, "major" : "3", "match" : [ "opera", "opera3", "windows" ], "minor" : "0", "no_match" : null, "os" : null, "other" : null, "version" : "3" }, "Mozilla/4.06 [en] (Win98; I ;Nav)" : { "browser_string" : "Netscape", "country" : null, "language" : "EN", "major" : "4", "match" : [ "netscape", "nav4", "nav4up", "windows", "win32", "win98" ], "minor" : "0.06", "no_match" : null, "os" : "Win98", "other" : null, "version" : "4.06" }, "Mozilla/4.5 [en] (X11; I; FreeBSD 2.2.7-RELEASE i386)" : { "browser_string" : "Netscape", "country" : null, "language" : "EN", "major" : "4", "match" : [ "netscape", "nav4", "nav4up", "nav45", "nav45up", "bsd", "freebsd", "unix", "x11" ], "minor" : "0.5", "no_match" : null, "os" : "Unix", "other" : null, "version" : "4.5" }, "Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.2; U; en-NZ) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.40.1 Safari/534.6 TouchPad/1.0" : { "browser_string" : null, "country" : "NZ", "engine_string" : "KHTML", "language" : "EN", "major" : "5", "match" : [ "linux", "safari", "tablet", "unix" ], "minor" : "0.34", "no_match" : null, "os" : null, "other" : null, "version" : "5.34" }, "Mozilla/5.0 (Linux; U; Android 1.0; en-us; dream) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2" : { "country" : "US", "engine" : "5.25", "engine_string" : "KHTML", "language" : "EN", "major" : "5", "match" : [ "safari", "mobile", "mobile_safari", "linux", "unix", "android", "device" ], "minor" : "0.23", "public_major" : "3", "public_minor" : "0", "public_version" : "3.0", "version" : "5.23" }, "Mozilla/5.0 (Linux; U; Android 1.5; en-us; Google Ion Build/CRB43) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1" : { "browser_string" : "Mobile Safari", "country" : "US", "engine" : "5.25", "engine_string" : "KHTML", "language" : "EN", "major" : "5", "match" : [ "safari", "mobile_safari", "mobile", "linux", "android", "unix", "device" ], "minor" : "0.25", "os_version" : "1.5", "public_major" : "3", "public_minor" : "0.1", "public_version" : "3.1", "version" : "5.25" }, "Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; DROIDX Build/VZW) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17 854X480 motorola DROIDX" : { "browser_string" : "Mobile Safari", "country" : "US", "engine" : "5.30", "engine_string" : "KHTML", "language" : "EN", "major" : "5", "match" : [ "safari", "mobile_safari", "mobile", "linux", "android", "device", "unix" ], "minor" : "0.30", "os_version" : "2.1-update1", "public_major" : "4", "public_minor" : "0", "public_version" : "4.0", "version" : "5.30" }, "Mozilla/5.0 (Linux; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0 Kindle/3.0 (screen 600x800; rotate)" : { "browser_string" : "Safari", "match" : [ "device", "kindle", "linux", "safari", "tablet", "unix" ], "os" : "Linux", "public_major" : "4", "public_minor" : "0", "public_version" : "4.0" }, "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2) Gecko/20100115 Firefox/3.6" : { "engine" : "4.6", "engine_string" : "Gecko", "language" : "DE", "major" : "3", "match" : [ "gecko", "firefox", "mac", "macosx" ], "minor" : "0.6", "os_string" : "Mac OS X", "os_version" : "10.6", "public_major" : "3", "public_minor" : "0.6", "public_version" : "3.6", "version" : "3.6" }, "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/419 (KHTML, like Gecko) Safari/419.3" : { "browser_string" : "Safari", "match" : [ "safari", "mac", "macosx" ], "os" : "Mac OS X", "public_major" : "2", "public_minor" : "0", "public_version" : "2.0" }, "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4" : { "browser_string" : "Firefox", "engine_major" : "1", "engine_minor" : "0.8", "engine_version" : "1.8", "match" : [ "mac", "macosx", "gecko", "firefox" ], "os" : "Mac OS X", "public_major" : "2", "public_minor" : "0", "public_version" : "2.0" }, "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4" : { "browser_string" : "Firefox", "engine_major" : "1", "engine_minor" : "0.8", "engine_version" : "1.8", "match" : [ "mac", "macosx", "macppc", "gecko", "firefox" ], "os" : "Mac OS X", "public_major" : "2", "public_minor" : "0", "public_version" : "2.0" }, "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/106.2 (KHTML, like Gecko) Safari/100.1" : { "browser_string" : "Safari", "country" : null, "language" : "EN", "major" : "1", "match" : [ "mac", "macosx", "macppc", "safari" ], "minor" : "0", "no_match" : [ "gecko" ], "os" : "Mac OS X", "other" : null, "version" : "1.0" }, "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" : { "browser_string" : "Safari", "country" : null, "language" : "EN", "major" : "1", "match" : [ "mac", "macosx", "macppc", "safari" ], "minor" : "0.25", "no_match" : [ "gecko" ], "os" : "Mac OS X", "other" : null, "version" : "1.25" }, "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8" : { "browser_string" : "Safari", "engine_string" : "KHTML", "match" : [ "mac", "macosx", "macppc", "safari" ], "os" : "Mac OS X", "public_major" : "1", "public_minor" : "0.2", "public_version" : "1.2" }, "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" : { "browser_string" : "Safari", "engine_string" : "KHTML", "match" : [ "mac", "macosx", "macppc", "safari" ], "os" : "Mac OS X", "public_major" : "1", "public_minor" : "0.2", "public_version" : "1.2" }, "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/419 (KHTML, like Gecko) Safari/419.3" : { "browser_string" : "Safari", "match" : [ "mac", "macosx", "macppc", "safari" ], "os" : "Mac OS X", "public_major" : "2", "public_minor" : "0", "public_version" : "2.0" }, "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/48 (like Gecko) Safari/48" : { "browser_string" : "Safari", "match" : [ "mac", "macosx", "macppc", "safari" ], "no_match" : [ "gecko" ], "os" : "Mac OS X", "public_major" : "0", "public_minor" : "0.8", "public_version" : "0.8" }, "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/60 (like Gecko) Safari/60" : { "browser_string" : "Safari", "match" : [ "mac", "macosx", "macppc", "safari" ], "no_match" : [ "gecko" ], "os" : "Mac OS X", "public_major" : "0", "public_minor" : "0.8", "public_version" : "0.8" }, "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/73 (KHTML, like Gecko) Safari/73" : { "browser_string" : "Safari", "engine_string" : "KHTML", "match" : [ "mac", "macosx", "macppc", "safari" ], "os" : "Mac OS X", "public_major" : "0", "public_minor" : "0.9", "public_version" : "0.9" }, "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/85 (KHTML, like Gecko) Safari/85" : { "browser_string" : "Safari", "engine_string" : "KHTML", "match" : [ "mac", "macosx", "macppc", "safari" ], "os" : "Mac OS X", "public_major" : "1", "public_minor" : "0", "public_version" : "1.0" }, "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85.8.5 (KHTML, like Gecko) Safari/85.8.1" : { "browser_string" : "Safari", "match" : [ "mac", "macosx", "macppc", "safari" ], "major" : "0", "minor" : "0.85", "public_major" : "1", "public_minor" : "0", "version" : "0.85" }, "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" : { "browser_string" : "Netscape", "country" : "US", "language" : "EN", "major" : "7", "match" : [ "mac", "macppc", "netscape", "nav4up", "nav45up", "nav6up", "gecko", "macosx", "mozilla" ], "minor" : "0.02", "no_match" : null, "os" : "Mac OS X", "other" : "1.0.2", "version" : "7.02" }, "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/74 (KHTML, like Gecko) Safari/74" : { "browser_string" : "Safari", "country" : "US", "language" : "EN", "major" : "0", "match" : [ "mac", "macosx", "macppc", "safari" ], "minor" : "0.74", "no_match" : [ "gecko" ], "os" : "Mac OS X", "other" : null, "version" : "0.74" }, "Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0" : { "browser_string" : "Firefox", "engine_string" : "Gecko", "engine_version": "18.0", "match" : [ "firefox", "firefoxos", "gecko", "mobile" ], "os_string" : "Firefox OS", "os_version" : "18.0", "public_version" : "18.0", "version" : "18.0" }, "Mozilla/5.0 (Tablet; rv:29.0) Gecko/29.0 Firefox/29.0" : { "browser_string" : "Firefox", "engine_string" : "Gecko", "engine_version": "29.0", "match" : [ "firefox", "firefoxos", "gecko", "tablet" ], "os_string" : "Firefox OS", "os_version" : "29.0", "public_version" : "29.0", "version" : "29.0" }, "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.0.0; en-US) AppleWebKit/535.8+ (KHTML, like Gecko) Version/7.2.0.0 Safari/535.8+" : { "browser_string" : "BlackBerry", "engine_string" : "KHTML", "match" : [ "blackberry", "device", "mobile", "rimtabletos", "safari", "tablet" ], "os_string" : "RIM Tablet OS", "public_version" : "7.2", "version" : "5.35" }, "Mozilla/5.0 (PLAYSTATION 3; 2.00)" : { "device_name" : "Sony PlayStation 3", "engine_string" : "NetFront", "match" : [ "ps3", "ps3gameos", "netfront", "device" ], "no_match" : [ "netscape" ] }, "Mozilla/5.0 (SymbianOS/9.1; U; en-us) AppleWebKit/413 (KHTML, like Gecko) Safari/413 UP.Link/6.3.1.15.0" : { "browser_string" : "Safari", "country" : "US", "engine_string" : "KHTML", "language" : "EN", "major" : "4", "match" : [ "safari", "mobile" ], "minor" : "0.13", "no_match" : [ "gecko" ], "os" : null, "other" : null, "version" : "4.13" }, "Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 Nokia5230/20.0.005; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/525 (KHTML, like Gecko) Version/3.0 BrowserNG/7.2.3" : { "browser_string" : null, "country" : null, "language" : null, "major" : "5", "match" : [ "safari", "device", "mobile", "wap" ], "minor" : ".25", "no_match" : null, "os" : null, "other" : null, "public_major" : "3", "public_minor" : "0", "public_version" : "3.0", "version" : "5.25" }, "Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1" : { "browser_string" : "Netscape", "country" : "US", "engine_major" : "0", "engine_minor" : "0.9", "engine_string" : "Gecko", "engine_version" : "0.9", "language" : "EN", "major" : "6", "match" : [ "windows", "win32", "win98", "netscape", "nav4up", "nav45up", "nav6", "nav6up", "mozilla", "gecko" ], "minor" : "0.1", "no_match" : null, "os" : "Win98", "other" : null, "public_major" : "6", "public_minor" : "0.1", "public_version" : "6.1", "version" : "6.1" }, "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3a) Gecko/20021207 Phoenix/0.5" : { "browser_string" : "Firefox", "country" : "US", "language" : "EN", "major" : "0", "match" : [ "windows", "win32", "winnt", "firefox", "gecko", "phoenix" ], "minor" : "0.5", "no_match" : null, "os" : "WinNT", "other" : "1.3a", "version" : "0.5" }, "Mozilla/5.0 (Windows; U; Windows NT 5.0; en) AppleWebKit/522.11.3 (KHTML, like Gecko) Version/3.0 Safari/522.11.3" : { "browser_string" : "Safari", "engine_string" : "KHTML", "match" : [ "windows", "winnt", "win2k", "win32", "safari" ], "os" : "Win2k", "public_major" : "3", "public_minor" : "0", "public_version" : "3.0" }, "Mozilla/5.0 (Windows; U; Windows NT 5.0; en) AppleWebKit/522.12.1 (KHTML, like Gecko) Version/3.0.1 Safari/522.12.2" : { "browser_string" : "Safari", "match" : [ "safari", "windows", "winnt", "win2k", "win32" ], "os" : "Win2k", "public_major" : "3", "public_minor" : "0", "public_version" : "3.0" }, "Mozilla/5.0 (Windows; U; Windows NT 5.0; en) AppleWebKit/522.13.1 (KHTML, like Gecko) Version/3.0.2 Safari/522.13.1" : { "browser_string" : "Safari", "match" : [ "windows", "winnt", "win2k", "win32", "safari" ], "os" : "Win2k", "public_major" : "3", "public_minor" : "0", "public_version" : "3.0" }, "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4" : { "browser_string" : "Firefox", "engine_major" : "1", "engine_minor" : "0.8", "engine_string" : "Gecko", "engine_version" : "1.8", "match" : [ "windows", "winnt", "win2k", "win32", "firefox", "gecko" ], "os" : "Win2k", "public_major" : "2", "public_minor" : "0", "public_version" : "2.0" }, "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040416 Firefox/0.8.0+" : { "browser_string" : "Firefox", "country" : "US", "language" : "EN", "major" : "0", "match" : [ "windows", "win32", "winnt", "win2k", "firefox", "gecko" ], "minor" : "0.8", "no_match" : null, "os" : "Win2k", "other" : "1.8a", "version" : "0.8" }, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/522.12.1 (KHTML, like Gecko) Version/3.0.1 Safari/522.12.2" : { "browser_string" : "Safari", "engine_string" : "KHTML", "language" : "EN", "match" : [ "windows", "winxp", "winnt", "win32", "safari" ], "os" : "WinXP", "public_major" : "3.0", "public_minor" : "0", "public_version" : "3.0" }, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.36 Safari/534.3" : { "browser_string" : "Chrome", "country" : "US", "engine_string" : "KHTML", "language" : "EN", "match" : [ "winxp", "windows", "winnt", "win32", "chrome" ], "no_match" : [ "netscape" ], "os" : "WinXP", "public_major" : "6", "public_minor" : "0", "public_version" : "6.0" }, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8" : { "browser_string" : "Safari", "match" : [ "winxp", "windows", "winnt", "win32", "safari" ], "os" : "WinXP", "public_major" : "5", "public_minor" : "0", "public_version" : "5.0" }, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9" : { "browser_string" : "Firefox", "country" : "US", "language" : "EN", "major" : "0", "match" : [ "windows", "win32", "winnt", "winxp", "firefox", "gecko" ], "minor" : "0.9", "no_match" : null, "os" : "WinXP", "other" : "1.7", "version" : "0.9" }, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12" : { "browser_string" : "Firefox", "engine_major" : "1", "engine_minor" : "0.8", "engine_version" : "1.8", "match" : [ "windows", "win32", "winnt", "winxp", "gecko", "firefox" ], "os" : "WinXP", "public_major" : "1", "public_minor" : "0.5", "public_version" : "1.5" }, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008062901 IceWeasel/3.0" : { "browser_string" : "IceWeasel", "country" : "US", "engine_major" : "1", "engine_minor" : "0.9", "engine_string" : "Gecko", "engine_version" : "1.9", "language" : "EN", "major" : "3", "match" : [ "windows", "win32", "winnt", "winxp", "firefox", "gecko", "iceweasel" ], "minor" : "0", "no_match" : null, "os" : null, "other" : null, "version" : "3" }, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729; .NET4.0C)" : { "browser_string" : "Firefox", "country" : "US", "engine_major" : "1", "engine_minor" : "0.9", "engine_version" : "1.9", "language" : "EN", "match" : [ "winxp", "windows", "winnt", "win32", "dotnet", "gecko", "firefox" ], "os" : "WinXP", "public_major" : "3", "public_minor" : "0.6", "public_version" : "3.6" }, "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.5) Gecko/20031007 Firebird/0.7" : { "browser_string" : "Firefox", "country" : null, "engine" : "Gecko", "engine_major" : "1", "engine_minor" : "0.5", "engine_version" : "1.5", "language" : "FR", "major" : "0", "match" : [ "windows", "win32", "winnt", "winxp", "firefox", "gecko", "firebird" ], "minor" : "0.7", "no_match" : null, "os" : "WinXP", "other" : "1.5", "version" : "0.7" }, "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.19.2 (KHTML, like Gecko) Version/4.0.2 Safari/530.19.1" : { "browser_string" : "Safari", "country" : "US", "language" : "EN", "major" : "5", "match" : [ "windows", "win32", "winnt", "winvista", "safari" ], "minor" : "0.3", "no_match" : [ "gecko" ], "os" : "WinVista", "other" : null, "public_major" : "4", "public_minor" : "0", "public_version" : "4.0", "version" : "5.3" }, "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.31 Safari/530.5" : { "browser_string" : "Chrome", "country" : "US", "language" : "EN", "major" : "2", "match" : [ "windows", "win32", "winnt", "winvista", "chrome" ], "minor" : "0", "no_match" : [ "safari", "gecko", "netscape" ], "os" : "WinVista", "other" : null, "version" : "2.0" }, "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.10 NET_mmhpset SearchToolbar/1.2" : { "browser_string" : "Firefox", "country" : "US", "language" : "EN", "major" : "3", "match" : [ "win7", "windows", "win32", "winnt", "gecko", "firefox" ], "minor" : "0.6", "no_match" : [ "robot" ] }, "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 SearchToolbar" : { "browser_string" : "Firefox", "country" : "US", "language" : "EN", "major" : "3", "match" : [ "win7", "windows", "win32", "winnt", "gecko", "firefox" ], "minor" : "0.6", "no_match" : [ "robot" ] }, "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040619 Firefox/0.9" : { "browser_string" : "Firefox", "country" : "US", "language" : "EN", "major" : "0", "match" : [ "unix", "freebsd", "bsd", "x11", "firefox", "gecko" ], "minor" : "0.9", "no_match" : null, "os" : "Unix", "other" : "1.7", "version" : "0.9" }, "Mozilla/5.0 (X11; U; Linux 2.4.3-20mdk i586; en-US; rv:0.9.1) Gecko/20010611" : { "browser_string" : "Netscape", "country" : "US", "engine_major" : "0", "engine_minor" : "0.9", "engine_string" : "Gecko", "engine_version" : "0.9", "language" : "EN", "major" : "5", "match" : [ "linux", "netscape", "nav4up", "nav45up", "nav6", "nav6up", "unix", "x11", "gecko", "mozilla" ], "minor" : "0", "no_match" : null, "os" : "Linux", "other" : "0.9.1", "version" : "5" }, "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.6) Gecko/20040207 Firefox/0.8" : { "browser_string" : "Firefox", "country" : "DE", "language" : "DE", "major" : "0", "match" : [ "unix", "linux", "x11", "firefox", "gecko" ], "minor" : "0.8", "no_match" : null, "os" : "Linux", "other" : "1.6", "version" : "0.8" }, "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20031002 Mozilla Firebird/0.6.1" : { "browser_string" : "Firefox", "country" : "US", "language" : "EN", "major" : "0", "match" : [ "unix", "linux", "x11", "firefox", "firebird", "gecko" ], "minor" : "0.6", "no_match" : null, "os" : "Linux", "other" : "1.5a", "version" : "0.6" }, "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5" : { "browser_string" : "Firefox", "engine_major" : "1", "engine_minor" : "0.8", "engine_version" : "1.8", "match" : [ "linux", "unix", "x11", "gecko", "firefox" ], "os" : "Linux", "public_major" : "1", "public_minor" : "0.5", "public_version" : "1.5" }, "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070220 Firefox/2.0.0.2" : { "browser_string" : "Firefox", "engine_major" : "1", "engine_minor" : "0.8", "engine_version" : "1.8", "match" : [ "linux", "unix", "x11", "gecko", "firefox" ], "os" : "Linux", "public_major" : "2", "public_minor" : "0", "public_version" : "2.0" }, "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.18) Gecko/2010021718 CentOS/3.0.18-1.el5.centos Firefox/3.0.18" : { "browser_string" : "Firefox", "engine_major" : "1", "engine_minor" : "0.9", "engine_string" : "Gecko", "engine_version" : "1.9", "match" : [ "linux", "unix", "x11", "gecko", "firefox" ], "os" : "Linux", "public_major" : "3", "public_minor" : "0", "public_version" : "3.0" }, "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.16pre) Gecko/20110308 Ubuntu/10.10 (maverick) Namoroka/3.6.16pre" : { "browser_string" : "Firefox", "engine_major" : "1", "engine_minor" : "0.9", "engine_version" : "1.9", "match" : [ "linux", "unix", "x11", "firefox", "gecko", "namoroka" ], "os" : "Linux", "public_major" : "3", "public_minor" : "0.6", "public_version" : "3.6" }, "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100403 Fedora/3.6.3-4.fc13 Firefox/3.6.3" : { "browser_string" : "Firefox", "engine_major" : "1", "engine_minor" : "0.9", "engine_string" : "Gecko", "engine_version" : "1.9", "match" : [ "linux", "unix", "x11", "gecko", "firefox" ], "os" : "Linux", "public_major" : "3", "public_minor" : "0.6", "public_version" : "3.6" }, "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.5) Gecko/20100614 Firefox/3.6.5pre Fennec/1.1" : { "browser_string" : null, "country" : null, "language" : null, "major" : "3", "match" : [ "unix", "linux", "x11", "gecko", "firefox", "mobile" ], "minor" : ".6", "no_match" : null, "os" : null, "other" : null, "public_major" : "3", "public_minor" : ".6", "public_version" : "3.6", "version" : "3.6" }, "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.125 Safari/533.4" : { "browser_string" : "Chrome", "engine_string" : "KHTML", "match" : [ "linux", "unix", "x11", "chrome" ], "no_match" : [ "netscape" ], "os" : "Linux", "public_major" : "5", "public_minor" : "0", "public_version" : "5.0" }, "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4" : { "browser_string" : "Chrome", "engine_string" : "KHTML", "match" : [ "linux", "unix", "x11", "chrome" ], "no_match" : [ "netscape" ], "os" : "Linux", "public_major" : "5", "public_minor" : "0", "public_version" : "5.0" }, "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.6 (KHTML, like Gecko) Chrome/6.0.495.0 Safari/534.6" : { "browser_string" : "Chrome", "engine_string" : "KHTML", "match" : [ "linux", "unix", "x11", "chrome" ], "no_match" : [ "netscape" ], "os" : "Linux", "public_major" : "6", "public_minor" : "0", "public_version" : "6.0" }, "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.6 (KHTML, like Gecko) Chrome/7.0.503.1 Safari/534.6" : { "browser_string" : "Chrome", "engine_string" : "KHTML", "match" : [ "linux", "unix", "x11", "chrome" ], "no_match" : [ "netscape" ], "os" : "Linux", "public_major" : "7", "public_minor" : "0", "public_version" : "7.0" }, "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.4) Gecko/20061201 Firefox/2.0.0.4 (Ubuntu-feisty)" : { "browser_string" : "Firefox", "engine_major" : "1", "engine_minor" : "0.8", "engine_string" : "Gecko", "engine_version" : "1.8", "match" : [ "linux", "unix", "x11", "gecko", "firefox" ], "os" : "Linux", "public_major" : "2", "public_minor" : "0", "public_version" : "2.0" }, "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.4) Gecko/20061201 Galeon/2.0.2 (Ubuntu package 2.0.2-4ubuntu1) Firefox/2.0.0.4 (Ubuntu-feisty)" : { "browser_string" : "Firefox", "engine_major" : "1", "engine_minor" : "0.8", "engine_version" : "1.8", "match" : [ "linux", "unix", "x11", "gecko", "firefox" ], "os" : "Linux", "public_major" : "2", "public_minor" : "0", "public_version" : "2.0" }, "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100722 SeaMonkey/2.0.6" : { "browser_string" : "Netscape", "engine_major" : "1", "engine_minor" : "0.9", "engine_version" : "1.9", "match" : [ "linux", "unix", "x11", "gecko", "mozilla", "nav45up", "nav4up", "nav6", "nav6up", "netscape" ], "os" : "Linux" }, "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20091023 Galeon/2.0.7 (Ubuntu 2.0.7-1ubuntu2)" : { "browser_string" : "Netscape", "engine_major" : "1", "engine_minor" : "0.9", "engine_version" : "1.9", "match" : [ "linux", "unix", "x11", "gecko", "mozilla", "nav45up", "nav4up", "nav6", "nav6up", "netscape" ], "os" : "Linux" }, "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8" : { "browser_string" : "Firefox", "engine_major" : "1", "engine_minor" : "0.9", "engine_version" : "1.9", "match" : [ "linux", "unix", "x11", "gecko", "firefox" ], "os" : "Linux", "public_major" : "3", "public_minor" : "0.6", "public_version" : "3.6" }, "Mozilla/5.0 (X11; U; Linux x86_64; en; rv:1.8.1.4) Gecko/20061201 Epiphany/2.18 Firefox/2.0.0.4 (Ubuntu-feisty)" : { "browser_string" : "Firefox", "engine_major" : "1", "engine_minor" : "0.8", "engine_version" : "1.8", "match" : [ "linux", "unix", "x11", "gecko", "firefox" ], "os" : "Linux", "public_major" : "2", "public_minor" : "0", "public_version" : "2.0" }, "Mozilla/5.0 (compatible; Konqueror/3.5; Linux; X11; x86_64) KHTML/3.5.6 (like Gecko) (Kubuntu)" : { "match" : [ "konqueror", "linux", "unix", "x11" ], "no_match" : [ "gecko" ], "os" : "Linux", "public_major" : "3", "public_minor" : "0.5", "public_version" : "3.5" }, "Mozilla/5.0 (compatible; Konqueror/4.4; Linux; X11; x86_64) KHTML/4.4.2 (like Gecko) Kubuntu" : { "engine_string" : "KHTML", "ios" : 0, "match" : [ "linux", "unix", "x11", "konqueror" ], "no_match" : [ "gecko" ], "os" : "Linux", "public_major" : "4", "public_minor" : "0.4", "public_version" : "4.4" }, "Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B348b Safari/531.21.10" : { "country" : "US", "device" : "ipad", "device_name" : "iPad", "engine" : "5.31", "engine_string" : "KHTML", "ios" : 1, "language" : "EN", "major" : "5", "match" : [ "safari", "mobile", "ios", "ipad", "tablet", "device" ], "minor" : "0.31", "os_version" : "3.2", "public_major" : "4", "public_minor" : "0", "public_version" : "4.0", "version" : "5.31" }, "Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0_2 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5C1 Safari/525.20" : { "browser_string" : "Safari", "country" : "US", "device" : "iphone", "device_name" : "iPhone", "engine_string" : "KHTML", "ios" : 1, "language" : "EN", "major" : "5", "match" : [ "safari", "mobile", "iphone", "device", "ios" ], "minor" : "0.25", "no_match" : null, "os" : null, "os_string" : "iOS", "other" : null, "public_major" : "3", "public_minor" : "0.1", "public_version" : "3.1", "version" : "5.25" }, "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)" : { "browser_string" : "Safari", "device" : "iphone", "device_name" : "iPhone", "engine_string" : "KHTML", "match" : [ "device", "google", "googlemobile", "iphone", "ios", "mobile", "robot", "safari" ], "os_string" : "iOS", "os_version" : "4.1", "public_major" : "4", "public_minor" : "0", "public_version" : "4.0" }, "Mozilla/5.0 (iPod; U; CPU iPhone OS 2_1 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5F137 Safari/525.20" : { "country" : "US", "device" : "iphone", "device_name" : "iPhone", "engine_string" : "KHTML", "language" : "EN", "match" : [ "safari", "mobile", "ipod", "ios", "iphone", "device" ] }, "Mozilla/5.0 (webOS/1.0; U; en-US) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1 Pre/1.0" : { "country" : "US", "device" : "webos", "device_name" : "webOS", "engine_string" : "KHTML", "language" : "EN", "match" : [ "safari", "mobile", "webos", "device" ] }, "Mozilla/5.001 (Macintosh; N; PPC; ja) Gecko/25250101 MegaCorpBrowser/1.0 (MegaCorp, Inc.)" : { "browser_string" : "Netscape", "country" : null, "language" : "JA", "major" : "5", "match" : [ "netscape", "nav4up", "nav45up", "nav6", "nav6up", "mac", "macppc", "mozilla", "gecko" ], "minor" : "0.001", "no_match" : null, "os" : "Mac", "other" : null, "version" : "5.001" }, "Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101" : { "browser_string" : "Netscape", "country" : "US", "language" : "EN", "major" : "5", "match" : [ "netscape", "nav4up", "nav45up", "windows", "winnt", "win32", "gecko", "nav6", "nav6up", "mozilla" ], "minor" : "0.001", "no_match" : null, "os" : "WinNT", "other" : null, "version" : "5.001" }, "Mozilla/9.876 (X11; U; Linux 2.2.12-20 i686, en) Gecko/25250101 Netscape/5.432b1 (C-MindSpring)" : { "browser_string" : "Netscape", "country" : null, "language" : null, "major" : "5", "match" : [ "netscape", "nav4up", "nav45up", "nav6", "nav6up", "linux", "unix", "mozilla", "gecko", "x11" ], "minor" : "0.432", "no_match" : null, "os" : "Linux", "other" : null, "version" : "5.432" }, "Nokia-WAP-Toolkit/1.3beta" : { "browser_string" : null, "country" : null, "language" : null, "major" : "1", "match" : [ "wap", "device", "mobile" ], "minor" : "0.3", "no_match" : null, "os" : null, "other" : null, "version" : "1.3" }, "Nokia7110/1.0 (30.05)" : { "browser_string" : null, "country" : null, "language" : null, "major" : "1", "match" : [ "wap", "device", "mobile" ], "minor" : "0", "no_match" : null, "os" : null, "other" : null, "version" : "1" }, "Opera/9.21 (Macintosh; Intel Mac OS X; U; en)" : { "browser_string" : "Opera", "match" : [ "mac", "macosx", "opera" ], "os" : "Mac OS X", "public_major" : "9", "public_minor" : "0.21", "public_version" : "9.21" }, "Opera/9.80 (Android; Opera Mini/5.1.21126/19.916; U; en) Presto/2.5.25" : { "browser_string" : "Opera", "language" : "EN", "match" : [ "opera", "android", "device", "mobile" ], "os" : "Android", "os_string": "Android", "public_major" : "9", "public_minor" : "0.80", "public_version" : "9.80" }, "Opera/9.80 (J2ME/MIDP; Opera Mini/4.2.14427/19.916; U; en) Presto/2.5.25" : { "browser_string" : "Opera", "language" : "EN", "match" : [ "opera", "mobile" ], "public_major" : "9", "public_minor" : "0.80", "public_version" : "9.80" }, "Opera/9.80 (S60; SymbOS; Opera Mobi/320; U; sv) Presto/2.4.15 Version/10.00" : { "browser_string" : null, "country" : null, "language" : null, "major" : "10", "match" : [ "opera", "mobile" ], "minor" : ".0", "no_match" : null, "os" : null, "other" : null, "public_major" : "10.0", "public_minor" : ".0", "public_version" : "10.0", "version" : "10.0" }, "Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.10" : { "browser_string" : "Opera", "language" : "EN", "match" : [ "windows", "winxp", "winnt", "win32", "opera" ], "os" : "WinXP", "public_major" : "10", "public_minor" : "0.10", "public_version" : "10.10" }, "RealPlayer SP, Windows 7: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; (R1 1.6))" : { "browser_string" : "RealPlayer", "country" : null, "engine_string" : "Trident", "language" : null, "major" : null, "match" : [ "dotnet", "ie", "ie_compat_mode", "ie55up", "ie5up", "ie4up", "ie7", "trident", "realplayer", "win32", "win7", "windows", "winnt" ], "minor" : "0", "no_match" : [ "unix", "sco" ], "os" : "Win7", "other" : null, "version" : null }, "RealPlayer version 10, Mac OS X: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.9 (KHTML, like Gecko) RealPlayer/10.1.0.503" : { "browser_string" : "RealPlayer", "country" : "US", "engine_string" : "KHTML", "language" : "EN", "major" : "10", "match" : [ "macosx", "mac", "realplayer", "safari" ], "minor" : "0.1", "no_match" : [ "windows" ], "os" : null, "other" : null, "version" : "10.1" }, "RealPlayer version 11, Mac OS X: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.9 (KHTML, like Gecko) RealPlayer/11.0.1.949" : { "browser_string" : "RealPlayer", "country" : "US", "engine_string" : "KHTML", "language" : "EN", "major" : "11", "match" : [ "macosx", "mac", "realplayer", "safari" ], "minor" : "0", "no_match" : [ "unix", "sco" ], "os" : "Mac", "os_version" : "10.6.2", "other" : null, "version" : "11.0" }, "T-mobile Dash Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; Smartphone; 320x240;) msnbot-mobile/1.1 (+http://search.msn.com/msnbot.htm)" : { "browser_string" : null, "country" : null, "language" : null, "major" : "4", "match" : [ "wince", "windows", "ie", "ie4", "ie4up", "mobile", "msn", "msnmobile", "robot" ], "minor" : ".01", "no_match" : null, "os" : null, "other" : null, "public_major" : "4", "public_minor" : ".01", "public_version" : "4.01", "version" : "4.01" }, "TinyBrowser/2.0 (TinyBrowser Comment) Gecko/20201231" : { "browser_string" : null, "country" : null, "language" : null, "major" : "2", "match" : [ "gecko" ], "minor" : "0", "no_match" : null, "os" : null, "other" : null, "version" : "2.000" }, "UP.Browser/4.1.2a-XXXX" : { "browser_string" : null, "country" : null, "language" : null, "major" : "4", "match" : [ "wap", "device", "mobile" ], "minor" : "0.1", "no_match" : null, "os" : null, "other" : null, "version" : "4.1" }, "Wapalizer/1.0" : { "browser_string" : null, "country" : null, "language" : null, "major" : "1", "match" : [ "wap", "device", "mobile" ], "minor" : "0", "no_match" : null, "os" : null, "other" : null, "version" : "1" }, "Wget/1.4.5" : { "browser_string" : null, "country" : null, "language" : null, "major" : "1", "match" : [ "wget", "robot" ], "minor" : "0.4", "no_match" : null, "os" : null, "other" : null, "version" : "1.4" }, "YourWap/1.16" : { "browser_string" : null, "country" : null, "language" : null, "major" : "1", "match" : [ "wap", "device", "mobile" ], "minor" : "0.16", "no_match" : null, "os" : null, "other" : null, "version" : "1.16" }, "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)" : { "match" : [ "robot", "facebook" ] }, "fetch/1.0 FreeBSD/4.0-CURRENT (i386)" : { "browser_string" : null, "major" : "1", "match" : [ "bsd", "freebsd", "unix", "robot" ], "minor" : "0", "no_match" : null, "os" : "Unix", "other" : null, "version" : "1" }, "iCab/Pre2.0 (Macintosh; I; PPC)" : { "browser_string" : null, "country" : null, "language" : null, "major" : "2", "match" : [ "mac", "macppc", "icab" ], "minor" : "0", "no_match" : null, "os" : "Mac", "other" : null, "version" : "2" }, "libcurl-agent/1.0" : { "browser_string" : "curl", "country" : null, "language" : null, "major" : "1", "match" : [ "curl", "robot" ], "minor" : "0", "no_match" : null, "os" : null, "other" : null, "version" : "1" }, "libwww-perl/5.11" : { "browser_string" : null, "country" : null, "language" : null, "major" : "5", "match" : [ "lwp", "robot" ], "minor" : "0.11", "no_match" : null, "os" : null, "other" : null, "version" : "5.11" }, "msnbot/2.0b (+http://search.msn.com/msnbot.htm)" : { "browser_string" : null, "country" : null, "language" : null, "major" : "2", "match" : [ "msn", "robot" ], "minor" : "0", "no_match" : null, "os" : null, "other" : null, "public_major" : "2", "public_minor" : "0", "public_version" : "2.0", "version" : "2.0" }, "puf/0.93.2a (Linux 2.4.20-19.9; i686)" : { "browser_string" : "puf", "country" : null, "language" : null, "major" : "0", "match" : [ "puf", "robot", "linux", "unix" ], "minor" : "0.93", "no_match" : [ "mobile" ], "os" : null, "other" : null, "version" : "0.93" }, "Jakarta Commons-HttpClient/3.1" : { "browser_string" : null, "country" : null, "language" : null, "major" : "3", "match" : [ "java", "robot" ], "minor" : ".1", "no_match" : null, "os" : null, "other" : null, "public_major" : "3", "public_minor" : ".1", "public_version" : "3.1", "version" : "3.1" }, "Java/1.6.0_17" : { "browser_string" : null, "country" : null, "language" : null, "major" : "1", "match" : [ "java", "robot" ], "minor" : ".6", "no_match" : null, "os" : null, "other" : null, "public_major" : "1", "public_minor" : ".6", "public_version" : "1.6", "version" : "1.6" }, // "Opera/9.80 (Windows NT 6.1; Opera Tablet/11648; U; en) Presto/2.7.81 Version/11.00" : { "browser_string" : null, "country" : null, "language" : "EN", "major" : "11", "match" : [ "mobile", "tablet", "win32", "windows", "win7", "opera", "winnt" ], "minor" : ".0", "no_match" : null, "os" : "WinNT", "other" : null, "public_major" : "11.0", "public_minor" : ".0", "public_version" : "11.0", "version" : "11.0" }, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)" : { "language" : null, "match" : [ "ie", "ie4up", "ie55up", "ie5up", "ie8", "trident", "win32", "windows", "winnt", "winxp" ], "no_match": [ "ie_compat_mode" ] }, "Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; HTC; T7575)" : { "browser_string" : "MSIE", "language" : null, "match" : [ "windows", "winphone", "winphone7", "mobile", "trident", "ie", "ie4up", "ie55up", "ie5up", "ie7" ], "no_match": [ "ie_compat_mode" ], "os" : "WinPhone", "os_string" : "Windows Phone", "os_version" : "7.0", "device_name" : "HTC T7575" }, "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; HTC; T7575)" : { "browser_string": "MSIE", "language": null, "match" : [ "windows", "winphone", "winphone7_5", "mobile", "trident", "ie", "ie4up", "ie55up", "ie5up", "ie9" ], "no_match": [ "ie_compat_mode" ], "os" : "WinPhone", "os_string" : "Windows Phone", "os_versin" : "7.5", "device_name" : "HTC T7575" }, "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; NOKIA; Lumia 510)" : { "browser_string": "MSIE", "engine_version": "5.0", "language": null, "match" : [ "windows", "winphone", "winphone7_5", "mobile", "trident", "ie", "ie4up", "ie55up", "ie5up", "ie9" ], "no_match": [ "ie_compat_mode" ], "os" : "WinPhone", "os_string" : "Windows Phone", "os_version" : "7.5", "device_name" : "NOKIA Lumia 510" }, "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; HTC; 8X)" : { "browser_string": "MSIE", "engine_version": "6.0", "language": null, "match" : [ "windows", "winphone", "winphone8", "mobile", "trident", "ie", "ie4up", "ie55up", "ie5up", "ie10" ], "no_match": [ "ie_compat_mode" ], "os" : "WinPhone", "os_string" : "Windows Phone", "os_version" : "8.0", "device_name" : "HTC 8X" }, "Mozilla/4.0 (compatible; MSIE 8.0; AOL 9.6; AOLBuild 4340.168; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; IE0006_ver1;EN_US)" : { "browser_string" : "AOL Browser", "major" : "8", "minor" : "0", "language" : "EN", "engine_string" : "Trident", "match" : [ "ie", "ie4up", "ie55up", "ie5up", "ie8", "aol", "trident", "win32", "windows", "winnt", "winxp", "dotnet" ], "no_match": [ "ie_compat_mode" ], "os" : "WinXP" }, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Crossrider130)" : { "browser_string" : "MSIE", "engine_string" : "Trident", "match" : [ "ie", "ie4up", "ie55up", "ie5up", "ie8", "trident", "win32", "windows", "winnt", "winxp", "dotnet" ], "minor" : "0", "no_match": [ "ie_compat_mode", "robot" ], "public_major" : "8", "public_minor" : "0", "public_version" : "8.0", "version" : "8.0" }, "Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; fr) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.246 Mobile Safari/534.1+" : { "browser_string" : "BlackBerry", "match" : [ "safari", "mobile", "mobile_safari", "blackberry", "device" ], "no_match" : [ "robot" ], "public_version" : "6.0", "device_name" : "BlackBerry", "language" : "FR", "engine_string" : "KHTML" }, "BlackBerry8520/4.6.1.272 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/118" : { "browser_string" : "BlackBerry", "match" : [ "mobile", "blackberry", "device" ], "minor" : ".6", "no_match" : [ "robot" ], "public_major" : "4", "public_minor" : ".6", "public_version" : "4.6", "version" : "4.6", "device_name" : "BlackBerry" }, "Mozilla/5.0 (iPad; U; CPU OS 5_0 like Mac OS X; ja-JP) AppleWebKit/534.12 (KHTML, like Gecko) Puffin/1.3.3565MS Mobile Safari/534.12" : { "browser_string" : "Mobile Safari", "ios" : 1, "device" : "ipad", "device_name" : "iPad", "match" : [ "mobile", "ios", "ipad", "mobile_safari", "device", "tablet", "safari" ], "minor" : ".34", "no_match" : [ "robot" ], "os" : null, "os_version" : "5.0", "version" : "5.34" }, "Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_0 like Mac OS X; ja-JP) AppleWebKit/534.12 (KHTML, like Gecko) Puffin/1.3.3507MS Mobile Safari/534.12" : { "browser_string" : "Mobile Safari", "ios" : 1, "device" : "iphone", "device_name" : "iPhone", "match" : [ "mobile", "ios", "iphone", "mobile_safari", "device", "safari" ], "minor" : ".34", "no_match" : [ "robot" ], "os" : null, "os_version" : "5.0", "version" : "5.34" }, "Mozilla/5.0 (X11; U; Linux i686; ja-JP) AppleWebKit/534.12 (KHTML, like Gecko) Puffin/1.3.3507MS Safari/534.12" : { "browser_string" : "Safari", "match" : [ "safari", "linux", "x11", "unix" ], "minor" : ".34", "no_match" : [ "robot" ], "os" : null, "version" : "5.34" }, "Mozilla/5.0 (Linux; U; Android 2.1-update1; ja-jp; IS03 Build/S2080) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17 YJApp-ANDROID jp.co.yahoo.android.yjtop/1.0.3" : { "browser_string" : "Mobile Safari", "match" : [ "safari", "linux", "unix", "mobile", "mobile_safari", "device", "android" ], "minor" : ".30", "no_match" : [ "robot" ], "os" : "Android", "version" : "5.30" }, "Opera/9.50 (Nintendo DSi; Opera/446; U; ja)" : { "browser_string" : "Nintendo DSi", "match" : [ "opera", "device", "mobile", "dsi" ], "no_match" : [ "robot" ], "os" : null, "public_major" : "9", "public_minor" : "0.50", "public_version" : "9.50" }, "Mozilla/5.0 (Nintendo 3DS; U; ; ja) Version/1.7412.JP" : { "browser_string" : "Nintendo 3DS", "match" : [ "device", "mobile", "n3ds" ], "no_match" : [ "robot" ], "os" : null, "public_major" : "1", "public_minor" : "0.7412", "public_version" : "1.7412" }, "Mozilla/DnsHealthCheckBot/1.0" : { "browser_string" : "", "match" : [ "netscape", "robot" ], "os" : null, "public_major" : "1", "public_minor" : "0", "public_version" : "1.0" }, "Mozilla/5.0 (Linux; U; Android 4.2; en-us; Nexus 10 Build/JOP12D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30" : { "browser_string" : "Safari", "country" : "US", "engine_string" : "KHTML", "language" : "EN", "major" : "5", "match" : [ "mobile", "device", "linux", "safari", "tablet", "android", "unix" ], "minor" : "0.34", "public_major" : "4", "public_minor" : ".0", "public_version" : "4", "version" : "5.34" }, "SAMSUNG-SGH-E250/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)" : { "major" : "2", "minor" : "0.1", "match" : [ "device", "googlemobile", "google", "mobile", "robot", "sun", "unix", "wap" ], "public_major" : "2", "public_minor" : ".1", "public_version" : "2.1", "version" : "2.1" }, "SonyEricssonU1i/R1CA; Mozilla/5.0 (SymbianOS/9.4; U; Series60/5.0 Profile/MIDP-2.1 Configuration/CLDC-1.1 model-orange) AppleWebKit/525 (KHTML like Gecko) Version/3.0 Safari/525" : { "browser_string" : "Safari", "engine_string" : "KHTML", "match" : [ "device", "mobile", "safari", "wap" ], "major" : "5", "minor" : "0.25", "public_major" : "3", "public_minor" : "0", "version" : "5.25" }, "Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearch/slurp) NOT Firefox/3.5" : { "robot_name" : "Yahoo! Slurp", "match" : [ "robot", "slurp", "yahoo" ] }, "LinkChecker/7.4 (+http://linkchecker.sourceforge.net/)" : { "robot_name" : "LinkChecker", "match" : [ "robot", "linkchecker" ] }, "Mozilla/5.0 (compatible; YandexImages/3.0; +http://yandex.com/bots)" : { "robot_name" : "YandexImages", "match" : [ "robot", "yandeximages" ] }, "Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10B329" : { "device" : "iphone", "match" : [ "device", "iphone", "ios", "mobile", "safari" ], "os_string" : "iOS", "os_version" : "6.1.3" }, "Mozilla/5.0 (compatible; special_archiver/3.1.1 +http://www.archive.org/details/archive.org_bot)" : { "robot_name" : "archive.org_bot", "match" : [ "robot", "specialarchiver" ] }, "Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)" : { "robot_name" : "Ahrefs", "match" : [ "ahrefs", "robot" ] }, "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)" : { "robot_name" : "Yandex", "match" : [ "yandex", "robot" ] } } release-cpan-changes.t100644000765000024 52112271355404 20645 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More 0.96 tests => 2; use_ok('Test::CPAN::Changes'); subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; done_testing(); HTTP000755000765000024 012271355404 15457 5ustar00olafstaff000000000000HTTP-BrowserDetect-1.68/libBrowserDetect.pm100755000765000024 16761012271355404 21007 0ustar00olafstaff000000000000HTTP-BrowserDetect-1.68/lib/HTTPuse strict; use warnings; package HTTP::BrowserDetect; $HTTP::BrowserDetect::VERSION = '1.68'; use vars qw(@ALL_TESTS); # Operating Systems our @OS_TESTS = qw( windows mac os2 unix linux vms bsd amiga firefoxos rimtabletos ); # More precise Windows our @WINDOWS_TESTS = qw( win16 win3x win31 win95 win98 winnt winme win32 win2k winxp win2k3 winvista win7 win8 win8_0 win8_1 wince winphone winphone7 winphone7_5 winphone8 ); # More precise Mac our @MAC_TESTS = qw( macosx mac68k macppc ios ); # More precise Unix our @UNIX_TESTS = qw( sun sun4 sun5 suni86 irix irix5 irix6 hpux hpux9 hpux10 aix aix1 aix2 aix3 aix4 sco unixware mpras reliant dec sinix ); # More precise BSDs our @BSD_TESTS = qw( freebsd ); # Gaming devices our @GAMING_TESTS = qw( ps3gameos pspgameos ); # Devices our %DEVICE_TESTS = ( android => 'Android', audrey => 'Audrey', blackberry => 'BlackBerry', dsi => 'Nintendo DSi', iopener => 'iopener', ipad => 'iPad', iphone => 'iPhone', ipod => 'iPod', kindle => 'Amazon Kindle', n3ds => 'Nintendo 3DS', palm => 'Palm', ps3 => 'Sony PlayStation 3', psp => 'Sony PlayStation Portable', wap => 'WAP capable phone', webos => 'webOS', ); # Browsers our @BROWSER_TESTS = qw( mosaic netscape firefox chrome safari ie opera lynx links elinks neoplanet neoplanet2 avantgo emacs mozilla konqueror r1 netfront mobile_safari obigo ); our @IE_TESTS = qw( ie3 ie4 ie4up ie5 ie5up ie55 ie55up ie6 ie7 ie8 ie9 ie10 ie11 ie_compat_mode ); our @OPERA_TESTS = qw( opera3 opera4 opera5 opera6 opera7 ); our @AOL_TESTS = qw( aol aol3 aol4 aol5 aol6 ); our @NETSCAPE_TESTS = qw( nav2 nav3 nav4 nav4up nav45 nav45up nav6 nav6up navgold ); # Firefox variants our @FIREFOX_TESTS = qw( firebird iceweasel phoenix namoroka ); our @ENGINE_TESTS = qw( gecko trident ); # https://support.google.com/webmasters/answer/1061943?hl=en my %ROBOTS = ( ahrefs => 'Ahrefs', altavista => 'AltaVista', askjeeves => 'AskJeeves', baidu => 'Baidu Spider', curl => 'curl', facebook => 'Facebook', getright => 'GetRight', google => 'Google', googleadsbot => 'Google AdsBot', googleadsense => 'Google AdSense', googlebotimage => 'Googlebot Images', googlebotnews => 'Googlebot News', googlebotvideo => 'Googlebot Video', googlemobile => 'Google Mobile', icab => 'iCab', infoseek => 'InfoSeek', linkchecker => 'LinkChecker', linkexchange => 'LinkExchange', lotusnotes => 'Lotus Notes', lwp => 'LWP::UserAgent', lycos => 'Lycos', msn => 'MSN', msnmobile => 'MSN Mobile', puf => 'puf', robot => 'robot', slurp => 'Yahoo! Slurp', specialarchiver => 'archive.org_bot', staroffice => 'StarOffice', webcrawler => 'WebCrawler', webtv => 'WebTV', wget => 'wget', yahoo => 'Yahoo', yandex => 'Yandex', yandeximages => 'YandexImages', ); our @ROBOT_TESTS = qw( puf curl wget getright robot slurp yahoo altavista lycos infoseek lwp webcrawler linkexchange webtv staroffice lotusnotes icab googlemobile msn msnmobile facebook baidu googleadsbot askjeeves googleadsense googlebotvideo googlebotnews googlebotimage google linkchecker yandeximages specialarchiver yandex ahrefs ); our @MISC_TESTS = qw( mobile dotnet x11 java tablet ); push @ALL_TESTS, ( @OS_TESTS, @WINDOWS_TESTS, @MAC_TESTS, @UNIX_TESTS, @BSD_TESTS, @GAMING_TESTS, ( sort ( keys %DEVICE_TESTS ) ), @BROWSER_TESTS, @IE_TESTS, @OPERA_TESTS, @AOL_TESTS, @NETSCAPE_TESTS, @FIREFOX_TESTS, @ENGINE_TESTS, @ROBOT_TESTS, @MISC_TESTS, ); # Safari build -> version map for versions prior to 3.0 # (since then, version appears in the user-agent string) my %safari_build_to_version = qw( 48 0.8 51 0.8.1 60 0.8.2 73 0.9 74 1.0b2v74 85 1.0 85.7 1.0.2 85.8 1.0.3 100 1.1 100.1 1.1.1 125 1.2 125.1 1.2.1 125.7 1.2.2 125.9 1.2.3 125.11 1.2.4 312 1.3 312.3 1.3.1 312.5 1.3.2 412 2.0 412.5 2.0.1 416.12 2.0.2 417.8 2.0.3 419.3 2.0.4 ); ####################################################################################################### # BROWSER OBJECT my $default = undef; sub new { my ( $class, $user_agent ) = @_; my $self = {}; bless $self, $class; unless ( defined $user_agent ) { $user_agent = $ENV{'HTTP_USER_AGENT'}; } $self->user_agent( $user_agent ); return $self; } foreach my $test ( @ALL_TESTS ) { no strict 'refs'; my $key = uc $test; *{$test} = sub { my ( $self ) = _self_or_default( @_ ); return $self->{tests}->{$key}; }; } sub _self_or_default { my ( $self ) = $_[0]; return @_ if ( defined $self && ref $self && ( ref $self eq 'HTTP::BrowserDetect' ) || UNIVERSAL::isa( $self, 'HTTP::BrowserDetect' ) ); $default ||= HTTP::BrowserDetect->new(); unshift( @_, $default ); return @_; } sub user_agent { my ( $self, $user_agent ) = _self_or_default( @_ ); if ( defined $user_agent ) { $self->{user_agent} = $user_agent; $self->_test(); } return $self->{user_agent}; } # Private method -- test the UA string sub _test { my ( $self ) = @_; $self->{tests} = {}; my $tests = $self->{tests}; $self->_os_tests; $self->_robot_tests; my @ff = ( 'firefox', @FIREFOX_TESTS ); my $ff = join "|", @ff; my $ua = lc $self->{user_agent}; # Trident Engine (detect early for sniffing out IE) $tests->{TRIDENT} = ( index( $ua, "trident/" ) != -1 ); if ( $tests->{TRIDENT} && $ua =~ /trident\/([\w\.\d]*)/ ) { $self->{engine_version} = $1; } # Browser version my ( $major, $minor, $beta ) = ( $ua =~ m{ \S+ # Greedly catch anything leading up to forward slash. \/ # Version starts with a slash [A-Za-z]* # Eat any letters before the major version ( [0-9A-Za-z]* ) # Major version number is everything before the first dot \. # The first dot ( [\d]* ) # Minor version number is every digit after the first dot [\d.]* # Throw away remaining numbers and dots ( [^\s]* ) # Beta version string is up to next space }x ); # Firefox version if ($ua =~ m{ ($ff) \/ ( [^.]* ) # Major version number is everything before first dot \. # The first dot ( [\d]* ) # Minor version nnumber is digits after first dot }xo ) { $major = $2; $minor = $3; $tests->{ uc( $1 ) } = 1; $tests->{'FIREFOX'} = 1; } # IE (and others) version if ( $ua =~ m{\b msie \s ( [0-9\.]+ ) (?: [a-z]+ [a-z0-9]* )? ;}x ) { # Internet Explorer ( $major, $minor, $beta ) = split /\./, $1; } elsif ( $ua =~ m{\b compatible; \s* [\w\-]* / ( [0-9\.]* ) (?: [a-z]+ [a-z0-9\.]* )? ;}x ) { # Generic "compatible" formats ( $major, $minor, $beta ) = split /\./, $1; } elsif ($tests->{TRIDENT} && $ua =~ m{\b rv: ( [0-9\.]+ ) \b}x ) { # MSIE masking as Gecko really well ;) ( $major, $minor, $beta ) = split /\./, $1; } # Opera browsers $tests->{OPERA} = ( index( $ua, "opera" ) != -1 || index( $ua, "opr/" ) != -1 ); $tests->{OPERA3} = ( index( $ua, "opera 3" ) != -1 || index( $ua, "opera/3" ) != -1 ); $tests->{OPERA4} = ( index( $ua, "opera 4" ) != -1 ) || ( index( $ua, "opera/4" ) != -1 && ( index( $ua, "nintendo dsi" ) == -1 ) ); $tests->{OPERA5} = ( index( $ua, "opera 5" ) != -1 ) || ( index( $ua, "opera/5" ) != -1 ); $tests->{OPERA6} = ( index( $ua, "opera 6" ) != -1 ) || ( index( $ua, "opera/6" ) != -1 ); $tests->{OPERA7} = ( index( $ua, "opera 7" ) != -1 ) || ( index( $ua, "opera/7" ) != -1 ); # Opera needs to be dealt with specifically # http://dev.opera.com/articles/view/opera-ua-string-changes/ # http://my.opera.com/community/openweb/idopera/ # Opera/9.80 (S60; SymbOS; Opera Mobi/320; U; sv) Presto/2.4.15 Version/10.00 # Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 OPR/15.0.1147.100 if ( $ua =~ m{\AOpera.*\sVersion/(\d*)\.(\d*)\z}i ) { $major = $1; $minor = $2; } elsif ( $ua =~ m{\bOPR/(\d+)\.(\d+)}i ) { $major = $1; $minor = $2; } elsif ( $ua =~ m{NetFront/(\d*)\.(\d*) Kindle}i ) { $major = $1; $minor = $2; } elsif ( $ua =~ m{Nintendo 3DS;.*\sVersion/(\d*)\.(\d*)}i ) { $major = $1; $minor = $2; } $major = 0 if !$major; $minor = $self->_format_minor( $minor ); # Mozilla browsers $tests->{GECKO} = ( index( $ua, "gecko" ) != -1 ) && ( index( $ua, "like gecko" ) == -1 ); $tests->{CHROME} = ( !$tests->{OPERA} && index( $ua, "chrome/" ) != -1 ); $tests->{SAFARI} = ( ( index( $ua, "safari" ) != -1 ) || ( index( $ua, "applewebkit" ) != -1 ) ) && ( index( $ua, "chrome" ) == -1 ); $tests->{MOBILE_SAFARI} = ( $tests->{SAFARI} && index( $ua, " mobile safari/" ) >= 0 ); # Chrome Version if ( $tests->{CHROME} ) { ( $major, $minor ) = ( $ua =~ m{ chrome \/ ( [^.]* ) # Major version number is everything before first dot \. # The first dot ( [^.]* ) # Minor version number is digits after first dot }x ); } # Safari Version elsif ( $tests->{SAFARI} ) { my ( $safari_build, $safari_minor ) = ( $ua =~ m{ safari/ ( \d+ ) # Major version number ( \. \d+ )? # Minor version number is dot and following digits }x ); if ( !$safari_build && $ua =~ m{applewebkit\/([\d\.]{1,})}xi ) { # ignore digits after 2nd dot ( $safari_build, $safari_minor ) = split /\./, $1; } if ( $safari_build ) { $major = int( $safari_build / 100 ); $minor = int( $safari_build % 100 ) / 100; $beta = $safari_minor; } } # Gecko-powered Netscape (i.e. Mozilla) versions $tests->{NETSCAPE} = ( !$tests->{FIREFOX} && !$tests->{SAFARI} && !$tests->{CHROME} && !$tests->{OPERA} && !$tests->{TRIDENT} && index( $ua, "mozilla" ) != -1 && index( $ua, "msie" ) == -1 && index( $ua, "spoofer" ) == -1 && index( $ua, "compatible" ) == -1 && index( $ua, "webtv" ) == -1 && index( $ua, "hotjava" ) == -1 && index( $ua, "nintendo" ) == -1 && index( $ua, "playstation 3" ) == -1 && index( $ua, "playstation portable" ) == -1 ); if ( $tests->{GECKO} && $tests->{NETSCAPE} && index( $ua, "netscape" ) != -1 ) { ( $major, $minor, $beta ) = ( $ua =~ m{ netscape6?\/ ( [^.]* ) # Major version number is everything before first dot \. # The first dot ( [\d]* ) # Minor version nnumber is digits after first dot ( [^\s]* ) }x ); $minor = 0 + ".$minor"; } # Netscape browsers $tests->{NAV2} = ( $tests->{NETSCAPE} && $major == 2 ); $tests->{NAV3} = ( $tests->{NETSCAPE} && $major == 3 ); $tests->{NAV4} = ( $tests->{NETSCAPE} && $major == 4 ); $tests->{NAV4UP} = ( $tests->{NETSCAPE} && $major >= 4 ); $tests->{NAV45} = ( $tests->{NETSCAPE} && $major == 4 && $minor == .5 ); $tests->{NAV45UP} = ( $tests->{NAV4} && $minor >= .5 ) || ( $tests->{NETSCAPE} && $major >= 5 ); $tests->{NAVGOLD} = ( defined( $beta ) && index( $beta, "gold" ) != -1 ); $tests->{NAV6} = ( $tests->{NETSCAPE} && ( $major == 5 || $major == 6 ) ) ; # go figure $tests->{NAV6UP} = ( $tests->{NETSCAPE} && $major >= 5 ); $tests->{MOZILLA} = ( $tests->{NETSCAPE} && $tests->{GECKO} ); # Internet Explorer browsers $tests->{IE} = ( $tests->{TRIDENT} || index( $ua, "msie" ) != -1 || index( $ua, 'microsoft internet explorer' ) != -1 ); $tests->{IE3} = ( $tests->{IE} && $major == 3 ); $tests->{IE4} = ( $tests->{IE} && $major == 4 ); $tests->{IE4UP} = ( $tests->{IE} && $major >= 4 ); $tests->{IE5} = ( $tests->{IE} && $major == 5 ); $tests->{IE5UP} = ( $tests->{IE} && $major >= 5 ); $tests->{IE55} = ( $tests->{IE} && $major == 5 && $minor >= .5 ); $tests->{IE55UP} = ( $tests->{IE5} && $minor >= .5 ) || ( $tests->{IE} && $major >= 6 ); $tests->{IE6} = ( $tests->{IE} && $major == 6 ); $tests->{IE7} = ( $tests->{IE} && $major == 7 ); $tests->{IE8} = ( $tests->{IE} && $major == 8 ); $tests->{IE9} = ( $tests->{IE} && $major == 9 ); $tests->{IE10} = ( $tests->{IE} && $major == 10 ); $tests->{IE11} = ( $tests->{IE} && $major == 11 ); $tests->{IE_COMPAT_MODE} = ( $tests->{IE7} && $tests->{TRIDENT} && $self->{engine_version} + 0 >= 4 ); # Neoplanet browsers $tests->{NEOPLANET} = ( index( $ua, "neoplanet" ) != -1 ); $tests->{NEOPLANET2} = ( $tests->{NEOPLANET} && index( $ua, "2." ) != -1 ); # AOL Browsers $tests->{AOL} = ( index( $ua, "aol" ) != -1 ); $tests->{AOL3} = ( index( $ua, "aol 3.0" ) != -1 ) || ( $tests->{AOL} && $tests->{IE3} ); $tests->{AOL4} = ( index( $ua, "aol 4.0" ) != -1 ) || ( $tests->{AOL} && $tests->{IE4} ); $tests->{AOL5} = ( index( $ua, "aol 5.0" ) != -1 ); $tests->{AOL6} = ( index( $ua, "aol 6.0" ) != -1 ); $tests->{AOLTV} = ( index( $ua, "navio" ) != -1 ) || ( index( $ua, "navio_aoltv" ) != -1 ); # Other browsers $tests->{STAROFFICE} = ( index( $ua, "staroffice" ) != -1 ); $tests->{ICAB} = ( index( $ua, "icab" ) != -1 ); $tests->{LOTUSNOTES} = ( index( $ua, "lotus-notes" ) != -1 ); $tests->{KONQUEROR} = ( index( $ua, "konqueror" ) != -1 ); $tests->{LYNX} = ( index( $ua, "lynx" ) != -1 ); $tests->{LINKS} = ( index( $ua, "links" ) != -1 ); $tests->{ELINKS} = ( index( $ua, "elinks" ) != -1 ); $tests->{WEBTV} = ( index( $ua, "webtv" ) != -1 ); $tests->{MOSAIC} = ( index( $ua, "mosaic" ) != -1 ); $tests->{JAVA} = ( index( $ua, "java" ) != -1 || index( $ua, "jdk" ) != -1 || index( $ua, "jakarta commons-httpclient" ) != -1 ); $tests->{NETFRONT} = ( index( $ua, "playstation 3" ) != -1 || index( $ua, "playstation portable" ) != -1 || index( $ua, "netfront" ) != -1 ); # Devices $tests->{BLACKBERRY} = ( index( $ua, "blackberry" ) != -1 || index( $ua, "rim tablet os" ) != -1 ); $tests->{IPHONE} = ( index( $ua, "iphone" ) != -1 ); $tests->{WINCE} = ( index( $ua, "windows ce" ) != -1 ); $tests->{WINPHONE} = ( index( $ua, "windows phone" ) != -1 ); $tests->{WEBOS} = ( index( $ua, "webos" ) != -1 ); $tests->{IPOD} = ( index( $ua, "ipod" ) != -1 ); $tests->{IPAD} = ( index( $ua, "ipad" ) != -1 ); $tests->{KINDLE} = ( index( $ua, "kindle" ) != -1 ); $tests->{AUDREY} = ( index( $ua, "audrey" ) != -1 ); $tests->{IOPENER} = ( index( $ua, "i-opener" ) != -1 ); $tests->{AVANTGO} = ( index( $ua, "avantgo" ) != -1 ); $tests->{PALM} = ( $tests->{AVANTGO} || index( $ua, "palmos" ) != -1 ); $tests->{OBIGO} = ( index( $ua, "obigo/" ) != -1 ); $tests->{WAP} = ( $tests->{OBIGO} || index( $ua, "up.browser" ) != -1 || ( index( $ua, "nokia" ) != -1 && !$tests->{WINPHONE} ) || index( $ua, "alcatel" ) != -1 || index( $ua, "ericsson" ) != -1 || index( $ua, "sie-" ) == 0 || index( $ua, "wmlib" ) != -1 || index( $ua, " wap" ) != -1 || index( $ua, "wap " ) != -1 || index( $ua, "wap/" ) != -1 || index( $ua, "-wap" ) != -1 || index( $ua, "wap-" ) != -1 || index( $ua, "wap" ) == 0 || index( $ua, "wapper" ) != -1 || index( $ua, "zetor" ) != -1 ); $tests->{PS3} = ( index( $ua, "playstation 3" ) != -1 ); $tests->{PSP} = ( index( $ua, "playstation portable" ) != -1 ); $tests->{DSI} = ( index( $ua, "nintendo dsi" ) != -1 ); $tests->{'N3DS'} = ( index( $ua, "nintendo 3ds" ) != -1 ); $tests->{MOBILE} = ( ( $tests->{FIREFOX} && index( $ua, "mobile" ) != -1 ) || ( $tests->{IE} && !$tests->{WINPHONE} && index( $ua, "arm" ) != -1 ) || index( $ua, "up.browser" ) != -1 || index( $ua, "nokia" ) != -1 || index( $ua, "alcatel" ) != -1 || index( $ua, "ericsson" ) != -1 || index( $ua, "sie-" ) == 0 || index( $ua, "wmlib" ) != -1 || index( $ua, " wap" ) != -1 || index( $ua, "wap " ) != -1 || index( $ua, "wap/" ) != -1 || index( $ua, "-wap" ) != -1 || index( $ua, "wap-" ) != -1 || index( $ua, "wap" ) == 0 || index( $ua, "wapper" ) != -1 || index( $ua, "blackberry" ) != -1 || index( $ua, "iemobile" ) != -1 || index( $ua, "palm" ) != -1 || index( $ua, "smartphone" ) != -1 || index( $ua, "windows ce" ) != -1 || index( $ua, "palmsource" ) != -1 || index( $ua, "iphone" ) != -1 || index( $ua, "ipod" ) != -1 || index( $ua, "ipad" ) != -1 || ( index( $ua, "opera mini" ) != -1 && index( $ua, "tablet" ) == -1 ) || ( index( $ua, "android" ) != -1 && index( $ua, "mobile" ) != -1 ) || index( $ua, "htc_" ) != -1 || index( $ua, "symbian" ) != -1 || index( $ua, "webos" ) != -1 || index( $ua, "samsung" ) != -1 || index( $ua, "samsung" ) != -1 || index( $ua, "zetor" ) != -1 || index( $ua, "android" ) != -1 || index( $ua, "symbos" ) != -1 || index( $ua, "opera mobi" ) != -1 || index( $ua, "fennec" ) != -1 || index( $ua, "opera tablet" ) != -1 || index( $ua, "rim tablet" ) != -1 || $tests->{PSP} || $tests->{DSI} || $tests->{'N3DS'} || $tests->{GOOGLEMOBILE} || $tests->{MSNMOBILE} ); $tests->{TABLET} = ( index( $ua, "ipad" ) != -1 || ( $tests->{IE} && !$tests->{WINPHONE} && index( $ua, "arm" ) != -1 ) || ( index( $ua, "android" ) != -1 && index( $ua, "mobile" ) == -1 && index( $ua, "opera" ) == -1 ) || ($tests->{FIREFOX} && index( $ua, "tablet" ) != -1) || index( $ua, "kindle" ) != -1 || index( $ua, "xoom" ) != -1 || index( $ua, "flyer" ) != -1 || index( $ua, "jetstream" ) != -1 || index( $ua, "transformer" ) != -1 || index( $ua, "novo7" ) != -1 || index( $ua, "an10g2" ) != -1 || index( $ua, "an7bg3" ) != -1 || index( $ua, "an7fg3" ) != -1 || index( $ua, "an8g3" ) != -1 || index( $ua, "an8cg3" ) != -1 || index( $ua, "an7g3" ) != -1 || index( $ua, "an9g3" ) != -1 || index( $ua, "an7dg3" ) != -1 || index( $ua, "an7dg3st" ) != -1 || index( $ua, "an7dg3childpad" ) != -1 || index( $ua, "an10bg3" ) != -1 || index( $ua, "an10bg3dt" ) != -1 || index( $ua, "opera tablet" ) != -1 || index( $ua, "rim tablet" ) != -1 || index( $ua, "hp-tablet" ) != -1 ); # Operating System # A final try at browser version, if we haven't gotten it so far if ( !defined( $major ) || $major eq '' ) { if ( $ua =~ /[A-Za-z]+\/(\d+)\;/ ) { $major = $1; $minor = 0; } } # Gecko version $self->{gecko_version} = undef; if ( $tests->{GECKO} ) { if ( $ua =~ /\([^)]*rv:([\w.\d]*)/ ) { $self->{gecko_version} = $1; $self->{engine_version} = $1; } } # RealPlayer $tests->{REALPLAYER} = ( index( $ua, "(r1 " ) != -1 || index( $ua, "realplayer" ) != -1 ); $self->{realplayer_version} = undef; if ( $tests->{REALPLAYER} ) { if ( $ua =~ /realplayer\/([\d+\.]+)/ ) { $self->{realplayer_version} = $1; my @version = split( /\./, $self->{realplayer_version} ); $major = shift @version; $minor = shift @version; } elsif ( $ua =~ /realplayer\s(\w+)/ ) { $self->{realplayer_version} = $1; } } # Device from UA $self->{device_name} = undef; if ( $tests->{OBIGO} && $ua =~ /^(mot-\S+)/ ) { $self->{device_name} = substr $self->{user_agent}, 0, length $1; $self->{device_name} =~ s/^MOT-/Motorola /i; } elsif ( $ua =~ /windows phone os [^\)]+ iemobile\/[^;]+; ([^;]+; [^;\)]+)/g ) { $self->{device_name} = substr $self->{user_agent}, pos( $ua ) - length $1, length $1; $self->{device_name} =~ s/; / /; } elsif ( $ua =~ /windows phone [^\)]+ iemobile\/[^;]+; arm; touch; ([^;]+; [^;\)]+)/g ) { $self->{device_name} = substr $self->{user_agent}, pos( $ua ) - length $1, length $1; $self->{device_name} =~ s/; / /; } $self->{major} = $major; $self->{minor} = $minor; $self->{beta} = $beta; $self->_os_tests; $self->_robot_tests; return undef unless $self->robot; } sub _robot_tests { my $self = shift; my $ua = lc $self->{user_agent}; my $tests = $self->{tests}; $tests->{LWP} = ( index( $ua, "libwww-perl" ) != -1 || index( $ua, "lwp-" ) != -1 ); $tests->{YAHOO} = ( index( $ua, "yahoo" ) != -1 ) && ( index( $ua, 'jp.co.yahoo.android' ) == -1 ); $tests->{MSN} = ( ( index( $ua, "msnbot" ) != -1 || index( $ua, "bingbot" ) ) != -1 ); $tests->{MSNMOBILE} = ( ( index( $ua, "msnbot-mobile" ) != -1 || index( $ua, "bingbot-mobile" ) ) != -1 ); $tests->{AHREFS} = ( index( $ua, "ahrefsbot" ) != -1 ); $tests->{ALTAVISTA} = ( index( $ua, "altavista" ) != -1 ); $tests->{ASKJEEVES} = ( index( $ua, "ask jeeves/teoma" ) != -1 ); $tests->{BAIDU} = ( index( $ua, "baiduspider" ) != -1 ); $tests->{CURL} = ( index( $ua, "libcurl" ) != -1 ); $tests->{FACEBOOK} = ( index( $ua, "facebookexternalhit" ) != -1 ); $tests->{GETRIGHT} = ( index( $ua, "getright" ) != -1 ); $tests->{GOOGLEADSBOT} = ( index( $ua, "adsbot-google" ) != -1 ); $tests->{GOOGLEADSENSE} = ( index( $ua, "mediapartners-google" ) != -1 ); $tests->{GOOGLEBOTIMAGE} = ( index( $ua, "googlebot-image" ) != -1 ); $tests->{GOOGLEBOTNEWS} = ( index( $ua, "googlebot-news" ) != -1 ); $tests->{GOOGLEBOTVIDEO} = ( index( $ua, "googlebot-video" ) != -1 ); $tests->{GOOGLEMOBILE} = ( index( $ua, "googlebot-mobile" ) != -1 ); $tests->{GOOGLE} = ( index( $ua, "googlebot" ) != -1 ); $tests->{INFOSEEK} = ( index( $ua, "infoseek" ) != -1 ); $tests->{LINKEXCHANGE} = ( index( $ua, "lecodechecker" ) != -1 ); $tests->{LINKCHECKER} = ( index( $ua, "linkchecker" ) != -1 ); $tests->{LYCOS} = ( index( $ua, "lycos" ) != -1 ); $tests->{PUF} = ( index( $ua, "puf/" ) != -1 ); $tests->{SCOOTER} = ( index( $ua, "scooter" ) != -1 ); $tests->{SLURP} = ( index( $ua, "slurp" ) != -1 ); $tests->{SPECIALARCHIVER} = ( index( $ua, "special_archiver" ) != -1 ); $tests->{WEBCRAWLER} = ( index( $ua, "webcrawler" ) != -1 ); $tests->{WGET} = ( index( $ua, "wget" ) != -1 ); $tests->{YANDEX} = ( index( $ua, "yandexbot" ) != -1 ); $tests->{YANDEXIMAGES} = ( index( $ua, "yandeximages" ) != -1 ); $tests->{ROBOT} = ( $tests->{AHREFS} || $tests->{ALTAVISTA} || $tests->{ASKJEEVES} || $tests->{BAIDU} || $tests->{FACEBOOK} || $tests->{GETRIGHT} || $tests->{GOOGLEADSBOT} || $tests->{GOOGLEADSENSE} || $tests->{GOOGLEMOBILE} || $tests->{GOOGLEBOTNEWS} || $tests->{GOOGLEBOTIMAGE} || $tests->{GOOGLEBOTVIDEO} || $tests->{GOOGLE} || $tests->{INFOSEEK} || $tests->{JAVA} || $tests->{LINKEXCHANGE} || $tests->{LINKCHECKER} || $tests->{LWP} || $tests->{LYCOS} || $tests->{MSNMOBILE} || $tests->{MSN} || $tests->{PUF} || $tests->{SLURP} || $tests->{SPECIALARCHIVER} || $tests->{WEBCRAWLER} || $tests->{WGET} || $tests->{YAHOO} || $tests->{YANDEX} || $tests->{YANDEXIMAGES} ) || index( $ua, "agent" ) != -1 || index( $ua, "bot" ) != -1 || index( $ua, "copy" ) != -1 || index( $ua, "crawl" ) != -1 || index( $ua, "fetch" ) != -1 || index( $ua, "find" ) != -1 || index( $ua, "ia_archive" ) != -1 || index( $ua, "index" ) != -1 || index( $ua, "reap" ) != -1 || index( $ua, "spider" ) != -1 || index( $ua, "worm" ) != -1 || index( $ua, "zyborg" ) != -1 || $ua =~ /seek (?! mo (?: toolbar )? \s+ \d+\.\d+ )/x || $ua =~ /search (?! [\w\s]* toolbar \b | bar \b )/x; # Yahoo Slurp! hack this should apply to most browsers, but there's a case # where GoogleBot masquerades as Safari on iOS. not sure how to handle # that. delete $tests->{FIREFOX} if $self->robot; } sub _os_tests { my $self = shift; my $tests = $self->{tests}; my $ua = lc $self->{user_agent}; $tests->{WIN16} = ( index( $ua, "win16" ) != -1 || index( $ua, "16bit" ) != -1 || index( $ua, "windows 3" ) != -1 || index( $ua, "windows 16-bit" ) != -1 ); $tests->{WIN3X} = ( index( $ua, "win16" ) != -1 || index( $ua, "windows 3" ) != -1 || index( $ua, "windows 16-bit" ) != -1 ); $tests->{WIN31} = ( index( $ua, "win16" ) != -1 || index( $ua, "windows 3.1" ) != -1 || index( $ua, "windows 16-bit" ) != -1 ); $tests->{WIN95} = ( index( $ua, "win95" ) != -1 || index( $ua, "windows 95" ) != -1 ); $tests->{WIN98} = ( index( $ua, "win98" ) != -1 || index( $ua, "windows 98" ) != -1 ); $tests->{WINNT} = ( index( $ua, "winnt" ) != -1 || index( $ua, "windows nt" ) != -1 || index( $ua, "nt4" ) != -1 || index( $ua, "nt3" ) != -1 ); $tests->{WIN2K} = ( index( $ua, "nt 5.0" ) != -1 || index( $ua, "nt5" ) != -1 ); $tests->{WINXP} = ( index( $ua, "nt 5.1" ) != -1 ); $tests->{WIN2K3} = ( index( $ua, "nt 5.2" ) != -1 ); $tests->{WINVISTA} = ( index( $ua, "nt 6.0" ) != -1 ); $tests->{WIN7} = ( index( $ua, "nt 6.1" ) != -1 ); $tests->{WIN8_0} = ( index( $ua, "nt 6.2" ) != -1 ); $tests->{WIN8_1} = ( index( $ua, "nt 6.3" ) != -1 ); $tests->{WIN8} = ( $tests->{WIN8_0} || $tests->{WIN8_1} ); $tests->{DOTNET} = ( index( $ua, ".net clr" ) != -1 ); $tests->{WINME} = ( index( $ua, "win 9x 4.90" ) != -1 ); # whatever $tests->{WIN32} = ( ( $tests->{WIN95} || $tests->{WIN98} || $tests->{WINME} || $tests->{WINNT} || $tests->{WIN2K} ) || $tests->{WINXP} || $tests->{WIN2K3} || $tests->{WINVISTA} || $tests->{WIN7} || $tests->{WIN8} || index( $ua, "win32" ) != -1 ); $tests->{WINDOWS} = ( ( $tests->{WIN16} || $tests->{WIN31} || $tests->{WIN95} || $tests->{WIN98} || $tests->{WINNT} || $tests->{WIN32} || $tests->{WIN2K} || $tests->{WINXP} || $tests->{WIN2K3} || $tests->{WINVISTA} || $tests->{WIN7} || $tests->{WIN8} || $tests->{WINME} || $tests->{WINCE} || $tests->{WINPHONE} ) || index( $ua, "win" ) != -1 ); $tests->{WINPHONE7} = ( index( $ua, "windows phone os 7.0" ) != -1 ); $tests->{WINPHONE7_5} = ( index( $ua, "windows phone os 7.5" ) != -1 ); $tests->{WINPHONE8} = ( index( $ua, "windows phone 8.0" ) != -1 ); # Mac operating systems $tests->{MAC} = ( index( $ua, "macintosh" ) != -1 || index( $ua, "mac_" ) != -1 ); $tests->{MACOSX} = ( index( $ua, "macintosh" ) != -1 && index( $ua, "mac os x" ) != -1 ); $tests->{MAC68K} = ( ( $tests->{MAC} ) && ( index( $ua, "68k" ) != -1 || index( $ua, "68000" ) != -1 ) ); $tests->{MACPPC} = ( ( $tests->{MAC} ) && ( index( $ua, "ppc" ) != -1 || index( $ua, "powerpc" ) != -1 ) ); $tests->{IOS} = $tests->{IPAD} || $tests->{IPOD} || $tests->{IPHONE}; # Others $tests->{AMIGA} = ( index( $ua, 'amiga' ) != -1 ); $tests->{EMACS} = ( index( $ua, 'emacs' ) != -1 ); $tests->{OS2} = ( index( $ua, 'os/2' ) != -1 ); $tests->{SUN} = ( index( $ua, "sun" ) != -1 ); $tests->{SUN4} = ( index( $ua, "sunos 4" ) != -1 ); $tests->{SUN5} = ( index( $ua, "sunos 5" ) != -1 ); $tests->{SUNI86} = ( ( $tests->{SUN} ) && index( $ua, "i86" ) != -1 ); $tests->{IRIX} = ( index( $ua, "irix" ) != -1 ); $tests->{IRIX5} = ( index( $ua, "irix5" ) != -1 ); $tests->{IRIX6} = ( index( $ua, "irix6" ) != -1 ); $tests->{HPUX} = ( index( $ua, "hp-ux" ) != -1 ); $tests->{HPUX9} = ( ( $tests->{HPUX} ) && index( $ua, "09." ) != -1 ); $tests->{HPUX10} = ( ( $tests->{HPUX} ) && index( $ua, "10." ) != -1 ); $tests->{AIX} = ( index( $ua, "aix" ) != -1 ); $tests->{AIX1} = ( index( $ua, "aix 1" ) != -1 ); $tests->{AIX2} = ( index( $ua, "aix 2" ) != -1 ); $tests->{AIX3} = ( index( $ua, "aix 3" ) != -1 ); $tests->{AIX4} = ( index( $ua, "aix 4" ) != -1 ); $tests->{LINUX} = ( index( $ua, "inux" ) != -1 ); $tests->{SCO} = $ua =~ m{(?:SCO|unix_sv)}; $tests->{UNIXWARE} = ( index( $ua, "unix_system_v" ) != -1 ); $tests->{MPRAS} = ( index( $ua, "ncr" ) != -1 ); $tests->{RELIANT} = ( index( $ua, "reliantunix" ) != -1 ); $tests->{DEC} = ( index( $ua, "dec" ) != -1 || index( $ua, "osf1" ) != -1 || index( $ua, "declpha" ) != -1 || index( $ua, "alphaserver" ) != -1 || index( $ua, "ultrix" ) != -1 || index( $ua, "alphastation" ) != -1 ); $tests->{SINIX} = ( index( $ua, "sinix" ) != -1 ); $tests->{FREEBSD} = ( index( $ua, "freebsd" ) != -1 ); $tests->{BSD} = ( index( $ua, "bsd" ) != -1 ); $tests->{X11} = ( index( $ua, "x11" ) != -1 ); $tests->{UNIX} = ( $tests->{X11} || $tests->{SUN} || $tests->{IRIX} || $tests->{HPUX} || $tests->{SCO} || $tests->{UNIXWARE} || $tests->{MPRAS} || $tests->{RELIANT} || $tests->{DEC} || $tests->{LINUX} || $tests->{BSD} ); $tests->{VMS} = ( index( $ua, "vax" ) != -1 || index( $ua, "openvms" ) != -1 ); $tests->{ANDROID} = ( index( $ua, "android" ) != -1 ); $tests->{FIREFOXOS} = ( $tests->{FIREFOX} && ($tests->{MOBILE} || $tests->{TABLET}) && !$tests->{ANDROID} && index( $ua, "fennec" ) == -1 ); $tests->{RIMTABLETOS} = ( index( $ua, "rim tablet os" ) != -1 ); $tests->{PS3GAMEOS} = $tests->{PS3} && $tests->{NETFRONT}; $tests->{PSPGAMEOS} = $tests->{PSP} && $tests->{NETFRONT}; } # undocumented, experimental, volatile. not bothering with major/minor here as # that's flawed for 3 point versions the plan is to move this parsing into the # UeberAgent parser sub os_version { my $self = shift; if ( $self->ios && $self->{user_agent} =~ m{OS (\d*_\d*|\d*_\d*_\d*) like Mac} ) { my $version = $1; $version =~ s{_}{.}g; return $version; } if ( $self->mac && $self->{user_agent} =~ m{ X \s (\d\d)_(\d)_(\d)}x ) { return join '.', $1, $2, $3; } # firefox in mac # "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0" if ( $self->mac && $self->{user_agent} =~ m{ X \s (\d\d\.\d)}x ) { return $1; } if ( $self->winphone && $self->{user_agent} =~ m{Windows \s Phone \s \w{0,2} \s{0,1} (\d+\.\d+);}x ) { return $1; } if ( $self->android && $self->{user_agent} =~ m{Android ([\d\.\w-]*)} ) { return $1; } if ( $self->firefoxos && $self->{user_agent} =~ m{Firefox/([\d\.]*)} ) { return $1; } } # because the internals are the way they are, these tests have to happen in a # certain order. hopefully we can change this once we have lazily loaded # attributes. in the meantime, a pile of returns will do the job. if we # changed this to use a hash, we'd still need a carefully ordered array of keys # in order to get something useful back. so, as it is, this actually wouldn't # be that much less verbose and the order of operations is quite clear. it # still feels dirty, though. it does highlight the fact that way too many # methods can return true for some UA strings, which means there are probably a # lot of false positives we haven't checked for. sub browser_string { my ( $self ) = _self_or_default( @_ ); return undef unless defined $self->{user_agent}; return 'Netscape' if $self->netscape; return 'IceWeasel' if $self->iceweasel; return 'Firefox' if $self->firefox; return 'BlackBerry' if $self->blackberry; return 'Mobile Safari' if $self->mobile_safari; return 'RealPlayer' if $self->realplayer_browser; return 'Safari' if $self->safari; return 'Chrome' if $self->chrome; return 'AOL Browser' if $self->aol; return 'MSIE' if $self->ie; return 'WebTV' if $self->webtv; return 'Obigo' if $self->obigo; return 'Nintendo DSi' if $self->dsi; return 'Opera' if $self->opera; return 'Mosaic' if $self->mosaic; return 'Lynx' if $self->lynx; return 'ELinks' if $self->elinks; return 'Links' if $self->links; return 'curl' if $self->curl; return 'puf' if $self->puf; return 'NetFront' if $self->netfront; return 'Nintendo 3DS' if $self->n3ds; return undef; } sub os_string { my ( $self ) = _self_or_default( @_ ); return undef unless defined $self->{user_agent}; return 'Win95' if $self->win95; return 'Win98' if $self->win98; return 'Win2k' if $self->win2k; return 'WinXP' if $self->winxp; return 'Win2k3' if $self->win2k3; return 'WinVista' if $self->winvista; return 'Win7' if $self->win7; return 'Win8' if $self->win8_0; return 'Win8.1' if $self->win8_1; return 'WinNT' if $self->winnt; return 'Windows Phone' if $self->winphone; return 'Win3x' if $self->win3x; return 'Android' if $self->android; return 'Linux' if $self->linux; return 'Unix' if $self->unix; return 'Firefox OS' if $self->firefoxos; return 'RIM Tablet OS' if $self->rimtabletos; return 'Playstation 3 GameOS' if $self->ps3gameos; return 'Playstation Portable GameOS' if $self->pspgameos; return 'iOS' if $self->iphone || $self->ipod || $self->ipad; return 'Mac OS X' if $self->macosx; return 'Mac' if $self->mac; return 'OS2' if $self->os2; return undef; } sub realplayer { my ( $self, $check ) = _self_or_default( @_ ); return 1 if $self->{tests}->{REALPLAYER}; return 0; } sub _realplayer_version { my ( $self, $check ) = _self_or_default( @_ ); if ( exists $self->{realplayer_version} && $self->{realplayer_version} ) { my @version = split( /\./, $self->{realplayer_version} ); $self->{major} = shift @version; $self->{minor} = $self->_format_minor( shift @version ); $self->{realplayer_version} = $self->{major} + $self->{minor}; return $self->{realplayer_version}; } return 0; } sub realplayer_browser { my ( $self, $check ) = _self_or_default( @_ ); return 1 if $self->{realplayer_version}; return 0; } sub gecko_version { my ( $self, $check ) = _self_or_default( @_ ); my $version; $version = $self->{gecko_version}; if ( defined $check ) { return $check == $version; } else { return $version; } } sub version { my ( $self, $check ) = _self_or_default( @_ ); return $self->_realplayer_version if $self->_realplayer_version; my $version = $self->{major} + $self->{minor}; if ( defined $check ) { return $check == $version; } else { return $version; } } sub major { my ( $self, $check ) = _self_or_default( @_ ); my ( $version ) = $self->{major}; if ( defined $check ) { return $check == $version; } else { return $version; } } sub minor { my ( $self, $check ) = _self_or_default( @_ ); my ( $version ) = $self->{minor}; if ( defined $check ) { return ( $check == $self->{minor} ); } else { return $version; } } sub public_version { my ( $self, $check ) = _self_or_default( @_ ); my ( $major, $minor ) = $self->_public; return $major + $minor; } sub public_major { my ( $self, $check ) = _self_or_default( @_ ); my ( $major, $minor ) = $self->_public; return $major; } sub public_minor { my ( $self, $check ) = _self_or_default( @_ ); my ( $major, $minor ) = $self->_public; return $minor; } sub public_beta { my ( $self, $check ) = _self_or_default( @_ ); my ( $major, $minor, $beta ) = $self->_public; return $beta; } sub _public { my ( $self, $check ) = _self_or_default( @_ ); # Return Public version of Safari. See RT #48727. if ( $self->safari ) { my $ua = lc $self->{user_agent}; # Safari starting with version 3.0 provides its own public version if ($ua =~ m{ version/ ( \d+ ) # Major version number is everything before first dot ( \. \d+ )? # Minor version number is first dot and following digits }x ) { return ( $1, $2, undef ); } # Safari before version 3.0 had only build numbers; use a lookup table # provided by Apple to convert to version numbers if ( $ua =~ m{ safari/ ( \d+ (?: \.\d+ )* ) }x ) { my $build = $1; my $version = $safari_build_to_version{$build}; unless ( $version ) { # if exact build -> version mapping doesn't exist, find next # lower build for my $maybe_build ( sort { $self->_cmp_versions( $b, $a ) } keys %safari_build_to_version ) { $version = $safari_build_to_version{$maybe_build}, last if $self->_cmp_versions( $build, $maybe_build ) >= 0; } } my ( $major, $minor ) = split /\./, $version; my $beta; $minor =~ s/(\D.*)// and $beta = $1; $minor = 0 + ( '.' . $minor ); return ( $major, $minor, ( $beta ? 1 : undef ) ); } } return ( $self->major, $self->minor, $self->beta( $check ) ); } sub _cmp_versions { my ( $self, $a, $b ) = @_; my @a = split /\./, $a; my @b = split /\./, $b; while ( @b ) { return -1 if @a == 0 || $a[0] < $b[0]; return 1 if @b == 0 || $b[0] < $a[0]; shift @a; shift @b; } return @a <=> @b; } sub engine_string { my ( $self, $check ) = _self_or_default( @_ ); if ( $self->{user_agent} =~ m{\bKHTML\b} ) { return 'KHTML'; } if ( $self->gecko ) { return 'Gecko'; } if ( $self->trident ) { return 'Trident'; } if ( $self->ie ) { return 'MSIE'; } if ( $self->netfront ) { return 'NetFront'; } return undef; } sub _engine { my ( $self, $check ) = _self_or_default( @_ ); return $self->{engine_version}; } sub engine_version { my ( $self, $check ) = _self_or_default( @_ ); if ( $self->_engine ) { return $self->engine_major + $self->engine_minor; } return undef; } sub engine_major { my ( $self, $check ) = _self_or_default( @_ ); if ( $self->_engine ) { my @version = split( /\./, $self->_engine ); return shift @version; } return undef; } sub engine_minor { my ( $self, $check ) = _self_or_default( @_ ); if ( $self->_engine ) { my @version = split( /\./, $self->_engine ); shift @version; return $self->_format_minor( shift @version ); } return undef; } sub beta { my ( $self, $check ) = _self_or_default( @_ ); my ( $version ) = $self->{beta}; if ( $check ) { return $check eq $version; } else { return $version; } } sub language { my ( $self, $check ) = _self_or_default( @_ ); my $parsed = $self->_language_country(); return $parsed->{'language'}; } sub country { my ( $self, $check ) = _self_or_default( @_ ); my $parsed = $self->_language_country(); return $parsed->{'country'}; } sub device { my ( $self, $check ) = _self_or_default( @_ ); foreach my $device ( sort keys %DEVICE_TESTS ) { return $device if ( $self->$device ); } return undef; } sub device_name { my ( $self, $check ) = _self_or_default( @_ ); return $self->{device_name} if defined $self->{device_name}; my $device = $self->device; return undef if !$device; return $DEVICE_TESTS{ $self->device }; } sub _language_country { my ( $self, $check ) = _self_or_default( @_ ); if ( $self->safari ) { if ( $self->major == 1 && $self->{user_agent} =~ m/\s ( [a-z]{2} ) \)/xms ) { return { language => uc $1 }; } if ( $self->{user_agent} =~ m/\s ([a-z]{2})-([A-Za-z]{2})/xms ) { return { language => uc $1, country => uc $2 }; } } if ( $self->aol && $self->{user_agent} =~ m/;([A-Z]{2})_([A-Z]{2})\)/ ) { return { language => $1, country => $2 }; } if ( $self->{user_agent} =~ m/\b([a-z]{2})-([A-Za-z]{2})\b/xms ) { return { language => uc $1, country => uc $2 }; } if ( $self->{user_agent} =~ m/\[([a-z]{2})\]/xms ) { return { language => uc $1 }; } if ( $self->{user_agent} =~ m/\(([^)]+)\)/xms ) { my @parts = split( /;/, $1 ); foreach my $part ( @parts ) { if ( $part =~ /^\s*([a-z]{2})\s*$/ ) { return { language => uc $1 }; } } } return { language => undef, country => undef }; } sub _format_minor { my $self = shift; my $minor = shift; return 0 + ( '.' . ( $minor || 0 ) ); } sub browser_properties { my ( $self, $check ) = _self_or_default( @_ ); my @browser_properties; foreach my $property ( sort keys %{ $self->{tests} } ) { push @browser_properties, lc( $property ) if ( ${ $self->{tests} }{$property} ); } # devices are a property too but it's not stored in %tests # so I explicitly test for it and add it push @browser_properties, 'device' if ( $self->device() ); return @browser_properties; } sub robot_name { my $self = shift; foreach my $name ( @ROBOT_TESTS ) { next if $name eq 'robot'; if ( $self->$name ) { return $ROBOTS{$name}; } } } 1; # ABSTRACT: Determine Web browser, version, and platform from an HTTP user agent string __END__ =pod =encoding UTF-8 =head1 NAME HTTP::BrowserDetect - Determine Web browser, version, and platform from an HTTP user agent string =head1 VERSION version 1.68 =head1 SYNOPSIS use HTTP::BrowserDetect; my $browser = HTTP::BrowserDetect->new($user_agent_string); # Detect operating system if ($browser->windows) { if ($browser->winnt) ... if ($browser->win95) ... } print $browser->mac; # Detect browser vendor and version print $browser->netscape; print $browser->ie; if (browser->major(4)) { if ($browser->minor() > .5) { ... } } if ($browser->version() > 4) { ...; } =head1 DESCRIPTION The HTTP::BrowserDetect object does a number of tests on an HTTP user agent string. The results of these tests are available via methods of the object. This module is based upon the JavaScript browser detection code available at L. =head1 CONSTRUCTOR AND STARTUP =head2 new() HTTP::BrowserDetect->new( $user_agent_string ) The constructor may be called with a user agent string specified. Otherwise, it will use the value specified by $ENV{'HTTP_USER_AGENT'}, which is set by the web server when calling a CGI script. You may also use a non-object-oriented interface. For each method, you may call HTTP::BrowserDetect::method_name(). You will then be working with a default HTTP::BrowserDetect object that is created behind the scenes. =head1 SUBROUTINES/METHODS =head2 user_agent() Returns the value of the user agent string. Calling this method with a parameter has now been deprecated and this feature will be removed in an upcoming release. =head2 country() Returns the country string as it may be found in the user agent string. This will be in the form of an upper case 2 character code. ie: US, DE, etc =head2 language() Returns the language string as it is found in the user agent string. This will be in the form of an upper case 2 character code. ie: EN, DE, etc =head2 device() Returns the method name of the actual hardware, if it can be detected. Currently returns one of: android, audrey, blackberry, dsi, iopener, ipad, iphone, ipod, kindle, n3ds, palm, ps3, psp, wap, webos. Returns C if no hardware can be detected =head2 device_name() Returns a human formatted version of the hardware device name. These names are subject to change and are really meant for display purposes. You should use the device() method in your logic. Returns one of: Android, Audrey, BlackBerry, Nintendo DSi, iopener, iPad, iPhone, iPod, Amazon Kindle, Nintendo 3DS, Palm, Sony PlayStation 3, Sony Playstation Portable, WAP capable phone, webOS. Also Windows-based smartphones will output various different names like HTC T7575. Returns C if this is not a device or if no device name can be detected. =head2 browser_properties() Returns a list of the browser properties, that is, all of the tests that passed for the provided user_agent string. Operating systems, devices, browser names, mobile and robots are all browser properties. =head1 Detecting Browser Version Please note that that the version(), major() and minor() methods have been superceded as of release 1.07 of this module. They are not yet deprecated, but should be replaced with public_version(), public_major() and public_minor() in new development. The reasoning behind this is that version() method will, in the case of Safari, return the Safari/XXX numbers even when Version/XXX numbers are present in the UserAgent string. Because this behaviour has been in place for so long, some clients may have come to rely upon it. So, it has been retained in the interest of "bugwards compatibility", but in almost all cases, the numbers returned by public_version(), public_major() and public_minor() will be what you are looking for. =head2 public_version() Returns the browser version as a floating-point number. =head2 public_major() Returns the integer portion of the browser version. =head2 public_minor() Returns the decimal portion of the browser version as a B less than 1. For example, if the version is 4.05, this method returns .05; if the version is 4.5, this method returns .5. On occasion a version may have more than one decimal point, such as 'Wget/1.4.5'. The minor version does not include the second decimal point, or any further digits or decimals. =head2 version($version) Returns the version as a floating-point number. If passed a parameter, returns true if it is equal to the version specified by the user agent string. =head2 major($major) Returns the integer portion of the browser version. If passed a parameter, returns true if it equals the browser major version. =head2 minor($minor) Returns the decimal portion of the browser version as a B less than 1. For example, if the version is 4.05, this method returns .05; if the version is 4.5, this method returns .5. B. If passed a parameter, returns true if equals the minor version. On occasion a version may have more than one decimal point, such as 'Wget/1.4.5'. The minor version does not include the second decimal point, or any further digits or decimals. =head2 beta($beta) Returns any the beta version, consisting of any non-numeric characters after the version number. For instance, if the user agent string is 'Mozilla/4.0 (compatible; MSIE 5.0b2; Windows NT)', returns 'b2'. If passed a parameter, returns true if equal to the beta version. If the beta starts with a dot, it is thrown away. =head1 Detecting Rendering Engine =head2 engine_string() Returns one of the following: Gecko, KHTML, Trident, MSIE, NetFront Returns C if no string can be found. =head2 engine_version() Returns the version number of the rendering engine. Currently this only returns a version number for Gecko and Trident. Returns C for all other engines. The output is simply C added with C. =head2 engine_major() Returns the major version number of the rendering engine. Currently this only returns a version number for Gecko and Trident. Returns C for all other engines. =head2 engine_minor() Returns the minor version number of the rendering engine. Currently this only returns a version number for Gecko and Trident. Returns C for all other engines. =head1 Detecting OS Platform and Version The following methods are available, each returning a true or false value. Some methods also test for the operating system version. The indentations below show the hierarchy of tests (for example, win2k is considered a type of winnt, which is a type of win32) =head2 windows() win16 win3x win31 win32 winme win95 win98 winnt win2k winxp win2k3 winvista win7 win8 win8_0 win8_1 wince winphone winphone7 winphone7_5 winphone8 =head2 dotnet() =head2 firefoxos() =head2 mac() mac68k macppc macosx ios =head2 os2() =head2 rimtabletos() =head2 unix() sun sun4 sun5 suni86 irix irix5 irix6 hpux hpux9 hpux10 aix aix1 aix2 aix3 aix4 linux sco unixware mpras reliant dec sinix freebsd bsd =head2 vms() =head2 amiga() =head2 ps3gameos() =head2 pspgameos() It may not be possibile to detect Win98 in Netscape 4.x and earlier. On Opera 3.0, the userAgent string includes "Windows 95/NT4" on all Win32, so you can't distinguish between Win95 and WinNT. =head2 os_string() Returns one of the following strings, or undef. This method exists solely for compatibility with the L module. Win95, Win98, WinNT, Win2K, WinXP, Win2k3, WinVista, Win7, Win8, Win8.1, Windows Phone, Mac, Mac OS X, iOS, Win3x, OS2, Unix, Linux, Firefox OS, Playstation 3 GameOS, Playstation Portable GameOS, RIM Tablet OS =head1 Detecting Browser Vendor The following methods are available, each returning a true or false value. Some methods also test for the browser version, saving you from checking the version separately. =head3 aol aol3 aol4 aol5 aol6 =head3 chrome =head3 curl =head3 emacs =head3 firefox =head3 gecko =head3 icab =head3 ie ie3 ie4 ie4up ie5 ie55 ie6 ie7 ie8 ie9 ie10 ie11 =head3 ie_compat_mode The ie_compat_mode is used to determine if the IE user agent is for the compatibility mode view, in which case the real version of IE is higher than that detected. The true version of IE can be inferred from the version of Trident in the engine_version method. =head3 java =head3 konqueror =head3 lotusnotes =head3 lynx links elinks =head3 mobile_safari =head3 mosaic =head3 mozilla =head3 neoplanet neoplanet2 =head3 netfront =head3 netscape nav2 nav3 nav4 nav4up nav45 nav45up navgold nav6 nav6up =head3 opera opera3 opera4 opera5 opera6 opera7 =head3 realplayer =head3 realplayer_browser The realplayer method above tests for the presence of either the RealPlayer plug-in "(r1 " or the browser "RealPlayer". To preserve "bugwards compatibility" and prevent false reporting, browser_string calls this method which ignores the "(r1 " plug-in signature. =head3 safari =head3 staroffice =head3 webtv Netscape 6, even though its called six, in the User-Agent string has version number 5. The nav6 and nav6up methods correctly handle this quirk. The Firefox test correctly detects the older-named versions of the browser (Phoenix, Firebird). =head2 browser_string() Returns undef on failure. Otherwise returns one of the following: Netscape, Firefox, Safari, Chrome, MSIE, WebTV, AOL Browser, Opera, Mosaic, Lynx, Links, ELinks, RealPlayer, IceWeasel, curl, puf, NetFront, Mobile Safari, BlackBerry. =head2 gecko_version() If a Gecko rendering engine is used (as in Mozilla or Firefox), returns the version of the renderer (e.g. 1.3a, 1.7, 1.8) This might be more useful than the particular browser name or version when correcting for quirks in different versions of this rendering engine. If no Gecko browser is being used, or the version number can't be detected, returns undef. =head1 Detecting Other Devices The following methods are available, each returning a true or false value. =head3 android =head3 audrey =head3 avantgo =head3 blackberry =head3 dsi =head3 iopener =head3 iphone =head3 ipod =head3 ipad =head3 kindle =head3 n3ds =head3 obigo =head3 palm =head3 webos =head3 wap =head3 psp =head3 ps3 =head2 mobile() Returns true if the browser appears to belong to a handheld device. =head2 tablet() Returns true if the browser appears to belong to a tablet device. =head2 robot() Returns true if the user agent appears to be a robot, spider, crawler, or other automated Web client. The following additional methods are available, each returning a true or false value. This is by no means a complete list of robots that exist on the Web. =head3 ahrefs =head3 altavista =head3 askjeeves =head3 baidu =head3 facebook =head3 getright =head3 google =head3 googleadsbot =head3 googleadsense =head3 googlemobile =head3 infoseek =head3 linkexchange =head3 lwp =head3 lycos =head3 msn (same as bing) =head3 puf =head3 slurp =head3 webcrawler =head3 wget =head3 yahoo =head3 yandex =head3 yandeximages =head1 CREDITS Lee Semel, lee@semel.net (Original Author) Peter Walsham (co-maintainer) Olaf Alders, C (co-maintainer) =head1 ACKNOWLEDGEMENTS Thanks to the following for their contributions: cho45 Leonardo Herrera Denis F. Latypoff merlynkline Simon Waters Toni Cebrin Florian Merges david.hilton.p Steve Purkis Andrew McGregor Robin Smidsrod Richard Noble Josh Ritter Mike Clarke Marc Sebastian Pelzer Alexey Surikov Maros Kollar Jay Rifkin Luke Saunders Jacob Rask Heiko Weber Jon Jensen Jesse Thompson Graham Barr Enrico Sorcinelli Olivier Bilodeau Yoshiki Kurihara Paul Findlay Uwe Voelker Douglas Christopher Wilson John Oatis Atsushi Kato Ronald J. Kimball Bill Rhodes Thom Blake Aran Deltac yeahoffline David Ihnen Hao Wu Perlover =head1 TO DO The C<_engine()> method currently only handles Gecko and Trident. It needs to be expanded to handle other rendering engines. POD coverage is also not 100%. =head1 SEE ALSO "Browser ID (User-Agent) Strings", L L. =head1 =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc HTTP::BrowserDetect You can also look for information at: =over 4 =item * GitHub Source Repository L =item * Reporting Issues L =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN Ratings L =item * Search CPAN L =back =head1 BUGS AND LIMITATIONS The biggest limitation at this point is the test suite, which really needs to have many more UserAgent strings to test against. =head1 CONTRIBUTING Patches are certainly welcome, with many thanks for the excellent contributions which have already been received. The preferred method of patching would be to fork the GitHub repo and then send me a pull request, but plain old patch files are also welcome. If you're able to add test cases, this will speed up the time to release your changes. Just edit t/useragents.json so that the test coverage includes any changes you have made. Please contact me if you have any questions. This distribution uses L. If you're not familiar with this module, please see L for some helpful tips to get you started. =head1 AUTHORS =over 4 =item * Lee Semel =item * Peter Walsham =item * Olaf Alders (current maintainer) =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2013 by Lee Semel. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut