Detect browser rendering engines, platforms, Windows operating systems, mobile devices, and game systems for accessing Web pages
/** * Author:laixiangran.
* Created by Laixiangran on 2015/12/02. * Detect access to Web page browser rendering engine, platform, Windows operating system, mobile device and gaming system * ******************************************************************** * User agent string for each version browser under windows10.0: * Google Chrome 45.0.2454.85--"mozilla/5
Ie
Only IE supports the creation of ActiveX controls, so she has something that other browsers do not have, that is, the ActiveXObject function. As long as you judge the Window object exists ActiveXObject function, you can clearly determine the current browser is ie. The typical useragent of IE versions are as follows:
mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2)mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)mozilla/4.0 (compatible; MS
Have nothing to do, play a Linux curl command. Very simple requirements to carry cookies to forge legitimate post requests.
First of all, copy the parameters of the Curl command:
Syntax: # curl [option] [url]
-a/--user-agent
Of course, the above is not detailed enough, the rest will be left to add later.
Back to the topic, my demo is this, first through the Curl command to obtain a website cookie, and then carry this cookie, as well as some parameters, in the site exposed to the interface to
browser to crawl the Web pageSome web pages, such as logins. If you are not a browser-initiated request, this will not give you a response, then we need to write the header ourselves. Then send it to the Web server, then it thinks you are a normal browser. So we can crawl!#python3.4 Crawler Tutorial # A simple example crawler # Lin Bingwen evankaka (blog: http://blog.csdn.net/evankaka/) Import Urllib.requestweburl = "/http/ www.douban.com/"Webheader = {' user-agent ': ' mozilla/5.0 (Windows NT
/534.50 (khtml, like Gecko) version/5.1 safari/534.50" ,"mozilla/5.0 (Macintosh, Intel Mac OS X 10_7_0) applewebkit/535.11 (khtml, like Gecko) chrome/17.0.963.56 safari/535.1 1 ","mozilla/5.0 (Macintosh, U, Intel Mac OS X 10_6_8, en-us) applewebkit/534.50 (khtml, like Gecko) version/5.1 safari/53 4.50 ","mozilla/5.0 (Linux, U, Android 3.0, en-us, Xoom build/hri39
To figure out what the browser kernel is, you should first understand the browser's composition. In short, the browser can be divided into two parts, shell+ kernel. There are relatively many kinds of shell, and the kernel is relatively small. The shell refers to the browser's shell: menus, toolbars, and so on. The main is to provide user interface operation, parameter settings and so on. It is called the kernel to implement various functions. The kernel is the core of the browser. The kernel is
Typical browsers: http_user_agent
IEThe typical useragent versions of IE are as follows:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2)Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)The version number is a number after MSIE.
FirefoxThe useragent versions of Firefox are roughly as follows:Mozilla/5.0 (windows; U; Windows NT 5.2) Gecko/2008070208 Firefo
OpenBSD package.
For OpenBSD,The testers reported this combination working inOpenBSD-current. I 've since found that it worksVimeo videos in OpenBSD 4.8-release and cocould very well work for YouTube in 4.9-release.
This just hit the OpenBSD-MISC mailing list today, and I hope more reports to flow in over the next day or so, helping us figure out exactly what this Firefox add-on is capable.
The package that makes this happen For OpenBSD,Gecko-mediapl
LogLevel warnError log Error_log level is a warning, this level is the default
Logformat "%h%l%u%t \%r\"%>s%b \ "%{referer}i\" \ "%{user-agent}i\" "combined
Combined log format (Combined log)
%H host name,%l remote registration name%u remote user%t time (in English format)
Represented in the shell as:
[root@test230 logs]# date + "%d/%b/%y:%t%z"
[root@test230 logs]# 16/may/2012:15:16:49 +0800
/"%r/" requests the first line of%>s state,%b bytes sent, matching {referer and user-agent headers
. Next let's take a look at the obstacles and problems encountered by large-scale batch retrieval.Difficulty 1: Due to Google's restrictions, millions of sites can be returned for each instant search, but you can obtain up to 1000 sites.Difficulty 2: In addition, not all websites contain vulnerabilities. Generally, the ratio of the expected vulnerabilities is below 1000 (of course, this is not static, the publication date of the test vulnerability ).Difficulty 3: Google will pop up a verificatio
corresponds to the getBoundingClientRect function ). This is exclusive to Firefox. It can be determined that the current browser is Firefox. The userAgent versions of Firefox are roughly as follows:
The Code is as follows:
Mozilla/5.0 (Windows; U; Windows NT 5.2) Gecko/2008070208 Firefox/3.0.1Mozilla/5.0 (Windows; U; Windows NT 5.1) Gecko/20070309 Firefox/2.0.0.3Mozilla/5.0 (Windows; U; Windows NT 5.1)
.
Let's analyze the features of various browsers and Their userAgent.
IE
Only IE supports the creation of ActiveX controls, so she has something that is not available in other browsers, namely the ActiveXObject function. As long as you determine that the window object has the ActiveXObject function, you can clearly determine that the current browser is IE. The typical userAgent versions of IE are as follows:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)Mozilla/4.0 (compatible; MSIE 7.0; Win
This article mainly introduces information about browser rendering engines, platforms, Windows operating systems, mobile devices, and game systems that access web pages based on javascript code detection, if you need a friend, you can refer to the following nonsense and paste the js Code directly to everyone. The code is accompanied by comments. If you are interested, learn it together.
/*** Author: laixiangran. * Created by laixiangran on 2015/12/02. * detects browser rendering engines, platf
The previous article "Web development compatibility series (I): useragent values for browsers of different devices" lists the useragent values of common computer browsers and smart phone browsers.
Here, we analyze the features of the browser's respective useragent and provide the judgment method:
Windows operating system browser series:
IE browser series:Features: all features start with "Mozilla/", and "X" in "MSIE x.0;" indicates the version;Method of determination: you can retrieve only the
browsers, namely the activexobject function. As long as you determine that the window object has the activexobject function, you can clearly determine that the current browser is IE. The typical useragent versions of IE are as follows:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2)Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)
The version number is a number after MSIE.
Firefox
All DOM elemen
useragent versions of IE are as follows:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2)Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)
The version number is a number after MSIE.
Firefox
All DOM elements in Firefox have a getboxobjectfor function to obtain the location and size of the DOM element (ie corresponds to the getboundingclientrect function ). This is exclusive to Firefox. It can be de
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.