A browser homepage detection method, device, equipment and storage medium
By monitoring the creation of the browser process, locking and modifying the network address of the homepage window, the problem that the homepage locking function in the existing technology is easily evased, and the reliability of homepage locking is improved.
Patent Information
- Application Number
- CN201811646956.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-12-29
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2038-12-29
AI Technical Summary
The existing home page locking function is easily avoided, making it difficult to realize the real home page locking function.
After monitoring the browser process creation, obtain and lock the network address of the home page window, make sure it is modified to the specified network address, and send a page jump command to display the specified page.
Improve the reliability of home page locking and prevent Trojan viruses and malware from modifying the network address of the home page window again.
Smart Images

Figure CN111382375B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method, device, equipment and storage medium for detecting a browser homepage. Background Art
[0002] The browser homepage can often be modified, which provides opportunities for Trojans, viruses, malware, rogue plug-ins, etc. to modify the homepage. The homepage lock function can protect the browser homepage from being tampered with by malware, viruses, Trojans, etc., and can improve user experience perception.
[0003] The current homepage locking function mainly uses the technology of Inline Hook (inline hook) certain functions of the underlying modules in the operating system / browser, or uses the mechanism provided by the browser, such as registering BHO (Browser Help Objects).
[0004] Taking locking the homepage of Google Chrome as an example, you can Inline Hook kernel32's GetCommandLineW() API, or IAT Hook chrome.dll's call to kernel32!GetCommandLineW, and return a URL (Uniform Resource Locator) that you want to lock, so that the browser opens the specified URL.
[0005] Taking locking IE browser as an example, IE browser supports BHO mechanism. By registering a BHO, you can monitor the URLs visited by users. When you open the homepage and find that it is not a locked URL, you can call IWebBrowser2::Navigate to make the browser jump to the specified URL.
[0006] However, the above homepage locking technology is easy to be circumvented, and it is difficult to achieve a true homepage locking function. Summary of the invention
[0007] The embodiments of this specification provide a method, device, equipment and storage medium for detecting a browser homepage to improve the reliability of locking the homepage.
[0008] In a first aspect, an embodiment of the present specification provides a method for detecting a browser homepage, comprising:
[0009] After detecting the creation of the browser process, monitor the window of the browser;
[0010] After detecting that the homepage window of the above browser is created, obtaining the network address corresponding to the homepage window;
[0011] After determining that the network address is not the designated network address, the network address corresponding to the home page window is modified to the designated network address, and a page jump instruction is sent to the home page window, the page jump instruction is used to instruct the home page window to display the page corresponding to the designated network address.
[0012] The method provided by the embodiment of the present invention monitors the creation of the browser window after the creation of the browser process is detected, and obtains the network address corresponding to the homepage window after the homepage window is created. After determining that the network address is not the designated network address, it can be modified to the designated network address, and jump to the page corresponding to the designated network address, that is, the homepage is locked. Since the creation of the homepage window has been completed before the homepage is locked, and the page jump instruction is sent after the network address is modified to the designated network address, Trojan viruses, malicious software, etc. have no chance to modify the network address of the homepage window again, thereby improving the reliability of the homepage lock.
[0013] In combination with the first aspect, in a first implementation of the first aspect of the embodiment of the present invention, after monitoring the creation of the browser process, monitoring the window of the browser may be implemented as follows:
[0014] After monitoring the creation of the browser process through the first callback function, obtaining the creation information of the browser process through the first callback function, and calling the second callback function according to the creation information;
[0015] Correspondingly, after monitoring the creation of the homepage window of the above-mentioned browser, the network address corresponding to the homepage window is obtained, and its implementation method may include: after monitoring the creation of the homepage window of the browser through the second callback function, the network address corresponding to the homepage window is obtained.
[0016] The method provided by the embodiment of the present invention utilizes the existing callback function to monitor the creation of the browser process without occupying additional processing resources and the implementation method is simple.
[0017] In combination with the first aspect, in a second implementation of the first aspect of the embodiment of the present invention, the network address corresponding to the homepage window is obtained by the second callback function, and its implementation may include:
[0018] The IAccessible interface is called, and the network address displayed in the address bar corresponding to the home page window is obtained through the IAccessible interface.
[0019] In combination with the second implementation of the first aspect, in a third implementation of the first aspect of the embodiment of the present invention, the above-mentioned modification of the network address corresponding to the homepage window to the specified network address may include:
[0020] Use the IAccessible interface to modify the network address displayed in the address bar of the home page window to the specified network address.
[0021] In combination with the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, or the third implementation manner of the first aspect, in a fourth implementation manner of the first aspect of the embodiment of the present invention, the method may further include:
[0022] Match the network address corresponding to the homepage window with the network addresses in the network address blacklist;
[0023] Determine whether the network address corresponding to the home page window is the specified network address based on the matching result.
[0024] In combination with the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, or the third implementation manner of the first aspect, in a fifth implementation manner of the first aspect of the embodiment of the present invention, the method may further include:
[0025] Matching the network address corresponding to the homepage window with the designated network address;
[0026] Determine whether the network address corresponding to the homepage window is specified according to the matching result.
[0027] In combination with the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, or the third implementation manner of the first aspect, in a sixth implementation manner of the first aspect of the embodiment of the present invention, the sending of the trigger instruction to the homepage window may include:
[0028] Send a trigger instruction to the home page window through the PostMessage() function.
[0029] In combination with the first implementation method of the first aspect, the second implementation method of the first aspect or the third implementation method of the first aspect, in the seventh implementation method of the first aspect of the embodiment of the present invention, the above-mentioned creation information includes the process name, path and creation parameters of the browser process.
[0030] In a second aspect, an embodiment of the present invention provides a browser homepage detection device, comprising:
[0031] A browser window monitoring module, used to monitor the window of the browser after detecting the creation of the browser process;
[0032] A network address acquisition module, used to acquire the network address corresponding to the homepage window after monitoring the creation of the homepage window of the browser;
[0033] The homepage lock execution module is used to modify the network address displayed in the address bar corresponding to the homepage window to the specified network address after determining that the network address is not the specified network address, and send a page jump instruction to the homepage window, wherein the page jump instruction is used to instruct the homepage window to display the page corresponding to the specified network address.
[0034] The device provided by the embodiment of the present invention monitors the creation of the browser window after the creation of the browser process is detected, and obtains the network address corresponding to the homepage window after the homepage window is created. After determining that the network address is not the designated network address, it can be modified to the designated network address, and jump to the page corresponding to the designated network address, that is, the homepage is locked. Since the creation of the homepage window has been completed before the homepage is locked, and the page jump instruction is sent after the network address is modified to the designated network address, Trojan viruses, malicious software, etc. have no chance to modify the network address of the homepage window again, thereby improving the reliability of the homepage lock.
[0035] In conjunction with the second aspect, in a first implementation of the second aspect of an embodiment of the present invention, the browser window creation module is used to:
[0036] After monitoring the creation of the browser process through the first callback function, obtaining the creation information of the browser process through the first callback function; calling the second callback function according to the creation information;
[0037] The network address acquisition module is used to: after monitoring the creation of the homepage window of the browser through the second callback function, acquire the network address corresponding to the homepage window.
[0038] In combination with the second aspect, in a second implementation manner of the second aspect of the embodiment of the present invention, the network address acquisition module is used to:
[0039] The IAccessible interface is called, and the network address displayed in the address bar corresponding to the homepage window is obtained through the IAccessible interface.
[0040] In combination with the second implementation of the second aspect, in a third implementation provided by an embodiment of the present invention, in order to modify the network address displayed in the address bar corresponding to the homepage window to the specified network address, the homepage locking execution module is used to:
[0041] The network address displayed in the address bar corresponding to the homepage window is modified to the designated network address through the IAccessible interface.
[0042] In combination with the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, or the third implementation manner of the second aspect, in a fourth implementation manner of the second aspect of the embodiment of the present invention, the apparatus further includes a first matching module, configured to:
[0043] Matching the network address corresponding to the homepage window with the network addresses in the network address blacklist;
[0044] Determine whether the network address corresponding to the homepage window is a designated network address according to the matching result.
[0045] In combination with the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, or the third implementation manner of the second aspect, in a fifth implementation manner of the second aspect of the embodiment of the present invention, the apparatus further includes a second matching module, configured to:
[0046] Matching the network address corresponding to the homepage window with the designated network address;
[0047] Determine whether the network address corresponding to the homepage window is specified according to the matching result.
[0048] In combination with the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, or the third implementation manner of the second aspect, in a sixth implementation manner of the second aspect of the embodiment of the present invention, in order to send a trigger instruction to the home page window, the home page lock execution module is used to:
[0049] A trigger instruction is sent to the home page window via the PostMessage() function.
[0050] In combination with the first implementation of the second aspect, the second implementation of the second aspect or the third implementation of the second aspect, in the seventh implementation of the second aspect of the embodiment of the present invention, the creation information includes the process name, path and creation parameters of the browser process.
[0051] In a third aspect, an embodiment of the present invention provides a computer device, including a processor and a memory:
[0052] The memory is used to store a program for executing the method described in any embodiment of the first aspect above,
[0053] The processor is configured to execute the program stored in the memory.
[0054] In a fourth aspect, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used for the above-mentioned computer device, which includes a program designed for executing the computer device. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 A schematic diagram of the computer device structure provided by an embodiment of the present invention;
[0056] Figure 2 A flow chart of a method provided for one embodiment of the present invention;
[0057] Figure 3 A method flow chart provided for another embodiment of the present invention;
[0058] Figure 4 A device block diagram provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to better understand the above technical scheme, the technical scheme of the embodiment of the present invention is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiment of the present invention and the specific features in the embodiments are detailed descriptions of the technical scheme of the embodiment of the present invention, rather than limitations on the technical scheme of the present invention. In the absence of conflict, the embodiment of the present invention and the technical features in the embodiments can be combined with each other.
[0060] The method provided in the embodiment of the present invention can be but is not limited to Figure 1 The computer device provided by the embodiment of the present invention may be, but is not limited to, a desktop PC, a tablet computer, a notebook computer, a mobile terminal, or other computer device installed with browser software capable of modifying and configuring a homepage.
[0061] The present invention provides a method for detecting a browser homepage. Figure 2 ,include:
[0062] Step 201: After detecting that a browser process is created, monitor the window of the browser.
[0063] In the embodiment of the present invention, monitoring the window of the browser specifically refers to monitoring the creation of the browser window.
[0064] Step 202: After monitoring the creation of the homepage window of the above browser, obtain the network address corresponding to the homepage window.
[0065] In the embodiment of the present invention, the homepage window refers to a window created according to the homepage address after the browser process is created. Usually, after the browser process is created, the homepage window is created according to the specified network address, that is, the specified network address is displayed in the address bar, and the network address is accessed to obtain the webpage and displayed in the homepage window. However, when the specified network address (that is, the pre-set homepage address) is tampered with, the browser process will create a homepage window according to the tampered network address.
[0066] Step 203: after determining that the network address is not the designated network address, modify the network address displayed in the address bar corresponding to the homepage window to the designated network address, and send a page jump instruction to the homepage window, the page jump instruction is used to instruct the homepage window to display the page corresponding to the designated network address.
[0067] In the embodiment of the present invention, after receiving the page jump instruction, the homepage window can access the specified network address to obtain the page, and load and display the obtained page.
[0068] In the embodiment of the present invention, the page corresponding to the specified network address can also be saved or cached locally, so that after receiving the page jump instruction, the homepage window can obtain the page corresponding to the specified network address from the local computer for loading and display. This implementation method can avoid excessive page jump delay or jump failure caused by network transmission delay.
[0069] In the embodiment of the present invention, the designated network address may be obtained from, but is not limited to, the network address list included in the creation information.
[0070] The method provided in the embodiment of the present invention is applicable to locking the homepages of various browsers, such as Google Chrome, IE browser, etc.
[0071] The method provided by the embodiment of the present invention obtains the creation information of the browser process after monitoring its creation, and creates a window creation monitoring callback function according to the creation information. The callback function can be used to monitor the creation of the browser window and obtain the network address corresponding to the homepage window. After determining that the network address is not a designated network address, it can be modified to a designated network address and jump to its corresponding page, that is, the homepage is locked. Since the creation of the homepage window has been completed before the homepage is locked, and the trigger instruction is sent after the network address is modified to the designated network address, Trojan virus, malware, etc. have no chance to modify the network address of the homepage window again, thereby improving the reliability of the homepage lock.
[0072] In the above-mentioned embodiment of the present invention, step 201 and step 202 can be specifically implemented through a callback function. Specifically, after the creation of the browser process is monitored through the first callback function, the creation information of the above-mentioned browser process is obtained through the first callback function, and the second callback function is called according to the creation information; after the creation of the browser's homepage window is monitored through the second callback function, the network address corresponding to the homepage window is obtained.
[0073] In the embodiment of the present invention, the creation information may include, but is not limited to, the name, path, creation parameters, etc. of the browser process. The creation parameters may include, but are not limited to, information such as a network address list.
[0074] Accordingly, the second callback function is called, and the browser name and / or path in the creation information is written into the second callback function, so that the second callback function monitors the browser according to the browser name and / or path.
[0075] In the embodiment of the present invention, the first callback function is used to monitor the creation of a process, and the second callback function is used to monitor the creation of a web page window.
[0076] The method provided by the embodiment of the present invention utilizes the existing callback function to monitor the creation of the browser process without occupying additional processing resources and the implementation method is simple.
[0077] Based on any of the above method embodiments, the above method of obtaining the network address corresponding to the above home page window may include: calling an IAccessible interface, and obtaining the network address displayed in the address bar corresponding to the home page window through the IAccessible interface.
[0078] Furthermore, the above-mentioned modification of the network address displayed in the address bar corresponding to the homepage window to the specified network address may be implemented by: modifying the network address displayed in the address bar corresponding to the homepage window to the specified network address through the IAccessible interface.
[0079] Based on any of the above method embodiments, the network address corresponding to the homepage window can be matched with the network addresses in the network address blacklist; and whether the network address corresponding to the homepage window is the designated network address can be determined based on the matching result. Alternatively, the network address corresponding to the homepage window can be matched with the designated network address; and whether the network address corresponding to the homepage window is designated can be determined based on the matching result.
[0080] The specified network address may be, but is not limited to, obtained from the network address information in the creation information.
[0081] If the network address blacklist matching is used, then if the network address currently displayed in the address bar corresponding to the homepage window matches (e.g., is the same as) a network address in the network address blacklist, it means that the network address is not the designated network address. If the designated network address matching is used, then if the network address currently displayed in the address bar corresponding to the homepage window does not match (e.g., is not the same as) the designated network address, it means that the network address is not the designated network address.
[0082] The embodiment of the present invention does not limit the matching rules. In practical applications, the matching rules can be configured according to actual conditions.
[0083] In any of the above method embodiments, a page jump instruction may be sent to the home page window through a PostMessage() function.
[0084] The following takes the IE browser homepage lock as an example, combined with Figure 3 The method provided by the embodiment of the present invention is described in detail.
[0085] In this embodiment, the user clicks the graphic control of the IE browser by means of a mouse or a touch screen, and the operating system kernel detects the triggering event of the graphic control of the IE browser, creates the process of the IE browser, and calls the first callback function (CallBack). The first callback function is created in advance, for example, when the system starts, the driver calls the PsSetCreateProcessNotifyRoutine() kernel function, and uses the kernel function to create the first callback function, and the first callback function monitors the creation event of any process.
[0086] After the first callback function detects the IE browser process creation event, it sends the IE browser process creation information to the target module (i.e., a certain DLL file) in the Tray process; the target module calls the SetWinEvenHook API at this time to create the second callback function, and uses the second callback function to monitor the IE browser window creation event. When the window corresponding to the address bar of the IE browser (i.e., the homepage window) is created, the target module can be notified through the second callback function, and can obtain the window handle of the address bar, and call the IAccessible interface of MSAA (Microsoft Active Accessibility) through the window handle to obtain the network address (URL) in the address bar. The URL is checked using the black address database (i.e., the above-mentioned network address blacklist). If the URL is in the black address database, the URL in the address bar at this time is changed through the IAccessible interface, and a keyboard message is sent to make it jump to the specified network address and display the corresponding web page.
[0087] In this embodiment, a database of black URLs can be maintained locally. For example, if XXX.COM is in the black database, the network address can be changed again through the IAccessible interface (for example, to hao.360.cn). After completing only this step, although hao.360.cn is displayed in the address bar, the actual page is still the page corresponding to the previous network address. Therefore, it is necessary to call PostMessage() to send a keyboard message (that is, the trigger instruction corresponding to the Enter key) to the window corresponding to the address bar to open the modified specified network address (that is, the network address).
[0088] In the above embodiment, the Tray process is a process of security software that can implement the homepage locking function. In actual applications, the process can also be defined as other process names, which is not limited in the embodiment of the present invention.
[0089] In the above embodiment, the target module is a module that implements the homepage locking function. The target module monitors the creation of the browser process through the first callback function and obtains the creation information of the browser process by calling the first callback function. The target module can implement cross-process monitoring by calling the second callback function, that is, monitoring the window creation of the browser process.
[0090] Based on the same inventive concept as the method, an embodiment of the present invention provides a browser homepage detection device, such as Figure 4 As shown, including:
[0091] The browser window monitoring module 401 is used to monitor the window of the browser after detecting the creation of the browser process;
[0092] The network address acquisition module 402 is used to acquire the network address corresponding to the homepage window after monitoring the creation of the homepage window of the browser;
[0093] The homepage lock execution module 403 is used to modify the network address displayed in the address bar corresponding to the homepage window to the specified network address after determining that the network address is not the specified network address, and send a page jump instruction to the homepage window, wherein the page jump instruction is used to instruct the homepage window to display the page corresponding to the specified network address.
[0094] The device provided by the embodiment of the present invention obtains the creation information of the browser process after monitoring its creation, and creates a window creation monitoring callback function according to the creation information. The callback function can be used to monitor the creation of the browser window and obtain the network address corresponding to the homepage window. After determining that the network address is not a designated network address, it can be modified to a designated network address and jump to the corresponding page, that is, the homepage is locked. Since the creation of the homepage window has been completed before the homepage is locked, and the trigger instruction is sent after the network address is modified to the designated network address, Trojan viruses, malicious software, etc. have no chance to modify the network address of the homepage window again, thereby improving the reliability of the homepage lock.
[0095] Optionally, the browser window creation module is used to:
[0096] After monitoring the creation of the browser process through the first callback function, obtaining the creation information of the browser process through the first callback function; calling the second callback function according to the creation information;
[0097] The network address acquisition module is used to: after monitoring the creation of the homepage window of the browser through the second callback function, acquire the network address corresponding to the homepage window.
[0098] Optionally, the network address acquisition module is used to:
[0099] The IAccessible interface is called, and the network address displayed in the address bar corresponding to the homepage window is obtained through the IAccessible interface.
[0100] Optionally, in order to modify the network address corresponding to the homepage window to the designated network address, the homepage locking execution module is used to:
[0101] The network address displayed in the address bar corresponding to the homepage window is modified to the designated network address through the IAccessible interface.
[0102] Optionally, the device further includes a first matching module, configured to:
[0103] Matching the network address corresponding to the homepage window with the network addresses in the network address blacklist;
[0104] Determine whether the network address corresponding to the homepage window is a designated network address according to the matching result.
[0105] Optionally, the device further includes a second matching module, configured to:
[0106] Matching the network address corresponding to the homepage window with the designated network address;
[0107] Determine whether the network address corresponding to the homepage window is specified according to the matching result.
[0108] Optionally, in order to send a trigger instruction to the home page window, the home page lock execution module is used to:
[0109] A trigger instruction is sent to the home page window via the PostMessage() function.
[0110] Optionally, the creation information includes the process name, path and creation parameters of the browser process.
[0111] An embodiment of the present invention provides a computer device, including a processor and a memory:
[0112] The memory is used to store a program for executing the method described in any of the above embodiments,
[0113] The processor is configured to execute the program stored in the memory.
[0114] Figure 1 FIG. 1 is a block diagram showing a partial structure of a computer device related to a method embodiment provided by an embodiment of the present invention. Figure 1 The mobile phone includes: a power supply 110, a mainboard 120, a central processing unit (CPU) 130, a system bus 140, an internal memory 150, a disk 160, an input unit 170, a display unit 180, a network card 190 and other components. Those skilled in the art can understand that Figure 1 The computer device shown in the figure does not constitute a limitation of the computer device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0115] Combine the following Figure 1 A detailed introduction to the various components of computer equipment:
[0116] The power supply 110 is used to convert 220V AC into 5V, 12V, and 3.3V DC to supply various components in the computer device. Preferably, the power supply can be logically connected to the central processing unit 130 through a power management system, so that the power management system can manage charging, discharging, and power consumption.
[0117] The motherboard 120 is a platform for various components in the computer device to work, providing an electrical connection path between the components. Each component transmits electrical signals through the motherboard, and each component is installed on the motherboard by plugging, welding, etc.
[0118] The central processing unit 130 is the control center of the computer device, mainly including an arithmetic logic unit (ALU) 131, a program counter (PC) 132, a register group 133, a cache 134, and a bus interface 135 for transmitting data, control and status. Among them, the arithmetic logic unit 131 is a component that performs various arithmetic and logical operations. The basic operations include addition, subtraction, multiplication, and division, and, or, non, XOR, shift operations, as well as relational operations and logical operations. The program counter 132 is a register in the control component of the central processing unit 130, which is used to store the address of the next instruction; the register group 133 includes general registers, special registers and control registers. The register has a very high read and write speed, so the data transmission between registers is very fast. The cache 134 is a high-speed low-capacity memory composed of SRAM (Static Random Access Memory) for caching commonly used instructions and data. The bus interface 135 is used to transmit information between the CPU 130 and other components. The CPU 130 performs various functions of the computer device and processes data by running or executing applications stored in the internal memory 150 or the disk 160, and calling data stored in the internal memory 150 or the disk 160, thereby performing overall monitoring.
[0119] The system bus 140 is a common communication trunk line for transmitting information between various components of a computer device. It is a transmission line bundle composed of wires. According to the type of information transmitted by the computer device, the system bus can be divided into a data bus (DataBus), an address bus (Address Bus) and a control bus (Control Bus), which are used to transmit data, data addresses and control signals respectively.
[0120] The internal memory 150 is an electronic storage device, which is composed of a circuit board and a chip. It is characterized by small size, high speed, storage when powered on, and clearing when powered off. That is, the computer device can store data in the memory when it is turned on, and all data in it will be automatically cleared after it is turned off. The internal memory 150 can be divided into SDRAM (Synchronous Dynamic Random Access Memory) memory and DDR (Double Data Rate) memory. The application and related data are first read into the internal memory 150, and the central processing unit 130 reads and loads the application from the internal memory 150.
[0121] The disk 160 is also called an external memory, which stores the operating system, application programs, data, etc. required for the operation of the computer device, and the data will not be lost when the computer device is powered off.
[0122] The input unit 170 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the computer device. The input unit specifically includes an I / O controller and an input device, wherein the I / O controller is used to adapt the signal of the input device and transmit it to the system bus. The input unit 170 can be divided into a mouse 171, a keyboard 172, a touch panel 173, etc.
[0123] The display unit 180 may be used to display information input by the user or information provided to the user and various menus of the computer device. The display unit 180 may include a display card 181 and a display 182. Further, the touch panel 173 may cover the display panel of the display 182. When the touch panel 173 detects a touch operation on or near it, it is transmitted to the central processor 130 to determine the type of touch event, and then the processor 130 provides a corresponding visual output on the display panel of the display 182 according to the type of touch event. Although in Figure 1 In the embodiment, the touch panel 173 and the display 182 are two independent components to realize the input and output functions of the computer device, but in some embodiments, the touch panel 173 can be integrated with the display panel of the display 182 to realize the input and output functions of the computer device.
[0124] The network card 190 is a network component working at the data link layer and is an interface connecting a personal computer and a transmission medium in a local area network. The network card 190 can be divided into a wired network card and a wireless network card.
[0125] Although not shown, the computer device may also include input and output units such as a sound card, a speaker, a microphone, a camera, and communication units such as a Bluetooth module, which will not be described in detail here.
[0126] An embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the above-mentioned computer device, which includes a program designed for executing the computer device.
[0127] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that has the functions specified in one or more boxes.
[0128] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0129] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0130] Although the preferred embodiments of this specification have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of this specification.
[0131] Obviously, those skilled in the art can make various changes and modifications to this specification without departing from the spirit and scope of this specification. Thus, if these modifications and variations of this specification fall within the scope of the claims of this specification and their equivalents, this specification is also intended to include these modifications and variations.
[0132] The embodiments of the present invention disclose:
[0133] A1. A method for detecting a browser homepage, comprising:
[0134] After detecting the creation of the browser process, monitoring the window of the browser;
[0135] After monitoring the creation of the homepage window of the browser, obtaining the network address corresponding to the homepage window;
[0136] After determining that the network address is not the designated network address, the network address displayed in the address bar corresponding to the home page window is modified to the designated network address, and a page jump instruction is sent to the home page window, wherein the page jump instruction is used to instruct the home page window to display the page corresponding to the designated network address.
[0137] A2. The method according to A1, wherein after monitoring the creation of the browser process, monitoring the window of the browser comprises: after monitoring the creation of the browser process through a first callback function, obtaining the creation information of the browser process through the first callback function; and calling a second callback function according to the creation information;
[0138] The acquiring of the network address corresponding to the home page window after monitoring the creation of the home page window of the browser includes: acquiring the network address corresponding to the home page window after monitoring the creation of the home page window of the browser through the second callback function.
[0139] A3. According to the method described in A1, obtaining the network address corresponding to the homepage window includes:
[0140] The IAccessible interface is called, and the network address displayed in the address bar corresponding to the homepage window is obtained through the IAccessible interface.
[0141] A4. The method according to A3, wherein the network address displayed in the address bar corresponding to the homepage window is modified to the specified network address, comprising:
[0142] The network address displayed in the address bar corresponding to the homepage window is modified to the designated network address through the IAccessible interface.
[0143] A5. The method according to any one of A1 to A4, further comprising:
[0144] Matching the network address corresponding to the homepage window with the network addresses in the network address blacklist;
[0145] Determine whether the network address corresponding to the homepage window is a designated network address according to the matching result.
[0146] A6. The method according to any one of A1 to A4, further comprising:
[0147] Matching the network address corresponding to the homepage window with the designated network address;
[0148] Determine whether the network address corresponding to the homepage window is specified according to the matching result.
[0149] A7. The method according to any one of A1 to A4, wherein sending a trigger instruction to the homepage window comprises:
[0150] A trigger instruction is sent to the home page window via the PostMessage() function.
[0151] A8. According to any one of A2 to A4, the creation information includes the process name, path and creation parameters of the browser process.
[0152] B9. A device for detecting a browser homepage, comprising:
[0153] A browser window monitoring module, used to monitor the window of the browser after detecting the creation of the browser process;
[0154] A network address acquisition module, used to acquire the network address corresponding to the homepage window after monitoring the creation of the homepage window of the browser;
[0155] The homepage lock execution module is used to modify the network address displayed in the address bar corresponding to the homepage window to the specified network address after determining that the network address is not the specified network address, and send a page jump instruction to the homepage window, wherein the page jump instruction is used to instruct the homepage window to display the page corresponding to the specified network address.
[0156] B10. According to the device described in B9, the browser window creation module is used for:
[0157] After monitoring the creation of the browser process through the first callback function, obtaining the creation information of the browser process through the first callback function; calling the second callback function according to the creation information;
[0158] The network address acquisition module is used to: after monitoring the creation of the homepage window of the browser through the second callback function, acquire the network address corresponding to the homepage window.
[0159] B11. According to the device described in B9, the network address acquisition module is used for:
[0160] The IAccessible interface is called, and the network address displayed in the address bar corresponding to the homepage window is obtained through the IAccessible interface.
[0161] B12. According to the device described in B11, in order to modify the network address corresponding to the homepage window to the specified network address, the homepage locking execution module is used to:
[0162] The network address displayed in the address bar corresponding to the homepage window is modified to the designated network address through the IAccessible interface.
[0163] B13. The device according to any one of B9 to B12, further comprising a first matching module, configured to:
[0164] Matching the network address corresponding to the homepage window with the network addresses in the network address blacklist;
[0165] Determine whether the network address corresponding to the homepage window is a designated network address according to the matching result.
[0166] B14. The device according to any one of B9 to B12, further comprising a second matching module, configured to:
[0167] Matching the network address corresponding to the homepage window with the designated network address;
[0168] Determine whether the network address corresponding to the homepage window is specified according to the matching result.
[0169] B15. According to any one of B9 to B12, in order to send a trigger instruction to the home page window, the home page lock execution module is used to:
[0170] A trigger instruction is sent to the home page window via the PostMessage() function.
[0171] B16. According to the device according to any one of B10 to B12, the creation information includes a process name, a path and creation parameters of the browser process.
[0172] C17. A computer device comprising a processor and a memory:
[0173] The memory is used to store a program for executing any one of the methods described in A1 to A8,
[0174] The processor is configured to execute the program stored in the memory.
[0175] D18. A computer storage medium for storing computer software instructions used by the computer device described in C17, which includes a program designed for executing the computer device.
Claims
1. A method for detecting a browser homepage, characterized in that: include: After detecting the creation of the browser process, monitoring the window of the browser; After monitoring the creation of the homepage window of the browser, obtaining the network address corresponding to the homepage window; After determining that the network address is not the designated network address, the network address displayed in the address bar corresponding to the home page window is modified to the designated network address, and a page jump instruction is sent to the home page window, wherein the page jump instruction is used to instruct the home page window to display the page corresponding to the designated network address.
2. The method according to claim 1, characterized in that After monitoring the creation of the browser process, monitoring the window of the browser includes: after monitoring the creation of the browser process through a first callback function, obtaining the creation information of the browser process through the first callback function; calling a second callback function according to the creation information; The acquiring of the network address corresponding to the home page window after monitoring the creation of the home page window of the browser includes: acquiring the network address corresponding to the home page window after monitoring the creation of the home page window of the browser through the second callback function.
3. The method according to claim 1, characterized in that The obtaining of the network address corresponding to the homepage window includes: The IAccessible interface is called, and the network address displayed in the address bar corresponding to the homepage window is obtained through the IAccessible interface.
4. The method according to claim 3, characterized in that The step of modifying the network address displayed in the address bar corresponding to the homepage window to the designated network address includes: The network address displayed in the address bar corresponding to the homepage window is modified to the designated network address through the IAccessible interface.
5. The method according to any one of claims 1 to 4, characterized in that: The method further includes: Matching the network address corresponding to the homepage window with the network addresses in the network address blacklist; Determine whether the network address corresponding to the homepage window is a designated network address according to the matching result.
6. The method according to any one of claims 1 to 4, characterized in that: The method further includes: Matching the network address corresponding to the homepage window with the designated network address; Determine whether the network address corresponding to the homepage window is specified according to the matching result.
7. The method according to any one of claims 1 to 4, characterized in that: The sending of a trigger instruction to the homepage window includes: A trigger instruction is sent to the home page window via the PostMessage() function.
8. The method according to claim 2, characterized in that: The creation information includes the process name, path and creation parameters of the browser process.
9. A device for detecting a browser homepage, characterized in that: include: A browser window monitoring module, used to monitor the window of the browser after detecting the creation of the browser process; A network address acquisition module, used to acquire the network address corresponding to the homepage window after monitoring the creation of the homepage window of the browser; The homepage lock execution module is used to modify the network address displayed in the address bar corresponding to the homepage window to the specified network address after determining that the network address is not the specified network address, and send a page jump instruction to the homepage window, wherein the page jump instruction is used to instruct the homepage window to display the page corresponding to the specified network address.
10. The device according to claim 9, characterized in that The browser window creation module is used to: After monitoring the creation of the browser process through the first callback function, obtaining the creation information of the browser process through the first callback function; calling the second callback function according to the creation information; The network address acquisition module is used to: after monitoring the creation of the homepage window of the browser through the second callback function, acquire the network address corresponding to the homepage window.
11. The device according to claim 9, characterized in that The network address acquisition module is used for: The IAccessible interface is called, and the network address displayed in the address bar corresponding to the homepage window is obtained through the IAccessible interface.
12. The device according to claim 11, characterized in that In order to modify the network address corresponding to the homepage window to the specified network address, the homepage locking execution module is used to: The network address displayed in the address bar corresponding to the homepage window is modified to the designated network address through the IAccessible interface.
13. The device according to any one of claims 9 to 12, characterized in that: The device also includes a first matching module, configured to: Matching the network address corresponding to the homepage window with the network addresses in the network address blacklist; Determine whether the network address corresponding to the homepage window is a designated network address according to the matching result.
14. The device according to any one of claims 9 to 12, characterized in that: The device also includes a second matching module, configured to: Matching the network address corresponding to the homepage window with the designated network address; Determine whether the network address corresponding to the homepage window is specified according to the matching result.
15. The device according to any one of claims 9 to 12, characterized in that: In order to send a trigger instruction to the home page window, the home page locking execution module is used to: A trigger instruction is sent to the home page window via the PostMessage() function.
16. The device according to claim 10, characterized in that The creation information includes the process name, path and creation parameters of the browser process.
17. A computer device, characterized in that: Including processor and memory: The memory is used to store a program for executing the method according to any one of claims 1 to 8, The processor is configured to execute the program stored in the memory.
18. A computer storage medium, characterized in that: Used to store computer software instructions for use with the computer device of claim 17, comprising a program designed to execute the computer device.
Citation Information
Patent Citations
Method and device for preventing homepage tamper
CN102831358A