Research on Window Interceptor in Windows XP Service Pack 2

xiaoxiao2021-03-06  59

1 Introduction 1.1 Study Background Microsoft officially issued a huge Windows XP Service Pack 2 (English version) in August 2004, which is not a simple patch upgrade, but integrates a number of new technology Windows system updates. Microsoft claims that SP2 solves the previous system vulnerabilities and greatly enhances Windows security. For web developers, it is worth paying attention to the SP2 joined POP-UP (pop-up intercept) function in IE, which will affect the export of most of the world's use of pop-ups. Although this feature has been added in Netscape and other browsers, and Google and China's search company BAIDU launched this feature, but this upgrade is affecting the IE of most market share. Considerable. Because of the 80% share of the browser market, each site has to use the pop-up window.

1.2 Reference 1) Microsoft Windows XP Service Pack 2 Functions Http://www.microsoft.com/china/technet/prodtechnol/winxppro/maintain/sp2chngs.mspx2) Try your web site to accommodate Windows XP Service Pack 2 HTTP : //www.microsoft.com/china/MSDN/library/Windev/WindowsXP/USdnwxpxpsp2web.mspx3) Windows XP Service Pack 2 training for developers http://msdn.microsoft.com/security/productinfo/XPSP2/introduction .aspx4) msdn http://msdn.microsoft.com http://www.microsoft.com/china/msdn/

2 Project Overview 2.1 Research Entry Research on the Pop-Up Blocker feature and principle of IE in Windows XP Service Pack 2, finds the resolution of the site's pop-up window in IE (SP2).

2.2 Test Environment Windows XP Professional Version 2002 Service Pack 2Internet Explorer 6.0.2900.2180

2.3 Project cycle August 26th to September 20th, September 20th

3 Project Content 3.1 Windows XP SP 2 Introduction Windows XP Service Pack 2 has made many major improvements to the operating system to enhance the security of your personal computer. It can defruse usually attacks, network protection, memory protection, enhanced email security and more securely browse the Internet. On the other hand, Service Pack 2 provides a more convenient system update program. Administrators can easily control enterprise network security, and users can easily use Bluetooth devices. Service Pack 2 also includes DirectX 9 and Windows Media Player 9 that includes improvements in security, performance, and functionality.

By Windows XP Service Pack 2 (SP2), Microsoft introduces a set of security technologies that will help improve Windows XP-based computers against viruses and worm malicious attacks. These technologies include: • Network protection • Memory protection • Enhanced email security • More secure browsing

3.2 POP-UP Blocker

Windows XP SP2 adds POP-UP Blocker in Internet Explorer, which blocks or blocks most of the pop-up window. For windows open by the end user click link, it will not be affected, and the pop-up window from the local network and the trust site is not blocked.

POP-UP Blocker defaults to open state, which prevents automatic opening and pop-up windows open in the background, but the user clicking on the link is still displayed normally. Enable POP-UP Blocker can enable POP-UP Blocker using three different ways. • The first appearance prompt appears before the first pop-up window appears, ask the user to enable POP-UP Blocker. • Tools menu In Internet Explorer, on the Tools menu, click the Shield pop-up window, then click Block Popup Window. • Internet Options. On Internet Explorer's Tools menu, click the Privacy tab, then click Shield, then click Shield pop-up window. Then click on the option to set the POP-UP Blocker. When a pop-up window is blocked: When a site's pop-up window is blocked, a notification is displayed on the status bar and a sound will be displayed on the address bar on the display area (you can do not play the sound and Display the information bar, see the advanced setting options later). Click on the notification on the status bar to see a menu with the following options: • Displays the blocked pop-up window. Reload the pop-up window. • Allows pop-up windows from this site. Add the current site to the Allow list. • Block the pop-up window. Turn the POP-UP Blocker on or off. • Pop up the window option. Open the Popup Window Management window. The information bar will display the pop-up window to be blocked and inform the user to allow pop-ups and other settings by clicking the information bar: • Display the blocked pop-up window. Reload the pop-up window. • Allows pop-up windows from this site. Add the current site to the Allow list. • Set whether to block the pop-up window and display the information bar and more advanced settings. • Failure help.

Advanced Settings Options Trust Site List End User and IT administrators can allow automatic pop-up windows of these websites by joining some websites to a list of trust sites.

Filter Level Settings and Other Options Three Filter Level: Advanced: Block All Popup Windows (You can click on the Alt Key to click the link to open the window: block most automatic pop-up window (default level) Low level: Allow the security site's pop-up window Other options: Whether you play a piece of sound when a pop-up window is masked When a pop-up window is blocked?

* The following is unless otherwise labeled, it is under the default setting of POP-UP Blocker.

Blocking Mechanism POP-UP Blocker will screen any windows that automatically open from scripts other than CreatePopup () (IE5.5 and above, see Appendix). Some common functions affected by this are: window.open (), showmodelessdialog (), showModalDialog (), showhelp (), Window.external.navigateFind ().

In the existing information, Microsoft has not provided the ability to detect whether the user has opened the IE Blocker, but provides how to check if the window is blocked.

For Window.open () open, the function will return null values ​​when the window is blocked. When the pop-up is blocked, the value is always checked before using the return value of Window.open () to avoid scripting errors. popup test </ title> <script language = javascript> function openwin () {var sreturn = WINDOW.OPEN ("http://www.creative.com"); if (sreturn == null) {ErrorLog.innerHtml = "Pop-up blolcked. <font color = red>" SRETURN "</ font>";}} </ script> </ head> <body οnlοad = "openwin ()> <div id =" errorlog "> </ div> </ body> </ html> This example shows how to check the function return value to determine if the pop-up window opened by the Window.Open () method is blocked.</p> <p>For the window that uses ShowModelessDialog (), ShowModalDialog (), ShowModalDialog (), ShowHelp (), can process the pop-up window to be blocked by: 1 If the browser version is IE 5.0 and above, then you can code in JavaScript code. Use the TRY / CATCH structure to process. As shown in the following code: <! Doctype html public "- // w3c // DTD html 4.0 transitional // en"> <html> <head> <title> popup tester - try / catch construct </ title> </ head > <Body οnlοad = "openwin ()> <form id =" form1 "method =" post "runat =" server "> <div id =" errorlog "> </ div> </ form> </ body> < Script language = javascript> function openwin () {Try {WINDOW.SHOWMODALDIALOG ("www.creative.com");} catch (e) {errorlog.innerhtml = "POP-UP Blocked. <br />"; errorlog.innerhtml = "ERROR NUMBER:" E.Number;}} </ script> </ html> In this case, the window automatically opened through the openwin () function when the page is initialized, and the error message and error are displayed. Code.</p> <p>2 Set the function of the open window to set the JavaScript error handle. As shown below: <! Doctype html public "- // w3c // DTD html 4.0 transitional // en"> <html> <head> <title> Onerror Event </ title> </ head> <body οnlοad = "showpopup ()> <Div ID = "ErrorLog"> </ div> <script language = javascript> Function Handlepopuperrors (SMSG, SURL, SLINE) {ErrorLog.INNERHTML = "<b> an error Was thrown and caught </ b> <p> "; errorlog.innerhtml =" error: " SMSG " <br> "; errorlog.innerhtml =" line: " sline " <br> "; errorlog.innerhtml = "URL:" SURL "<br>"; Return False;} Function showPopup () {WINDOW.SHOWHELP ("http://www.creative.com", "");} </ script> </ html> This example demonstrates the exception information when the window is blocked by setting an error handle. As with the above method, you can notify the user to disable the pop-up blocker or add the site to the trusted site domain to view the pop-up content. Some inappropriate measures 1) When the pop-up window is blocked and redirected or closed When the site pop-up window is blocked, it is not possible to access the pop-up of the population for the user. Similarly, if a window is turned off due to blocking pop-up, the user cannot see the information bar.</p> <p>2) Starting the pop-up pop-up of pop-up pop-up from the pop-up window Pop-Up Blocker will block any automatic pop-up window, even start a new automatic pop-up window from the pop-up window.</p> <p>3) Do not automatically launch the SthomePage () dialog as the pop-up window, the automatic started setomePage () prompt will be blocked.</p> <p>4) When asynchronous request information, the site does not open a new window If the site opens a specific window after asynchronous request information, Internet Explorer may block these windows, even if the user clicks on the link to open the window.</p> <p>5) Do not start the pop-up window from the ActiveX control or other object or other object, if the window is not started from the user, then the pop-up block will block it. One window must be in response to direct user operations to be opened.</p> <p>General pop-up recommendations • Do not redirect when the pop-up window fails. • If the pop-up window, the download or ActiveX control is blocked, do not close or automatically redirect the browser window. If you close or redirect your browser window, the user will not be able to click and accept pop-up windows, download or activeX controls on the "File Bar". • Do not start the pop-up window from the pop-up window. • Do not start multiple pop-up windows from one user action. • Do not start the automatic pop-up window from ShowModelessDialog () or ShowModalDialog () calls.</p> <p>3.3 Pop-up restrictions Do not set the script to leave the screen visual area of ​​the pop-up window, address bar, or status bar. Service Pack 2 will limit the window that pops up using a Window.Open () or Window.createPopup () method to ensure that all of the information is visible. 1 For a window opened using Window.Open (), ensure that the status bar can be displayed and the window does not overwrite the taskbar. If the location of the pop-up window is outside the screen, window restrictions adjust the X and Y coordinates of the window so that it is fully displayed in the screen. In addition, now, Window.Open () with fulscreen = yes will result in the maximized window, not the window of the Kiosk mode. Regardless of the width and height of the pop-up window, it will be restricted to the screen.</p> <p>Note: The Kiosk mode is a web browser mode that does not show any browser control items (such as toolbars) as shown above. The pop-up window opened by Window.Open () may overwrite the task bar or a parent window, so Please make sure the pop-up window is displayed correctly.</p> <p>2 For the window using Window.createPopup () will not overwrite the title bar or status bar of the parent window, so even if the height of the window is set to exceed the parent window or the screen size, SP2 still limits it to ensure the title bar of the parent window. Or status bar. Also, if the user does not have the maximum parent window, when the parent window is located in different locations of the screen, the pop-up window may even be outside the parent window or all of the screen. In the figure above, the window (section of the blue border, red background) opened by window.createpopup () is set to width 1400, high 900, but when the display is displayed, the pop-up window is limited to ensure the parent window. The title bar or taskbar, and its width is not affected. The two figures illustrate that when the parent window of the non-maximization state is in different positions of the screen, the pop-up window may occur.</p> <p>No matter which script open window, you need to consider the display of the UI element such as display topics, font size, and resolution, etc. when designing.</p> <p>3.4 How to detect whether the browser of the browse site is Internet Explorer in SP2 can be detected using Window.navigator.USERAgent. Var g_fissp2 = false; function browserversion () {g_fissp2 = (window.navigator.useragent.indexof ("sv1")! = -1); if (g_fissp2) {// this Browser is Internet Explorer in SP2.} else {/ / This Browser is not internet explorer in sp2.}</p> <p>If the user agent string contains "SV1", the browser connected to your site is Internet Explorer in SP2.</p> <p>3.5 Other Windows XP Service Pack 2 (SP2) also has an impact on the installation and download files of the ActiveX control.</p> <p>In SP2, the mode installation of the ActiveX control will be blocked by the information bar and prompting the site to require the control. Users can install the ActiveX control by clicking the information bar. Installing the ActiveX control for using the pop-up window and the HTML dialog is also blocked.</p> <p>The file download prompt that does not have the user clicking or pressing the button will also be blocked by the information bar.</p> <p>4 Conclusions Windows Service Pack 2, POP-UP Blocker prevents a window that automatically pops up except for most of CreatePopup (). It can be judged by the return value of the function to determine whether the pop-up window is blocked and further measures can be taken.</p> <p>Appendix: CreatePopup () Method</p> <p>Internet Explorer 5.5 supports a new method for Window objects, createPopup (). You can create a pop-up window in the following way:</p> <p>Var popupobj = window.createPopup (); When you create this object, the window will not be displayed, you must call it:</p> <p>Popupobj.show (Yoffset, Xoffset, Width, Height, ReferenceObj):</p> <p>YOFSET is a horizontal coordinate offset from the upper left corner of the screen. Xoffset is a horizontal coordinate offset from the upper right corner of the screen. Width is the width of the pop-up window. Height is the height of the pop-up window. ReferenceObj is a parameter that replaces the top corner of the screen, with setting it you can define Yoffset and Xoffset relative to its location.</p> <p>Below is an example of a pop-up window that defines the background and border:</p> <p><SCRIPT LANGUAGE = "JavaScript"> <- var oPopup = window.createPopup ();! Var oPopupBody = oPopup.document.body; oPopupBody.style.backgroundColor = "magenta"; oPopupBody.style.border = "solid blue 3px "; opopbody.innerhtml =" Click Outside <b> popup </ b> to close. "; opopup.show (300, 80, 200, 50, document.body); // -> </ script></p> <p>Reference documentation about CreatePopup () on MSDN: http://msdn.microsoft.com/Workshop/author/dhtml/reference/meth 4/createpopup.asp</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-112721.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="112721" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.042</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = '_2FDAWkbVEGepoKYz6o4yTCb_2FxYGVz70Fk0tIvh7oXhRX6zW_2Bf13lL7YnySo4qkwGHMlouAvgWh9QE_2Byp5hYUGlQ_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>