Fully understand the delivery process, programming implementation and security issues

xiaoxiao2021-03-06  39

Cookie is a small dessert in English, and this term we can always see in the browser, how can foods talk to the browser? When you browse the website you visited, you may appear in the webpage: Hello XX, feel very kind, just like a small dessert. This is actually implemented by accessing a file in your host, so this file is also known as cookie. Want to fully understand cookies? Let's take a look at it! I. Understand the Cookie Applicable Object: Junior Reader Cookie is when you browse a website, the website is stored on a small text file on your machine, which records your user ID, password, viewed web, stay time, etc. When you come to the site again, the website learns your information by reading the cookie, you can make a corresponding action. If you are welcome to welcome your slogans, or let you enter ID, your password is directly Login, etc. You can select "Settings / View File" in the General tab of IE's Tools / Internet Options, see all Save to your computer. These files are typically named in user @ domain format. User is your local username, Domain is the domain name of the website accessed. If you use the Netscape browser, save it in "C: / Programfiles / Netscape / Users /", which is different from IE, Netscape is a cookies that records all sites using a cookie file. To ensure the Internet

Safety

We need to make appropriate settings for cookies. Open the Privacy tab in Tool / Internet Options (Note that this setting is only in IE6.0, and other version IE can "tool / Internet option" "

Safety

"Click the" Custom Level "button in the tab, make simple adjustment), adjust the cookie

Safety

level. Normally, the slider can be adjusted to the "high" or "high" position. Most forum sites need to use cookie information, if you never go to these places, you can

Safety

Level to "Block all cookies". If you just use the cookie of individual websites, you can click the "Edit" button to add the website you want to mask to the list. In the "Advanced" button option, you can set up the first cookie and third-party cookies. The first cookie is the cookie of the website you are browsing, and the third party cookie is not browsing the website. It is usually necessary to select "Reject" on a third party cookie, as shown in Figure 1. If you need to save your cookie, you can use the "Import Export" feature of the IE to open File / Import Export, and press the prompt operation. Most of the content in cookie has been encrypted, so in our opinion, only some unimedic alphanumeric combines, only the server's CGI handler knows their true meaning. Through some software we can see more, use the cookie information as seen using the cookie PAL software, as shown in Figure 2. It provides us with contents such as Server, Expires, Name, Value. Among them, Server is a website that stores cookies. Expires records the time and life of the cookie, the Name and Value fields are specific data (this report, Issue 10, Issue 42, I have a detailed description of the software).

download

Address: http://www.cbifamily.com/down/200411/cfnetwork/cp1.exe. Second, Cookie's delivery process Applicable object: Intermediate reader When you type a web site URL in the browser address bar, the browser sends a request to the web site and displays the result on the display. At this time, the page is looking for a cookie file set by Amazon website on your computer. If found, the browser sends the data in the cookie file together with the previously entered URL to the Amazon server. The server receives the cookie data, which will retrieve your ID in his database, your shopping record, personal preferences, etc., and record the new content, add to the database and cookie files. If you do not detect cookies or your cookie information is not in line with the information in the database, you are the first time to browse the site, the server's CGI program will create new ID information for you and saved to the database. Cookies are passed by the HTTP header information in the web code, and each web request for the browser can be passed with cookie, for example, the browser opens or refreshes web pages. The server adds cookies to the http header information of the web page, accompanying the web data back to your browser, the browser will select whether to save this data based on the cookie settings in your computer. If the browser does not allow cookies to be saved, then the data disappears after turning off the browser. The time saved on the computer is not the same, which is different from the settings of the server. Cookie has an Expires property that determines the save time of the cookie, the server can change the saving time of the cookie by setting the value of the ExpiRES field. If this property is not set, the cookie is only valid, shuts down the browser during the browsing web page, which automatically disappears, and most websites belong to this situation. Typically, cookies contain several fields of Server, Expires, Name, Value, where only the name and value fields, the contents of the expires, etc. are just to tell the browser how to handle these cookies. Third, cookie programming Implementation Object: Senior Reader Multi-page programming language provides support for cookie. Such as JavaScript, VBScript, Delphi, ASP, SQL, PHP, C #, etc. In these object-oriented programming languages, the programming utilization of cookies is basically similar, and the general process is: first create a cookie object (Object), and then assign, read, write, etc. for Cookies using the control function. So how do you get sensitive information in other user cookies through code? The following is a brief introduction. This method mainly has two steps, first to locate you need to collect cookie websites, analyze it, and construct the URL; then collect the collection of cookie's PHP code, and put it on the website you can control, when you don't know You can execute the PHP code after clicking the URL you constructed. Let's see the specific implementation process.

1. Analyze and construct the URL first to open the website we want to collect, here is http://www.xxx.net, the login website Enter the username "" (excluding quotation marks), analyzing the data , Get the code such as "http://www.xxx.net/txl/login/login.pl?username= "a1&passwd=&ok.x=28&ok.y=6" to replace "" For "