WO2017016458A1 - 应用程序内的页面处理方法和装置 - Google Patents

应用程序内的页面处理方法和装置 Download PDF

Info

Publication number
WO2017016458A1
WO2017016458A1 PCT/CN2016/091539 CN2016091539W WO2017016458A1 WO 2017016458 A1 WO2017016458 A1 WO 2017016458A1 CN 2016091539 W CN2016091539 W CN 2016091539W WO 2017016458 A1 WO2017016458 A1 WO 2017016458A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
address
application
page access
access request
Prior art date
Application number
PCT/CN2016/091539
Other languages
English (en)
French (fr)
Inventor
吴张树
李永剑
彭力扬
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201510441013.7A external-priority patent/CN105100298A/zh
Priority claimed from CN201510441257.5A external-priority patent/CN105141709B/zh
Priority claimed from CN201510441057.XA external-priority patent/CN105354511A/zh
Application filed by 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2017016458A1 publication Critical patent/WO2017016458A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a page processing method and apparatus in an application.
  • DNS Domain Name System
  • the present invention has been made in order to provide a page access method and apparatus within an application that overcomes the above problems or at least partially solves the above problems.
  • a method for accessing a page in an application includes:
  • the first IP address is verified by using the second IP address, and a page access request generated according to the page access instruction in the application is sent to the verified first IP address.
  • a method of determining a page jump within an application comprising:
  • a call to the function is called to determine if a jump occurs in the first response page within the application.
  • a method for detecting an in-app page tampering comprising:
  • a page access device within an application comprising:
  • the instruction trigger is adapted to receive, by the application, a first IP address returned by the first DNS server and corresponding to the domain name resolution request when the page access instruction is triggered by the application to send a domain name resolution request to the first DNS server;
  • a requesting sender configured to send the domain name resolution request to a second DNS server
  • An address receiver configured to receive a second IP address corresponding to the domain name resolution request returned by the second DNS server
  • the check accessor is adapted to check the first IP address by using the second IP address, and send a page generated by the page access instruction in the application to the verified first IP address. Access request.
  • an apparatus for determining a page jump within an application comprising:
  • a page receiver configured to receive a first response page corresponding to the page access request when the application triggers the page access request based on the page access instruction input by the user;
  • the jump determiner is adapted to determine whether a jump occurs in the first response page in the application by calling the check-in function.
  • an apparatus for detecting an in-app page tampering comprising:
  • a page receiver configured to receive a first response page corresponding to the page access request when the application triggers the page access request based on the page access instruction input by the user;
  • the tamper detector is adapted to load a scan script embedded in the first response page to detect whether the first response page in the application is tampered with.
  • a computer program comprising computer readable code, when the computer readable code is run on a terminal device, causing the terminal device to execute within any of the applications described above Page access method.
  • a computer readable medium storing a computer program for executing a page access method within any of the above-described applications is provided.
  • a computer program comprising computer readable code, when the computer readable code is run on a terminal device, causing the terminal device to perform any of the above-described determination applications The method of page jump.
  • a computer readable medium storing a computer program for performing any of the methods of determining a page jump within an application.
  • a computer program comprising computer readable code, when the computer readable code is run on a terminal device, causing the terminal device to perform any of the detection applications described above Page tampering method.
  • a computer readable medium storing a computer program for performing any of the above-described methods of detecting an in-app page tampering.
  • the page access method and device in the application program of the embodiment of the present invention can verify the first IP address returned by the first DNS server by using the second IP address returned by the second DNS server, and check the first IP address.
  • the address is sent in the application according to the page access instruction generated by the page access instruction, which ensures the normal access of the page, improves the user experience, and ensures the user's information security and property security.
  • the method and device for determining a page jump in an application may determine whether a jump occurs in the first response page in the application by calling a check-in function, and can accurately and accurately determine whether the first response page jumps. Turn, improve the user experience, and ensure the user's information security and property security.
  • the method and device for detecting page tampering in an application can detect whether the first response page in the application program has been tampered by loading a scan script embedded in the first response page, and can accurately and accurately determine the Whether the first response page has been tampered with improves the user experience.
  • FIG. 1 is a flowchart of a page access method in an application according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a page access method in an application according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a page access method in an application according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of a method for determining a page jump in an application according to an embodiment of the present invention
  • FIG. 5 is a flowchart of a method for determining a page jump in an application according to an embodiment of the present invention
  • FIG. 6 is a flowchart of a method for determining a page jump in an application according to an embodiment of the present invention
  • FIG. 7 is a flowchart of a method for determining a page jump in an application according to an embodiment of the present invention.
  • FIG. 8 is a flowchart of a method for detecting a page tampering in an application according to an embodiment of the present invention
  • FIG. 9 is a flowchart of a method for detecting a page tampering in an application according to an embodiment of the present invention.
  • FIG. 10 is a flowchart of a method for detecting a page tampering in an application according to an embodiment of the present invention
  • FIG. 11 is a flowchart of a method for detecting a page tampering in an application according to an embodiment of the present invention
  • FIG. 12 is a flowchart of a method for detecting a page tampering in an application according to an embodiment of the present invention
  • FIG. 13 is a flowchart of a method for detecting a page tampering in an application according to an embodiment of the present invention
  • FIG. 14 is a structural block diagram of a page access device in an application according to an embodiment of the present invention.
  • FIG. 15 is a structural block diagram of an apparatus for determining a page jump in an application according to an embodiment of the present invention.
  • 16 is a structural block diagram of a device for detecting a page tampering in an application according to an embodiment of the present invention
  • Figure 17 shows a block diagram of a terminal device for performing the method according to the invention.
  • Figure 18 shows a storage unit for holding or carrying program code implementing the method according to the invention.
  • FIG. 1 is a flowchart of a page access method in an application according to an embodiment of the present invention; referring to FIG. 1, the method includes:
  • the first DNS server is usually a carrier local DNS server, but the content in the DNS server may be tampered with. Of course, it may also be a DNS server modified by the hacker (ie, the application's DNS server address). modified).
  • the domain name resolution request includes a domain name to be resolved, and correspondingly, the first IP address corresponding to the domain name resolution request is an IP address corresponding to the domain name to be resolved.
  • S102 Send the domain name resolution request to a second DNS server.
  • the second DNS server can be understood as a DNS server provided by a third party, and the link address of the second DNS server can be directly stored locally.
  • the second DNS server is directly found locally.
  • the link address, the domain name resolution request is sent to the second DNS server according to the link address.
  • the domain name resolution request is sent to the second DNS server in plain text (ie, HTTP protocol, etc.), it is easily intercepted by the hacker, and it is difficult to ensure the authenticity of the information returned by the second DNS server.
  • the domain name resolution request is sent to the second DNS server through an encryption protocol (ie, an HTTPS protocol, etc.);
  • step S102 if all the domain name resolution requests are sent to the first DNS server and sent to the second DNS server, the page access speed is affected.
  • the three determination conditions may be used in the embodiment.
  • step S102 determine whether the local connection to the first DNS server for the first time, and if so, proceed to step S102;
  • the first DNS server to which it belongs it is very likely that a change will occur, so it is necessary to verify the first IP address returned by the first DNS server.
  • step S102 it is determined whether the local IP address changes, and if yes, step S102 is performed.
  • the first DNS server to which it belongs is also likely to change, and it is necessary to check the first IP address returned by the first DNS server.
  • S103 Receive a second IP address that is returned by the second DNS server and that is corresponding to the domain name resolution request.
  • the second DNS server if the domain name resolution request is sent to the second DNS server through an encryption protocol (ie, an HTTPS protocol, etc.), the second DNS server returns the second IP address through an encryption protocol.
  • an encryption protocol ie, an HTTPS protocol, etc.
  • S104 Check the first IP address by using the second IP address, and send a page access request generated according to the page access instruction in the application to the verified first IP address.
  • the first IP address returned by the first DNS server is verified by the second IP address returned by the second DNS server, and the first IP address sent after the verification is generated in the application according to the page access instruction.
  • the page access request ensures the normal access of the page, improves the user experience, and ensures the user's information security and property security.
  • FIG. 2 is a flowchart of a page access method in an application according to an embodiment of the present invention. referring to FIG. 2, the method includes:
  • S202 Send the domain name resolution request to the second DNS server.
  • S203 Receive a second IP address corresponding to the domain name resolution request returned by the second DNS server.
  • steps S201-S203 are the same as steps S101-S103 of the embodiment shown in FIG. 1, and details are not described herein again.
  • S204 determining whether the first IP address is the same as the second IP address. If the first IP address is the same as the second IP address, determining that the first IP address is verified, if If the first IP address is different from the second IP address, it is determined that the first IP address is not verified, and the first IP address is modified to a second IP address, and the first IP address is verified.
  • the address sends a page access request generated within the application according to the page access instruction.
  • the first IP address is the same as the second IP address, it is determined that the first IP address is verified.
  • the first IP address after the verification is the first IP address itself; if the first IP address is different from the second IP address, it is determined that the first IP address is not verified, and The first IP address is modified to a second IP address. In this case, the verified first IP address is the second IP address.
  • the domain name to be resolved included in the domain name resolution request is M.haoshou.com, and the domain name resolution request is sent to the first DNS server. Receiving the first IP address returned by the first DNS server is 125.88.193.213, and after sending the domain name resolution request to the second DNS server, receiving the second IP address returned by the second DNS server is 125.88. At 193.213, the first IP address is verified to pass, and the first IP address after verification is 125.88.193.213;
  • the first IP address is considered to be unverified, and the first IP address is modified to be 125.88.192.144.
  • the first IP address is 125.88.192.144.
  • the domain name resolution of the first DNS server is faulty. Therefore, the domain name resolution may not be performed by using the first DNS server. Both of them directly pass through the second DNS server, which may cause the load of the second DNS server to be too large. Therefore, the domain name resolution may be directly performed by the second DNS server within the first preset time, and then continue to try to pass the first DNS. The server performs domain name resolution.
  • FIG. 3 is a flowchart of a page access method in an application according to an embodiment of the present invention. referring to FIG. 3, the method includes:
  • S300 receiving a search term input by the user, searching webpage information related to the search term according to the search term, and displaying the found webpage information in a display interface in the application, and receiving the user in the application. a page access instruction input in a display interface within the program;
  • the domain name to be resolved is the domain name to be resolved of the webpage information that needs to be accessed.
  • S302 Send the domain name resolution request to the second DNS server.
  • S303 Receive a second IP address corresponding to the domain name resolution request returned by the second DNS server.
  • the first IP address is verified by using the second IP address, and a page access request generated according to the page access instruction in the application is sent to the verified first IP address.
  • steps S301-S304 are the same as steps S101-S104 of the embodiment shown in FIG. 1, and details are not described herein again.
  • S305 Receive a response page corresponding to the page access request, and display the response page in a display interface in the application.
  • the response page in order to facilitate the user to read the response page, after receiving the response page corresponding to the page access request, the response page is displayed in the display interface in the application.
  • the steps are In S305, after receiving the response page corresponding to the page access request, the method further includes:
  • Determining whether the check-in function of the response page can be invoked if the check-in function of the response page can be invoked, performing the step of displaying the response page in a display interface in the application, if the call cannot be invoked
  • Responding to the check-in function of the page resending the page access request generated by the page access instruction in the application to the first IP address after the verification by the encryption protocol, and receiving a response page corresponding to the page access request, And performing the step of displaying the response page in a display interface within the application.
  • the jump code is added to the response page, and the jump code is added to avoid subsequent response pages, which affects the normal use of the user, and can be verified by the encryption protocol.
  • the subsequent first IP address sends a subsequent page access request.
  • the subsequent page access request is sent to the first IP address after verification by the encryption protocol to reach a second preset time (can be set to 1 hour, and of course, can be set to other durations.
  • a second preset time can be set to 1 hour, and of course, can be set to other durations.
  • the local network environment may be changed, and the subsequent page access request may be sent to the first IP address after verification.
  • the method after receiving the response page corresponding to the page access request in step S305, the method also includes:
  • the subsequent page access request is sent to the first IP address after verification by the encryption protocol to reach a second preset time (can be set to 1 hour, and of course, can be set to other durations. And executing the sending the subsequent page access request to the first IP address after verification;
  • the local network environment may be changed, and the subsequent page access request may be sent to the first IP address after verification.
  • the outer chain that is not in the whitelist is sent to the background server, where the background server is the application.
  • the background server which may be a cloud server, further analyzes the received outer chain that is not in the whitelist to update the whitelist.
  • FIG. 4 is a flowchart of a method for determining a page jump in an application according to an embodiment of the present invention. referring to FIG. 4, the method includes:
  • S401 Receive a first response page corresponding to the page access request when the application triggers the page access request based on the page access instruction input by the user;
  • the application loads the first response page after receiving the first response page.
  • S402 Determine whether a jump occurs in the first response page in the application by calling the check-in function.
  • check-in function is a js script embedded in the first response page, and when the application accesses the front-end server of the first response page or the first response page normally invokes the display, The check-in function can be called and set the sign-in flag after being called.
  • the check-in flag may be first set to an initial value (usually set to 0), only the front-end server and the server that access the first response page in the application.
  • the check-in function can be called. If the jump code (usually the code for implementing the 401 jump) is added to the first response page, the first response page is jumped to In other pages, the sign-in function cannot be called, and the sign-in flag is still an initial value. Therefore, the sign-in flag can be used to determine whether the sign-in function is called. Accordingly, the sign-in flag can be used to determine the number. A response page jumps.
  • the first response page is directly displayed in the display interface in the application.
  • the embodiment determines whether the first response page of the application jumps by calling the check-in function, and can instantly and accurately determine whether the first response page jumps, improves the user experience, and ensures the information security of the user. Property security.
  • FIG. 5 is a flowchart of a method for determining a page jump in an application according to an embodiment of the present invention. referring to FIG. 5, the method includes:
  • S502 Determine whether a jump occurs in the first response page in the application by calling a check-in function
  • steps S501-S502 are the same as steps S401-S402 of the embodiment shown in FIG. 4, and the embodiment is no longer embarrassed. Said.
  • a normal page access request is sent in a plain text manner (ie, an HTTP protocol, etc.), so the returned first response page is sent in plain text, so it is easy to be
  • the hacker intercepts, so as to add a jump code in the first response page, and the second response page corresponding to the re-sent page access request is also intercepted by the hacker.
  • the encryption protocol ie, the HTTPS protocol, etc.
  • Resend the page access request ie, the HTTPS protocol, etc.
  • S504 Display the second response page in a display interface within the application.
  • the second response page is sent by using an encryption protocol, the possibility that the jump code is added is very small. In this case, the loading of the first program in the application may be stopped. A response page displays the second response page directly in a display interface within the application.
  • FIG. 6 is a flowchart of a method for determining a page jump in an application according to an embodiment of the present invention. referring to FIG. 6, the method includes:
  • S602 Determine whether a jump occurs in the first response page in the application by calling a check-in function
  • steps S601-S604 are the same as steps S501-S504 of the embodiment shown in FIG. 5, and details are not described in this embodiment.
  • S605 Send a subsequent page access request by using the encryption protocol.
  • FIG. 7 is a flowchart of a method for determining a page jump in an application according to an embodiment of the present invention. referring to FIG. 7, the method includes:
  • S700 Receive a search term input by the user, search for webpage information related to the search term according to the search term, and display the found webpage information in a display interface in the application, and receive the user in the application.
  • S702 Determine whether a jump occurs in the first response page in the application by calling a check-in function
  • S704 Display the second response page in a display interface in the application.
  • steps S701-S704 are the same as steps S501-S504 of the embodiment shown in FIG. 5, and details are not described herein again.
  • the content in the local DNS server of the carrier may be tampered with, or the address of the DNS server on the user's router may be modified, which may result in failure to access the page, affecting the user experience, and may cause the user to be linked when accessing the page normally.
  • the method further includes:
  • A sending a domain name resolution request to the first DNS server based on the page access instruction input by the user, and receiving a first IP address corresponding to the domain name to be resolved returned by the first DNS server;
  • the first DNS server is usually a carrier local DNS server, but the content in the DNS server may be tampered with. Of course, it may also be a DNS server modified by the hacker (ie, the application's DNS server address). modified).
  • the second DNS server can be understood as a DNS server provided by a third party, and the link address of the second DNS server can be directly stored locally.
  • the second DNS server is directly found locally.
  • the link address, the domain name resolution request is sent to the second DNS server according to the link address.
  • the domain name resolution request is sent to the second DNS server in plain text (ie, HTTP protocol, etc.), it is easily intercepted by the hacker, and it is difficult to ensure the authenticity of the information returned by the second DNS server.
  • the domain name resolution request is sent to the second DNS server through an encryption protocol (ie, an HTTPS protocol, etc.);
  • the second DNS server if the domain name resolution request is sent to the second DNS server through an encryption protocol (ie, an HTTPS protocol, etc.), the second DNS server returns the second IP address through an encryption protocol.
  • an encryption protocol ie, an HTTPS protocol, etc.
  • the first IP address is the same as the second IP address, the first IP address is determined to pass, and the verified first IP address is the The first IP address itself is different; if the first IP address is different from the second IP address, it is determined that the first IP address is not verified, and the first IP address is modified to a second IP address. At this time, the verified first IP address is the second IP address.
  • the domain name to be resolved included in the domain name resolution request is M.haoshou.com, and the domain name resolution request is sent to the first DNS server. Receiving the first IP address returned by the first DNS server is 125.88.193.213, and after sending the domain name resolution request to the second DNS server, receiving the second IP address returned by the second DNS server is 125.88. At 193.213, the first IP address is verified to pass, and the first IP address after verification is 125.88.193.213;
  • the first IP address is considered to be unverified, and the first IP address is modified to be 125.88.192.144.
  • the first IP address is 125.88.192.144.
  • step S701 further includes:
  • the application When the application triggers a page access request to the first IP address after verification based on the page access instruction input by the user, the first response page corresponding to the page access request is received.
  • FIG. 8 is a flowchart of a method for detecting a page tampering in an application according to an embodiment of the present invention. referring to FIG. 8, the method includes:
  • S802 Load a scan script embedded in the first response page to detect whether the first response page in the application is tampered with.
  • the scan script may set the tamper flag when detecting that the first response page is tampered with in the application, so the application is embedded in the scan of the first response page.
  • the tamper flag is first set to an initial value (usually set to 0), and the tampering flag can be used to determine whether the first response page has been tampered with.
  • the first response page is directly displayed in a display interface within the application.
  • the first response page can be instantly and accurately determined to be tampered, thereby improving the user experience.
  • FIG. 9 is a flowchart of a method for detecting a page tampering in an application according to an embodiment of the present invention. referring to FIG. 9, the method includes:
  • S901 Receive, when the application triggers a page access request based on a page access instruction input by the user, corresponding to the page access request First response page;
  • step S901 is the same as step S801 of the embodiment shown in FIG. 8, and details are not described herein again.
  • S902 Load a scan script embedded in the first response page, and scan, by the scan script, a DOM tree of the first response page in the application, and use the first response page in the application. Chain as a result of the scan;
  • S903 Detect whether the first response page in the application is tampered with according to the scan result.
  • the outer chain is an outward link for initiating in the first response page, because the tampering of the first response page is usually by adding information similar to an advertisement, and the information such as advertisement is generally passed.
  • the outer link in the first response page in the application is used as a scan result, and the first response page in the application is detected according to the scan result. Whether it has been tampered with can guarantee the accuracy of the test.
  • FIG. 10 is a flowchart of a method for detecting a page tampering in an application according to an embodiment of the present invention. referring to FIG. 10, the method includes:
  • S1002 Loading a scan script embedded in the first response page, and scanning, by the scan script, a DOM tree of the first response page in the application, and using the first response page in the application Chain as a result of the scan;
  • steps S1001-S1002 are the same as steps S901-S902 of the embodiment shown in FIG. 9, and details are not described herein again.
  • S1003 Detect whether each outer chain in the scan result is in a white list, and when the scan result has an outer chain that is not in the white list, determine that the first response page in the application is tampered with.
  • some external links are included in the first response page. If the first response page with the outer chain is directly considered to be tampered, the accuracy of the detection is too low, which affects the user experience. In this embodiment, by detecting whether each outer chain in the scan result is in a white list, and when the scan result has an outer chain that is not in the white list, it is determined that the first response page in the application is Tampering, which effectively improves the accuracy of the test.
  • the method further includes:
  • the background server is the background server of the application, which can be a cloud server, and can further analyze the received outer chain that is not in the white list, Update the whitelist.
  • FIG. 11 is a flowchart of a method for detecting a page tampering in an application according to an embodiment of the present invention. referring to FIG. 11, the method includes:
  • S1102 Load a scan script embedded in the first response page, and scan, by the scan script, a DOM tree of the first response page in the application, and use the first response page in the application. Chain as a result of the scan;
  • S1103 Detect whether each outer chain in the scan result is in a white list, and when the scan result has an outer chain that is not in the white list, determine that the first response page in the application is tampered with.
  • steps S1101-S1103 are the same as steps S1001-S1003 of the embodiment shown in FIG. 10, and details are not described herein again.
  • S1104 Resend the page access request by using an encryption protocol, and receive a second response page corresponding to the resent page access request.
  • a normal page access request is sent in a plain text manner (ie, an HTTP protocol, etc.), so the returned first response page is sent in plain text, so it is easy to be
  • the hacker intercepts, thereby tampering with the first response page, and the second response page corresponding to the re-sent page access request is also intercepted by the hacker.
  • the replies are re-sent by the encryption protocol (ie, the HTTPS protocol, etc.). Page access request.
  • S1105 Display the second response page in a display interface within the application.
  • the second response page is sent by using an encryption protocol, the possibility of being tampered with is very small.
  • the first display is directly displayed in the display interface in the application. Second response page.
  • FIG. 12 is a flowchart of a method for detecting a page tampering in an application according to an embodiment of the present invention. referring to FIG. 12, the method includes:
  • S1202 Load a scan script embedded in the first response page, and scan, by the scan script, a DOM tree of the first response page in the application, and use the first response page in the application. Chain as a result of the scan;
  • S1203 Detect whether each outer chain in the scan result is in a white list, and when the scan result has an outer chain that is not in the white list, determine that the first response page in the application is tampered with.
  • S1204 Resend the page access request by using an encryption protocol, and receive a second response page corresponding to the resent page access request.
  • S1205 Display the second response page in a display interface within the application.
  • steps S1201-S1205 are the same as steps S1101-S1105 of the embodiment shown in FIG. 11, and details are not described herein again.
  • S506 Send a subsequent page access request by using the encryption protocol.
  • FIG. 13 is a flowchart of a method for detecting a page tampering in an application according to an embodiment of the present invention. referring to FIG. 13, the method includes:
  • S1300 Receive a search term input by a user, search for webpage information related to the search term according to the search term, and display the found webpage information in a display interface in the application, and receive the user in the application.
  • S1302 Load a scan script embedded in the first response page, and scan, by the scan script, a DOM tree of the first response page in the application, and use the first response page in the application. Chain as a result of the scan;
  • S1303 Detect whether each outer chain in the scan result is in a white list, and when the scan result has an outer chain that is not in the white list, determine that the first response page in the application is tampered with.
  • S1304 Resend the page access request by using an encryption protocol, and receive a second response page corresponding to the resent page access request.
  • S1305 Display the second response page in a display interface within the application.
  • steps S1301-S1305 are the same as steps S1101-S1105 of the embodiment shown in FIG. 11, and details are not described herein again.
  • the content in the local DNS server of the carrier may be tampered with, or the address of the DNS server on the user's router may be modified, which may result in failure to access the page, affecting the user experience, and may cause the user to be linked when accessing the page normally.
  • the fraudulent website such as a phishing website or a trojan website, affects the user's information security and property security.
  • the method further includes:
  • A sending a domain name resolution request to the first DNS server based on the page access instruction input by the user, and receiving a first IP address corresponding to the domain name to be resolved returned by the first DNS server;
  • the first DNS server is usually a carrier local DNS server, but the content in the DNS server may be tampered with. Of course, it may also be a DNS server modified by the hacker (ie, the application's DNS server address). modified).
  • the second DNS server can be understood as a DNS server provided by a third party, and the link address of the second DNS server can be directly stored locally.
  • the second DNS server is directly found locally.
  • the link address, the domain name resolution request is sent to the second DNS server according to the link address.
  • the domain name resolution request is sent to the second DNS server in plain text (ie, HTTP protocol, etc.), it is easily intercepted by the hacker, and it is difficult to ensure the authenticity of the information returned by the second DNS server.
  • the domain name resolution request is sent to the second DNS server through an encryption protocol (ie, an HTTPS protocol, etc.);
  • the second DNS server if the domain name resolution request is sent to the second DNS server through an encryption protocol (ie, an HTTPS protocol, etc.), the second DNS server returns the second IP address through an encryption protocol.
  • an encryption protocol ie, an HTTPS protocol, etc.
  • the first IP address is the same as the second IP address, the first IP address is determined to pass, and the verified first IP address is the The first IP address itself is different; if the first IP address is different from the second IP address, it is determined that the first IP address is not verified, and the first IP address is modified to a second IP address. At this time, the verified first IP address is the second IP address.
  • the domain name to be resolved included in the domain name resolution request is M.haoshou.com, and the domain name resolution request is sent to the first DNS server. Receiving the first IP address returned by the first DNS server is 125.88.193.213, and after sending the domain name resolution request to the second DNS server, receiving the second IP address returned by the second DNS server is 125.88. At 193.213, the first IP address is verified to pass, and the first IP address after verification is 125.88.193.213;
  • the first IP address is considered to be unverified, and the first IP address is modified to be 125.88.192.144.
  • the first IP address is 125.88.192.144.
  • step 1301 further includes:
  • the application When the application triggers a page access request to the first IP address after verification based on the page access instruction input by the user, the first response page corresponding to the page access request is received.
  • FIG. 14 is a structural block diagram of a page access device in an application according to an embodiment of the present invention. referring to FIG. 14, the device includes:
  • the instruction trigger 1401 is configured to receive, when the application sends a domain name resolution request to the first DNS server based on the page access instruction input by the user, the first IP address returned by the first DNS server and corresponding to the domain name resolution request;
  • the request sender 1402 is adapted to send the domain name resolution request to the second DNS server;
  • the address receiver 1403 is adapted to receive a second IP address corresponding to the domain name resolution request returned by the second DNS server;
  • the check accessor 1404 is adapted to check the first IP address by using the second IP address, and send the verified first IP address to the first IP address generated according to the page access instruction in the application. Page access request.
  • the check accessor is further configured to determine whether the first IP address is the same as the second IP address, if the first IP address and the first If the two IP addresses are the same, it is determined that the first IP address is verified, and if the first IP address is different from the second IP address, it is determined that the first IP address is not verified, and The first IP address is modified to a second IP address.
  • the verification accessor is further configured to directly pass the second DNS server within a first preset time when the first IP address is not verified to pass. Perform domain name resolution.
  • the device further includes:
  • the connection determiner is adapted to determine whether the local first connection to the first DNS server.
  • the device further includes:
  • the network determiner is adapted to determine whether the locally connected network has changed.
  • the device further includes:
  • the address determiner is adapted to determine whether the local IP address has changed.
  • the request sender is further adapted to send the domain name resolution request to a second DNS server by using an encryption protocol.
  • the device further includes:
  • the command receiver is adapted to receive a search term input by the user, search for webpage information related to the search term according to the search term, and display the found webpage information in a display interface in the application, and receive the user.
  • the device further includes:
  • a page display adapted to receive a response page corresponding to the page access request, displayed in a display interface in the application The response page.
  • the device further includes:
  • the function determiner is adapted to determine whether the check-in function of the response page can be called, and if the check-in function of the response page can be called, the page presenter is invoked, and if the check-in function of the response page cannot be called,
  • the encryption protocol resends the page access request generated according to the page access instruction in the application to the first IP address after verification, receives a response page corresponding to the page access request, and invokes the page presenter.
  • the function determiner is further adapted to send a subsequent page access to the verified first IP address by using an HTTPS protocol when the check-in function of the response page cannot be invoked. request.
  • the device further includes:
  • An outer chain scanner configured to scan a DOM tree of the response page by a script loaded in the response page, and if the DOM tree has an outer chain that is not in the whitelist, re-verify through the encryption protocol
  • the first IP address sends a page access request, receives a response page corresponding to the page access request, and invokes the page presenter; otherwise, the page presenter is invoked.
  • the outer chain scanner is further adapted to: when the outer chain in the whitelist is not in the DOM tree, pass the encryption protocol to the first IP address after verification. Send subsequent page access requests.
  • the external chain scanner is further adapted to send the out-of-white list to the background server when the outer chain in the DOM tree is not in the whitelist. chain.
  • FIG. 15 is a structural block diagram of an apparatus for determining a page jump in an application according to an embodiment of the present invention. referring to FIG. 15, the apparatus includes:
  • the page receiver 1501 is configured to receive a first response page corresponding to the page access request when the application triggers the page access request based on the page access instruction input by the user;
  • the jump determiner 1502 is adapted to determine whether a jump occurs in the first response page in the application by calling a check-in function.
  • the device further includes:
  • the jump confirmer is adapted to determine that the first response page in the application jumps when the check-in function of the first response page in the application cannot be called.
  • the device further includes:
  • the request repeater is adapted to resend the page access request by the encryption protocol and receive the second response page corresponding to the resent page access request.
  • the device further includes:
  • a page presenter adapted to display the second response page in a display interface within the application.
  • the device further includes:
  • An encryption transmitter adapted to send a subsequent page access request through the encryption protocol.
  • the device further includes:
  • the time determiner is adapted to determine whether the preset time is reached, and if not, invoke the encrypted transmitter.
  • the device further includes:
  • the network determiner is adapted to determine whether the locally connected network changes, and if not, invoke the encrypted sender.
  • the device further includes:
  • the address determiner is adapted to determine whether the local IP address changes, and if not, invoke the encrypted sender.
  • the device further includes:
  • the command receiver is adapted to receive a search term input by the user, search for webpage information related to the search term according to the search term, and display the found webpage information in a display interface in the application, and receive the user.
  • the method further includes:
  • the command trigger is adapted to send a domain name resolution request to the first DNS server based on the page access instruction input by the user, and receive a first IP address corresponding to the domain name to be resolved returned by the first DNS server;
  • a requesting sender configured to send the domain name resolution request to a second DNS server
  • An address receiver configured to receive a second IP address corresponding to the domain name resolution request returned by the second DNS server
  • An address checker configured to check the first IP address by using the second IP address
  • the page receiver is further adapted to receive a first response page corresponding to the page access request when the application triggers a page access request to the first IP address after the verification based on the page access instruction input by the user.
  • FIG. 16 is a structural block diagram of a device for detecting a page tampering in an application according to an embodiment of the present invention. referring to FIG. 16, the device includes:
  • the page receiver 1601 is configured to receive a first response page corresponding to the page access request when the application triggers the page access request based on the page access instruction input by the user;
  • the tamper detector 1602 is adapted to load a scan script embedded in the first response page to detect whether the first response page in the application is tampered with.
  • the tampering detector is further adapted to load a scanning script embedded in the first response page, and the first response page in the application by the scanning script
  • the DOM tree scans, takes the outer chain in the first response page in the application as a scan result, and detects whether the first response page in the application is tampered according to the scan result.
  • the tampering detector is further configured to detect whether each outer chain in the scan result is in a white list, and the scan result has an outer list that is not in the white list. When the chain is chained, it is determined that the first response page in the application has been tampered with.
  • the device further includes:
  • An external chain sender suitable for sending an outer chain that is not in the whitelist to the backend server.
  • the device further includes:
  • the request repeater is adapted to resend the page access request by the encryption protocol, and receive the second response page corresponding to the resent page access request.
  • the device further includes:
  • a page presenter adapted to display the second response page in a display interface within the application.
  • the device further includes:
  • An encryption transmitter adapted to send a subsequent page access request through the encryption protocol.
  • the device further includes:
  • the time determiner is adapted to determine whether the preset time is reached, and if not, invoke the encrypted transmitter.
  • the device further includes:
  • the network determiner is adapted to determine whether the locally connected network changes, and if not, invoke the encrypted sender.
  • the device further includes:
  • the address determiner is adapted to determine whether the local IP address changes, and if not, invoke the encrypted sender.
  • the device further includes:
  • the command receiver is adapted to receive a search term input by the user, search for webpage information related to the search term according to the search term, and display the found webpage information in a display interface in the application, and receive the user.
  • the device further includes:
  • the command trigger is adapted to send a domain name resolution request to the first DNS server based on the page access instruction input by the user, and receive a first IP address corresponding to the domain name to be resolved returned by the first DNS server;
  • a requesting sender configured to send the domain name resolution request to a second DNS server
  • An address receiver configured to receive a second IP address corresponding to the domain name resolution request returned by the second DNS server
  • An address checker configured to check the first IP address by using the second IP address
  • the page receiver is further adapted to receive a first response page corresponding to the page access request when the application triggers a page access request to the first IP address after the verification based on the page access instruction input by the user.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor can be used in practice to implement a page access device within an application, a device for determining page jumps within an application, Detecting in-application pages tampering with some or all of the functionality of some or all of the components in the device.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 17 illustrates a terminal device that can implement page access within an application in accordance with the present invention.
  • the terminal device conventionally includes a processor 1710 and a computer program product or computer readable medium in the form of a memory 1720.
  • the memory 1720 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • Memory 1720 has a memory space 1730 for program code 1731 for performing any of the method steps described above.
  • the storage space 1730 for program code may include respective program codes 1731 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • Such computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such a computer program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have a storage section, a storage space, and the like arranged similarly to the storage 1720 in the terminal device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit comprises computer readable code 1731', ie code that can be read by a processor, such as, for example, 1710, which when executed by the terminal device causes the terminal device to perform each of the methods described above step.
  • the terminal device that determines the page jump within the application and the terminal device that detects the page tampering within the application are similar to the structures of FIGS. 17 and 18.

Abstract

本发明公开了一种应用程序内的页面处理方法和装置,涉及通信技术领域。本发明通过第二DNS服务器返回的第二IP地址对第一DNS服务器返回的第一IP地址进行校验,向校验后的第一IP地址发送在所述应用程序内根据页面访问指令生成的页面访问请求,还可以通过调用签到函数来确定应用程序内第一响应页面是否发生跳转,能够即时准确地确定所述第一响应页面是否发生跳转,还可以通过加载第一响应页面中内嵌的扫描脚本,以检测所述应用程序内第一响应页面是否被篡改,能够即时准确地确定所述第一响应页面是否被篡改,提高了用户体验,保证了用户的信息安全及财产安全。

Description

应用程序内的页面处理方法和装置 技术领域
本发明涉及通信技术领域,特别涉及一种应用程序内的页面处理方法和装置。
背景技术
DNS(Domain Name System,域名系统),因特网上作为域名和IP地址相互映射的一个分布式数据库,能够使用户更方便的访问互联网,而不用去记住能够被机器直接读取的IP数串。
用户通常需要通过运营商局域DNS服务器来实现页面访问,但现有技术中,由于运营商局域DNS服务器中的内容可能被篡改,又或是用户的路由器上DNS服务器地址被修改,可能导致不能正常访问页面,影响用户体验,也可能导致用户在正常访问页面时,被链接至钓鱼网站或木马网站等欺诈网站,影响用户的信息安全及财产安全。
发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的一种应用程序内的页面访问方法及装置。
依据本发明的一个方面,提供了一种应用程序内的页面访问方法,所述方法包括:
在应用程序基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求时,接收第一DNS服务器返回的与所述域名解析请求对应的第一IP地址;
将所述域名解析请求发送至第二DNS服务器;
接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
采用所述第二IP地址对所述第一IP地址进行校验,向校验后的第一IP地址发送在所述应用程序内根据所述页面访问指令生成的页面访问请求。
依据本发明的另一个方面,提供了一种确定应用程序内页面跳转的方法,所述方法包括:
在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
通过调用签到函数来确定所述应用程序内第一响应页面是否发生跳转。
依据本发明的另一个方面,提供了一种检测应用程序内页面篡改方法,所述方法包括:
在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
加载所述第一响应页面中内嵌的扫描脚本,以检测所述应用程序内第一响应页面是否被篡改。
依据本发明的另一个方面,提供了一种应用程序内的页面访问装置,所述装置包括:
指令触发器,适于在应用程序基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求时,接收第一DNS服务器返回的与所述域名解析请求对应的第一IP地址;
请求发送器,适于将所述域名解析请求发送至第二DNS服务器;
地址接收器,适于接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
校验访问器,适于采用所述第二IP地址对所述第一IP地址进行校验,向校验后的第一IP地址发送在所述应用程序内根据所述页面访问指令生成的页面访问请求。
依据本发明的另一个方面,提供了一种确定应用程序内页面跳转的装置,所述装置包括:
页面接收器,适于在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
跳转确定器,适于通过调用签到函数来确定所述应用程序内第一响应页面是否发生跳转。
依据本发明的另一个方面,提供了一种检测应用程序内页面篡改装置,所述装置包括:
页面接收器,适于在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
篡改检测器,适于加载所述第一响应页面中内嵌的扫描脚本,以检测所述应用程序内第一响应页面是否被篡改。
根据本发明的又一个方面,提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在终端设备上运行时,导致所述终端设备执行上述的任一个应用程序内的页面访问方法。
根据本发明的再一个方面,提供了一种计算机可读介质,其中存储了执行上述的任一个应用程序内的页面访问方法的计算机程序。
根据本发明的又一个方面,提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在终端设备上运行时,导致所述终端设备执行上述的任一个确定应用程序内页面跳转的方法。
根据本发明的再一个方面,提供了一种计算机可读介质,其中存储了执行上述的任一个确定应用程序内页面跳转的方法的计算机程序。
根据本发明的又一个方面,提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在终端设备上运行时,导致所述终端设备执行上述的任一个检测应用程序内页面篡改方法。
根据本发明的再一个方面,提供了一种计算机可读介质,其中存储了执行上述的任一个检测应用程序内页面篡改方法的计算机程序。
本发明实施例的应用程序内的页面访问方法和装置,可以通过第二DNS服务器返回的第二IP地址对第一DNS服务器返回的第一IP地址进行校验,向校验后的第一IP地址发送在所述应用程序内根据页面访问指令生成的页面访问请求,保证了页面的正常访问,提高了用户体验,另外,也保证了用户的信息安全及财产安全。
本发明实施例的确定应用程序内页面跳转的方法及装置,可以通过调用签到函数来确定应用程序内第一响应页面是否发生跳转,能够即时准确地确定所述第一响应页面是否发生跳转,提高了用户体验,并且保证了用户的信息安全及财产安全。
本发明实施例的检测应用程序内页面篡改方法及装置,可以通过加载第一响应页面中内嵌的扫描脚本,以检测所述应用程序内第一响应页面是否被篡改,能够即时准确地确定所述第一响应页面是否被篡改,提高了用户体验。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1是本发明一种实施方式的应用程序内的页面访问方法的流程图;
图2是本发明一种实施方式的应用程序内的页面访问方法的流程图;
图3是本发明一种实施方式的应用程序内的页面访问方法的流程图;
图4是本发明一种实施方式的确定应用程序内页面跳转的方法的流程图;
图5是本发明一种实施方式的确定应用程序内页面跳转的方法的流程图;
图6是本发明一种实施方式的确定应用程序内页面跳转的方法的流程图;
图7是本发明一种实施方式的确定应用程序内页面跳转的方法的流程图;
图8是本发明一种实施方式的检测应用程序内页面篡改方法的流程图;
图9是本发明一种实施方式的检测应用程序内页面篡改方法的流程图;
图10是本发明一种实施方式的检测应用程序内页面篡改方法的流程图;
图11是本发明一种实施方式的检测应用程序内页面篡改方法的流程图;
图12是本发明一种实施方式的检测应用程序内页面篡改方法的流程图;
图13是本发明一种实施方式的检测应用程序内页面篡改方法的流程图;
图14是本发明一种实施方式的应用程序内的页面访问装置的结构框图;
图15是本发明一种实施方式的确定应用程序内页面跳转的装置的结构框图;
图16是本发明一种实施方式的检测应用程序内页面篡改装置的结构框图;
图17示出了用于执行根据本发明的方法的终端设备的框图;
图18示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单元。
具体实施方式
下面结合附图和实施例,对本发明的具体实施方式作进一步详细描述。以下实施例用于说明本发明, 但不用来限制本发明的范围。
图1是本发明一种实施方式的应用程序内的页面访问方法的流程图;参照图1,所述方法包括:
S101:在应用程序基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求时,接收第一DNS服务器返回的与所述域名解析请求对应的第一IP地址;
需要说明的是,所述第一DNS服务器通常为运营商局域DNS服务器,但该DNS服务器中的内容可能被篡改,当然,也有可能为被黑客修改的DNS服务器(即应用程序的DNS服务器地址被修改)。
可理解的是,所述域名解析请求中包括有待解析域名,相应的,与所述域名解析请求对应的第一IP地址即为与所述待解析域名对应的IP地址。
S102:将所述域名解析请求发送至第二DNS服务器;
需要说明的是,所述第二DNS服务器可理解为第三方提供的DNS服务器,第二DNS服务器的链接地址可直接存储于本地,在需要执行步骤S102时,则直接从本地找到第二DNS服务器的链接地址,将所述域名解析请求根据链接地址发送至第二DNS服务器。
可理解的是,若直接将所述域名解析请求以明文方式(即HTTP协议等)发送至第二DNS服务器,则容易被黑客截获,从而难以保证所述第二DNS服务器所返回信息的真实性,为避免出现该问题,本实施方式中,将所述域名解析请求通过加密协议(即HTTPS协议等)发送至第二DNS服务器;
在具体实现中,若将所有域名解析请求均向第一DNS服务器发送,又向第二DNS服务器发送,会对页面访问速度造成影响,为避免该问题,本实施方式中可以三个判断条件作为步骤S102的触发条件:
第一、判断本地是否第一次连接所述第一DNS服务器,若是,则执行步骤S102;
可理解的是,当本地是第一次连接所述第一DNS服务器时,无法确定该第一DNS服务器的域名解析是否存在问题,故而,对该第一DNS服务器所返回的第一IP地址进行校验,则非常必要。
第二、判断本地连接的网络是否发生变化,若是,则执行步骤S102;
在具体实现中,在本地连接的网络发生变化(例如:所述应用程序为移动终端上的应用程序时,该移动终端的网络从3G网络变为WLAN网络)时,其所属的第一DNS服务器则很可能发生变化,故而,对该第一DNS服务器所返回的第一IP地址进行校验,则非常必要。
第三、判断本地IP地址是否发生变化,若是,则执行步骤S102。
在具体实现中,在本地IP地址发生变化时,其所属的第一DNS服务器也很可能发生变化,对该第一DNS服务器所返回的第一IP地址进行校验,则非常必要。
S103:接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
需要说明的是,若将所述域名解析请求是通过加密协议(即HTTPS协议等)发送至第二DNS服务器,则所述第二DNS服务器通过加密协议返回所述第二IP地址。
S104:采用所述第二IP地址对所述第一IP地址进行校验,向校验后的第一IP地址发送在所述应用程序内根据所述页面访问指令生成的页面访问请求。
本实施方式通过第二DNS服务器返回的第二IP地址对第一DNS服务器返回的第一IP地址进行校验,向校验后的第一IP地址发送在所述应用程序内根据页面访问指令生成的页面访问请求,保证了页面的正常访问,提高了用户体验,另外,也保证了用户的信息安全及财产安全。
图2是本发明一种实施方式的应用程序内的页面访问方法的流程图;参照图2,所述方法包括:
S201:在应用程序基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求时,接收第一DNS服务器返回的与所述域名解析请求对应的第一IP地址;
S202:将所述域名解析请求发送至第二DNS服务器;
S203:接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
需要说明的是,步骤S201-S203与图1所示的实施方式的步骤S101-S103相同,在此不再赘述。
S204:判断所述第一IP地址是否与所述第二IP地址相同,若所述第一IP地址与所述第二IP地址相同,则认定所述第一IP地址校验通过,若所述第一IP地址与所述第二IP地址不相同,则认定所述第一IP地址未校验通过,并将所述第一IP地址修改为第二IP地址,向校验后的第一IP地址发送在所述应用程序内根据所述页面访问指令生成的页面访问请求。
可理解的是,在所述第一IP地址与所述第二IP地址相同时,则认定所述第一IP地址校验通过,此时, 所述校验后的第一IP地址即为该第一IP地址本身;在所述第一IP地址与所述第二IP地址不相同,则认定所述第一IP地址未验证通过,并将所述第一IP地址修改为第二IP地址,此时,所述校验后的第一IP地址即为所述第二IP地址。
下面以一个具体的实例来说明,但不限定本发明的保护范围,设所述域名解析请求中包括的待解析域名为M.haoshou.com,将该域名解析请求发送至第一DNS服务器后,接收所述第一DNS服务器返回的第一IP地址为125.88.193.213,再将所述域名解析请求发送至第二DNS服务器后,若接收所述第二DNS服务器返回的第二IP地址为125.88.193.213时,则认为所述第一IP地址校验通过,校验后的第一IP地址即为125.88.193.213;
若接收所述第二DNS服务器返回的第二IP地址为125.88.192.144时,则认为所述第一IP地址未校验通过,并将所述第一IP地址修改为125.88.192.144,校验后的第一IP地址即为125.88.192.144。
在具体实现中,在所述第一IP地址未校验通过时,则说明第一DNS服务器的域名解析存在问题,故而,可先不通过第一DNS服务器进行域名解析,当然,若所有域名解析均直接通过第二DNS服务器,可能会导致第二DNS服务器的负荷过大,故而,可在第一预设时间内直接通过所述第二DNS服务器进行域名解析,在之后继续尝试通过第一DNS服务器进行域名解析。
图3是本发明一种实施方式的应用程序内的页面访问方法的流程图;参照图3,所述方法包括:
S300:接收用户输入的搜索词,根据所述搜索词查找与所述搜索词相关的网页信息,并将查找到的网页信息展示于所述应用程序内的显示界面中,接收用户在所述应用程序内的显示界面中输入的页面访问指令;
可理解的是,由于查找到的网页信息展示于应用程序内的显示界面中,此时,用户通常会输入与需要访问的网页信息对应的页面访问指令,故而,在步骤S301中域名解析请求中的待解析域名即为所述需要访问的网页信息的待解析域名。
S301:在应用程序基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求时,接收第一DNS服务器返回的与所述域名解析请求对应的第一IP地址;
S302:将所述域名解析请求发送至第二DNS服务器;
S303:接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
S304:采用所述第二IP地址对所述第一IP地址进行校验,向校验后的第一IP地址发送在所述应用程序内根据所述页面访问指令生成的页面访问请求;
需要说明的是,步骤S301-S304与图1所示的实施方式的步骤S101-S104相同,在此不再赘述。
S305:接收与所述页面访问请求对应的响应页面,在所述应用程序内的显示界面中展示所述响应页面。
在具体实现中,为了便于用户阅读响应页面,故而,在接收与所述页面访问请求对应的响应页面后,在所述应用程序内的显示界面中展示所述响应页面。
在以上实施方式中仅能保证校验后的第一IP地址的准确性,但若黑客通过修改所述响应页面,在所述响应页面中添加跳转代码,则会导致所述响应页面被跳转至其他页面,影响用户对页面的浏览,并且也可能导致跳转至钓鱼网站或木马网站等欺诈网站,影响用户的信息安全及财产安全,为避免出现该问题,本实施方式中,在步骤S305中,接收与所述页面访问请求对应的响应页面之后,所述方法还包括:
判断是否能够调用所述响应页面的签到函数,若能调用所述响应页面的签到函数,则执行所述在所述应用程序内的显示界面中展示所述响应页面的步骤,若不能调用所述响应页面的签到函数,则通过加密协议重新向校验后的第一IP地址发送在所述应用程序内根据所述页面访问指令生成的页面访问请求,接收与该页面访问请求对应的响应页面,并执行所述在所述应用程序内的显示界面中展示所述响应页面的步骤。
在不能调用所述响应页面的签到函数时,说明所述响应页面中被添加跳转代码,为避免后续的响应页面被继续添加跳转代码,影响用户的正常使用,可通过加密协议向校验后的第一IP地址发送后续的页面访问请求。
当然,考虑到后续的页面访问速度,在通过加密协议向校验后的第一IP地址发送后续的页面访问请求达到第二预设时间(可设为1小时,当然,还可设置为其他时长)时,可执行所述向校验后的第一IP地 址发送后续的页面访问请求;
另外,在本地连接的网络发生变化或本地IP地址发生变化时,由于本地的网络环境发生了变化,可执行所述向校验后的第一IP地址发送后续的页面访问请求。
由于响应页面即使不被添加跳转代码,也可能被进行篡改,影响用户体验,为避免该问题,本实施方式中,在步骤S305中,接收与所述页面访问请求对应的响应页面之后,所述方法还包括:
通过加载于所述响应页面中的脚本扫描所述响应页面的DOM树,若所述DOM树中具有不在白名单中的外链,则通过加密协议重新向校验后的第一IP地址发送页面访问请求,接收与该页面访问请求对应的响应页面,并执行所述在所述应用程序内的显示界面中展示所述响应页面的步骤;否则执行所述在所述应用程序内的显示界面中展示所述响应页面的步骤。
当然,考虑到后续的页面访问速度,在通过加密协议向校验后的第一IP地址发送后续的页面访问请求达到第二预设时间(可设为1小时,当然,还可设置为其他时长)时,可执行所述向校验后的第一IP地址发送后续的页面访问请求;
另外,在本地连接的网络发生变化或本地IP地址发生变化时,由于本地的网络环境发生了变化,可执行所述向校验后的第一IP地址发送后续的页面访问请求。
在所述DOM树中具有不在白名单中的外链时,说明该响应页面中已经被篡改,可通过加密协议向校验后的第一IP地址发送后续的页面访问请求。
可理解的是,本实施方式中,在所述DOM树中具有不在白名单中的外链时,向后台服务器发送所述不在白名单中的外链,所述后台服务器即为所述应用程序的后台服务器,其可为云服务器,对接收到的所述不在白名单中的外链进行进一步分析,以更新所述白名单。
对于方法实施方式,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明实施方式并不受所描述的动作顺序的限制,因为依据本发明实施方式,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施方式均属于优选实施方式,所涉及的动作并不一定是本发明实施方式所必须的。
图4是本发明一种实施方式的确定应用程序内页面跳转的方法的流程图;参照图4,所述方法包括:
S401:在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
可理解的是,所述应用程序在接收到第一响应页面后,即对所述第一响应页面进行加载。
S402:通过调用签到函数来确定所述应用程序内第一响应页面是否发生跳转。
需要说明的是,所述签到函数为内嵌于第一响应页面中的js脚本,在所述应用程序访问到第一响应页面的前端服务器或所述第一响应页面正常调用显示时,所述签到函数能够被调用,并在被调用后将签到标志进行置位。
因此,当所述应用程序在所述第一响应页面加载时,可先将签到标志设置为初始值(通常设置为0),只有在所述应用程序访问到第一响应页面的前端服务器及所述第一响应页面正常调用显示时,才能调用签到函数,若所述第一响应页面中被添加跳转代码(通常为用于实现401跳转的代码),会使得第一响应页面跳转至其他页面,该签到函数无法被调用,签到标志仍为初始值,故而,可通过所述签到标志来判断所述签到函数是否被调用,相应地,即可通过所述签到标志来判断所述第一响应页面是否发生跳转。
当然,若所述第一响应页面未发生跳转,则直接在所述应用程序内的显示界面中展示所述第一响应页面。
本实施方式通过调用签到函数来确定应用程序内第一响应页面是否发生跳转,能够即时准确地确定所述第一响应页面是否发生跳转,提高了用户体验,并且保证了用户的信息安全及财产安全。
图5是本发明一种实施方式的确定应用程序内页面跳转的方法的流程图;参照图5,所述方法包括:
S501:在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
S502:通过调用签到函数来确定所述应用程序内第一响应页面是否发生跳转;
需要说明的是,步骤S501-S502与图4所示的实施方式的步骤S401-S402相同,本实施方式不再赘 述。
S503:在不能调用所述应用程序内第一响应页面的签到函数时,认定所述应用程序内的第一响应页面发生跳转,通过加密协议重新发送页面访问请求,并接收与重新发送的页面访问请求对应的第二响应页面。
可理解的是,为了提高页面访问速度,通常的页面访问请求是通过明文方式(即HTTP协议等)进行发送的,故而,返回的第一响应页面页是通过明文方式发送的,故而,容易被黑客截获,从而在所述第一响应页面中添加跳转代码,为避免与重新发送的页面访问请求对应的第二响应页面也被黑客截获,本实施方式中,通过加密协议(即HTTPS协议等)重新发送页面访问请求。
S504:在所述应用程序内的显示界面中展示所述第二响应页面。
在具体实现中,由于所述第二响应页面是通过加密协议发送的,故而其被添加跳转代码的可能性非常小,在此情况下,则可停止在所述应用程序内加载所述第一响应页面,直接在所述应用程序内的显示界面中展示所述第二响应页面。
图6是本发明一种实施方式的确定应用程序内页面跳转的方法的流程图;参照图6,所述方法包括:
S601:在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
S602:通过调用签到函数来确定所述应用程序内第一响应页面是否发生跳转;
S603:在不能调用所述应用程序内第一响应页面的签到函数时,认定所述应用程序内的第一响应页面发生跳转,通过加密协议重新发送页面访问请求,并接收与重新发送的页面访问请求对应的第二响应页面;
S604:在所述应用程序内的显示界面中展示所述第二响应页面;
需要说明的是,步骤S601-S604与图5所示的实施方式的步骤S501-S504相同,本实施方式不再赘述。
S605:通过所述加密协议发送后续的页面访问请求。
由于当前的第一响应页面发生跳转,故而,可理解为当前的网络环境并不安全,故而可通过所述加密协议发送后续的页面访问请求。
若后续的所有页面访问请求都通过加密协议发送,则会导致页面访问速度过慢,影响用户体验,为避免该问题,可在达到预设时间时,通过明文方式发送后续的页面访问请求。
另外,在网络环境发生变化(例如本地连接的网络发生变化或)本地IP地址发生变化)时,通过明文方式发送后续的页面访问请求。
图7是本发明一种实施方式的确定应用程序内页面跳转的方法的流程图;参照图7,所述方法包括:
S700:接收用户输入的搜索词,根据所述搜索词查找与所述搜索词相关的网页信息,并将查找到的网页信息展示于所述应用程序内的显示界面中,接收用户在所述应用程序内的显示界面中输入的页面访问指令。
可理解的是,由于查找到的网页信息展示于应用程序内的显示界面中,此时,用户通常会输入与需要访问的网页信息对应的页面访问指令。
S701:在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
S702:通过调用签到函数来确定所述应用程序内第一响应页面是否发生跳转;
S703:在不能调用所述应用程序内第一响应页面的签到函数时,认定所述应用程序内的第一响应页面发生跳转,通过加密协议重新发送页面访问请求,并接收与重新发送的页面访问请求对应的第二响应页面;
S704:在所述应用程序内的显示界面中展示所述第二响应页面;
需要说明的是,步骤S701-S704与图5所示的实施方式的步骤S501-S504相同,本实施方式不再赘述。
由于运营商局域DNS服务器中的内容可能被篡改,又或是用户的路由器上DNS服务器地址被修改,可能导致不能正常访问页面,影响用户体验,也可能导致用户在正常访问页面时,被链接至钓鱼网站或 木马网站等欺诈网站,影响用户的信息安全及财产安全,本实施方式中,步骤S700-S701之间,所述方法还包括:
A:基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求,并接收第一DNS服务器返回的与待解析域名对应的第一IP地址;
需要说明的是,所述第一DNS服务器通常为运营商局域DNS服务器,但该DNS服务器中的内容可能被篡改,当然,也有可能为被黑客修改的DNS服务器(即应用程序的DNS服务器地址被修改)。
B:将所述域名解析请求发送至第二DNS服务器;
需要说明的是,所述第二DNS服务器可理解为第三方提供的DNS服务器,第二DNS服务器的链接地址可直接存储于本地,在需要执行步骤B时,则直接从本地找到第二DNS服务器的链接地址,将所述域名解析请求根据链接地址发送至第二DNS服务器。
可理解的是,若直接将所述域名解析请求以明文方式(即HTTP协议等)发送至第二DNS服务器,则容易被黑客截获,从而难以保证所述第二DNS服务器所返回信息的真实性,为避免出现该问题,本实施方式中,将所述域名解析请求通过加密协议(即HTTPS协议等)发送至第二DNS服务器;
C:接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
需要说明的是,若将所述域名解析请求是通过加密协议(即HTTPS协议等)发送至第二DNS服务器,则所述第二DNS服务器通过加密协议返回所述第二IP地址。
D:采用所述第二IP地址对所述第一IP地址进行校验;
可理解的是,在所述第一IP地址与所述第二IP地址相同时,则认定所述第一IP地址校验通过,此时,所述校验后的第一IP地址即为该第一IP地址本身;在所述第一IP地址与所述第二IP地址不相同,则认定所述第一IP地址未验证通过,并将所述第一IP地址修改为第二IP地址,此时,所述校验后的第一IP地址即为所述第二IP地址。
下面以一个具体的实例来说明,但不限定本发明的保护范围,设所述域名解析请求中包括的待解析域名为M.haoshou.com,将该域名解析请求发送至第一DNS服务器后,接收所述第一DNS服务器返回的第一IP地址为125.88.193.213,再将所述域名解析请求发送至第二DNS服务器后,若接收所述第二DNS服务器返回的第二IP地址为125.88.193.213时,则认为所述第一IP地址校验通过,校验后的第一IP地址即为125.88.193.213;
若接收所述第二DNS服务器返回的第二IP地址为125.88.192.144时,则认为所述第一IP地址未校验通过,并将所述第一IP地址修改为125.88.192.144,校验后的第一IP地址即为125.88.192.144。
相应地,步骤S701进一步包括:
在应用程序基于用户输入的页面访问指令触发向校验后的第一IP地址发送页面访问请求时,接收与页面访问请求对应的第一响应页面。
图8是本发明一种实施方式的检测应用程序内页面篡改方法的流程图;参照图8,所述方法包括:
S801:在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
可理解的是,所述第一响应页面中内嵌有扫描脚本。
S802:加载所述第一响应页面中内嵌的扫描脚本,以检测所述应用程序内第一响应页面是否被篡改。
需要说明的是,所述扫描脚本可在检测所述应用程序内第一响应页面被篡改时,将篡改标志置位,故而,所述应用程序在加载所述第一响应页面中内嵌的扫描脚本时,先将篡改标志设置为初始值(通常设置为0),可根据所述篡改标志来判断所述第一响应页面是否被篡改。
当然,若所述第一响应页面未被篡改,则直接在所述应用程序内的显示界面中展示所述第一响应页面。
本实施方式通过加载第一响应页面中内嵌的扫描脚本,以检测所述应用程序内第一响应页面是否被篡改,能够即时准确地确定所述第一响应页面是否被篡改,提高了用户体验。
图9是本发明一种实施方式的检测应用程序内页面篡改方法的流程图;参照图9,所述方法包括:
S901:在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的 第一响应页面;
需要说明的是,步骤S901与图8所示的实施方式的步骤S801相同,在此不再赘述。
S902:加载所述第一响应页面中内嵌的扫描脚本,由所述扫描脚本对所述应用程序内第一响应页面的DOM树进行扫描,将所述应用程序内第一响应页面中的外链作为扫描结果;
S903:根据扫描结果来检测所述应用程序内第一响应页面是否被篡改。
可理解的是,所述外链即为用于在第一响应页面中发起的向外链接,由于对第一响应页面的篡改通常是通过添加类似于广告等信息,而广告等信息一般是通过在页面中发起的向外链接来体现,故而,本实施方式中将所述应用程序内第一响应页面中的外链作为扫描结果,并根据扫描结果来检测所述应用程序内第一响应页面是否被篡改,能够保证检测的准确性。
图10是本发明一种实施方式的检测应用程序内页面篡改方法的流程图;参照图10,所述方法包括:
S1001:在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
S1002:加载所述第一响应页面中内嵌的扫描脚本,由所述扫描脚本对所述应用程序内第一响应页面的DOM树进行扫描,将所述应用程序内第一响应页面中的外链作为扫描结果;
需要说明的是,步骤S1001-S1002与图9所示的实施方式的步骤S901-S902相同,在此不再赘述。
S1003:检测所述扫描结果中的各外链是否在白名单中,在所述扫描结果中具有不在白名单中的外链时,认定所述应用程序内第一响应页面被篡改。
在具体实现中,有些外链为第一响应页面中自带的,若直接将具有外链的第一响应页面均认为是被篡改的,容易导致检测的准确性过低,影响用户体验,故而,本实施方式中,通过检测所述扫描结果中的各外链是否在白名单中,在所述扫描结果中具有不在白名单中的外链时,认定所述应用程序内第一响应页面被篡改,从而有效提高了检测的准确性。
由于外链是不断变化地,为保证白名单能够进行更新,从而保证实时性,本实施方式中,在步骤S303之后,所述方法还包括:
将不在白名单中的外链发送至后台服务器,所述后台服务器即为所述应用程序的后台服务器,其可为云服务器,能够对接收到的不在白名单中的外链进行进一步分析,以更新所述白名单。
图11是本发明一种实施方式的检测应用程序内页面篡改方法的流程图;参照图11,所述方法包括:
S1101:在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
S1102:加载所述第一响应页面中内嵌的扫描脚本,由所述扫描脚本对所述应用程序内第一响应页面的DOM树进行扫描,将所述应用程序内第一响应页面中的外链作为扫描结果;
S1103:检测所述扫描结果中的各外链是否在白名单中,在所述扫描结果中具有不在白名单中的外链时,认定所述应用程序内第一响应页面被篡改。
需要说明的是,步骤S1101-S1103与图10所示的实施方式的步骤S1001-S1003相同,在此不再赘述。
S1104:通过加密协议重新发送页面访问请求,接收与重新发送的页面访问请求对应的第二响应页面。
可理解的是,为了提高页面访问速度,通常的页面访问请求是通过明文方式(即HTTP协议等)进行发送的,故而,返回的第一响应页面页是通过明文方式发送的,故而,容易被黑客截获,从而对所述第一响应页面进行篡改,为避免与重新发送的页面访问请求对应的第二响应页面也被黑客截获,本实施方式中,通过加密协议(即HTTPS协议等)重新发送页面访问请求。
S1105:在所述应用程序内的显示界面中展示所述第二响应页面。
在具体实现中,由于所述第二响应页面是通过加密协议发送的,故而其被篡改的可能性非常小,在此情况下,则直接在所述应用程序内的显示界面中展示所述第二响应页面。
图12是本发明一种实施方式的检测应用程序内页面篡改方法的流程图;参照图12,所述方法包括:
S1201:在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
S1202:加载所述第一响应页面中内嵌的扫描脚本,由所述扫描脚本对所述应用程序内第一响应页面的DOM树进行扫描,将所述应用程序内第一响应页面中的外链作为扫描结果;
S1203:检测所述扫描结果中的各外链是否在白名单中,在所述扫描结果中具有不在白名单中的外链时,认定所述应用程序内第一响应页面被篡改。
S1204:通过加密协议重新发送页面访问请求,接收与重新发送的页面访问请求对应的第二响应页面。
S1205:在所述应用程序内的显示界面中展示所述第二响应页面。
需要说明的是,步骤S1201-S1205与图11所示的实施方式的步骤S1101-S1105相同,在此不再赘述。
S506:通过所述加密协议发送后续的页面访问请求。
由于当前的第一响应页面被篡改,故而,可理解为当前的网络环境并不安全,故而可通过所述加密协议发送后续的页面访问请求。
若后续的所有页面访问请求都通过加密协议发送,则会导致页面访问速度过慢,影响用户体验,为避免该问题,可在达到预设时间时,通过明文方式发送后续的页面访问请求。
另外,在网络环境发生变化(例如本地连接的网络发生变化或)本地IP地址发生变化)时,通过明文方式发送后续的页面访问请求。
图13是本发明一种实施方式的检测应用程序内页面篡改方法的流程图;参照图13,所述方法包括:
S1300:接收用户输入的搜索词,根据所述搜索词查找与所述搜索词相关的网页信息,并将查找到的网页信息展示于所述应用程序内的显示界面中,接收用户在所述应用程序内的显示界面中输入的页面访问指令。
可理解的是,由于查找到的网页信息展示于应用程序内的显示界面中,此时,用户通常会输入与需要访问的网页信息对应的页面访问指令。
S1301:在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
S1302:加载所述第一响应页面中内嵌的扫描脚本,由所述扫描脚本对所述应用程序内第一响应页面的DOM树进行扫描,将所述应用程序内第一响应页面中的外链作为扫描结果;
S1303:检测所述扫描结果中的各外链是否在白名单中,在所述扫描结果中具有不在白名单中的外链时,认定所述应用程序内第一响应页面被篡改。
S1304:通过加密协议重新发送页面访问请求,接收与重新发送的页面访问请求对应的第二响应页面。
S1305:在所述应用程序内的显示界面中展示所述第二响应页面。
需要说明的是,步骤S1301-S1305与图11所示的实施方式的步骤S1101-S1105相同,在此不再赘述。
由于运营商局域DNS服务器中的内容可能被篡改,又或是用户的路由器上DNS服务器地址被修改,可能导致不能正常访问页面,影响用户体验,也可能导致用户在正常访问页面时,被链接至钓鱼网站或木马网站等欺诈网站,影响用户的信息安全及财产安全,本实施方式中,步骤S1300-S1301之间,所述方法还包括:
A:基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求,并接收第一DNS服务器返回的与待解析域名对应的第一IP地址;
需要说明的是,所述第一DNS服务器通常为运营商局域DNS服务器,但该DNS服务器中的内容可能被篡改,当然,也有可能为被黑客修改的DNS服务器(即应用程序的DNS服务器地址被修改)。
B:将所述域名解析请求发送至第二DNS服务器;
需要说明的是,所述第二DNS服务器可理解为第三方提供的DNS服务器,第二DNS服务器的链接地址可直接存储于本地,在需要执行步骤B时,则直接从本地找到第二DNS服务器的链接地址,将所述域名解析请求根据链接地址发送至第二DNS服务器。
可理解的是,若直接将所述域名解析请求以明文方式(即HTTP协议等)发送至第二DNS服务器,则容易被黑客截获,从而难以保证所述第二DNS服务器所返回信息的真实性,为避免出现该问题,本实施方式中,将所述域名解析请求通过加密协议(即HTTPS协议等)发送至第二DNS服务器;
C:接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
需要说明的是,若将所述域名解析请求是通过加密协议(即HTTPS协议等)发送至第二DNS服务器,则所述第二DNS服务器通过加密协议返回所述第二IP地址。
D:采用所述第二IP地址对所述第一IP地址进行校验;
可理解的是,在所述第一IP地址与所述第二IP地址相同时,则认定所述第一IP地址校验通过,此时,所述校验后的第一IP地址即为该第一IP地址本身;在所述第一IP地址与所述第二IP地址不相同,则认定所述第一IP地址未验证通过,并将所述第一IP地址修改为第二IP地址,此时,所述校验后的第一IP地址即为所述第二IP地址。
下面以一个具体的实例来说明,但不限定本发明的保护范围,设所述域名解析请求中包括的待解析域名为M.haoshou.com,将该域名解析请求发送至第一DNS服务器后,接收所述第一DNS服务器返回的第一IP地址为125.88.193.213,再将所述域名解析请求发送至第二DNS服务器后,若接收所述第二DNS服务器返回的第二IP地址为125.88.193.213时,则认为所述第一IP地址校验通过,校验后的第一IP地址即为125.88.193.213;
若接收所述第二DNS服务器返回的第二IP地址为125.88.192.144时,则认为所述第一IP地址未校验通过,并将所述第一IP地址修改为125.88.192.144,校验后的第一IP地址即为125.88.192.144。
相应地,步骤1301进一步包括:
在应用程序基于用户输入的页面访问指令触发向校验后的第一IP地址发送页面访问请求时,接收与页面访问请求对应的第一响应页面。
对于方法实施方式,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明实施方式并不受所描述的动作顺序的限制,因为依据本发明实施方式,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施方式均属于优选实施方式,所涉及的动作并不一定是本发明实施方式所必须的。
图14是本发明一种实施方式的应用程序内的页面访问装置的结构框图;参照图14,所述装置包括:
指令触发器1401,适于在应用程序基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求时,接收第一DNS服务器返回的与所述域名解析请求对应的第一IP地址;
请求发送器1402,适于将所述域名解析请求发送至第二DNS服务器;
地址接收器1403,适于接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
校验访问器1404,适于采用所述第二IP地址对所述第一IP地址进行校验,向校验后的第一IP地址发送在所述应用程序内根据所述页面访问指令生成的页面访问请求。
在本发明的一种可选实施方式中,所述校验访问器,进一步适于判断所述第一IP地址是否与所述第二IP地址相同,若所述第一IP地址与所述第二IP地址相同,则认定所述第一IP地址校验通过,若所述第一IP地址与所述第二IP地址不相同,则认定所述第一IP地址未校验通过,并将所述第一IP地址修改为第二IP地址。
在本发明的一种可选实施方式中,所述校验访问器,还适于在所述第一IP地址未校验通过时,在第一预设时间内直接通过所述第二DNS服务器进行域名解析。
在本发明的一种可选实施方式中,所述装置还包括:
连接判断器,适于判断本地是否第一次连接所述第一DNS服务器。
在本发明的一种可选实施方式中,所述装置还包括:
网络判断器,适于判断本地连接的网络是否发生变化。
在本发明的一种可选实施方式中,所述装置还包括:
地址判断器,适于判断本地IP地址是否发生变化。
在本发明的一种可选实施方式中,所述请求发送器,进一步适于将所述域名解析请求通过加密协议发送至第二DNS服务器。
在本发明的一种可选实施方式中,所述装置还包括:
指令接收器,适于接收用户输入的搜索词,根据所述搜索词查找与所述搜索词相关的网页信息,并将查找到的网页信息展示于所述应用程序内的显示界面中,接收用户在所述应用程序内的显示界面中输入的页面访问指令。
在本发明的一种可选实施方式中,所述装置还包括:
页面展示器,适于接收与所述页面访问请求对应的响应页面,在所述应用程序内的显示界面中展示 所述响应页面。
在本发明的一种可选实施方式中,所述装置还包括:
函数判断器,适于判断是否能够调用所述响应页面的签到函数,若能调用所述响应页面的签到函数,则调用所述页面展示器,若不能调用所述响应页面的签到函数,则通过加密协议重新向校验后的第一IP地址发送在所述应用程序内根据所述页面访问指令生成的页面访问请求,接收与该页面访问请求对应的响应页面,并调用所述页面展示器。
在本发明的一种可选实施方式中,所述函数判断器,还适于在不能调用所述响应页面的签到函数时,通过HTTPS协议向校验后的第一IP地址发送后续的页面访问请求。
在本发明的一种可选实施方式中,所述装置还包括:
外链扫描器,适于通过加载于所述响应页面中的脚本扫描所述响应页面的DOM树,若所述DOM树中具有不在白名单中的外链,则通过加密协议重新向校验后的第一IP地址发送页面访问请求,接收与该页面访问请求对应的响应页面,并调用所述页面展示器;否则调用所述页面展示器。
在本发明的一种可选实施方式中,所述外链扫描器,还适于在所述DOM树中具有不在白名单中的外链时,通过加密协议向校验后的第一IP地址发送后续的页面访问请求。
在本发明的一种可选实施方式中,所述外链扫描器,还适于在所述DOM树中具有不在白名单中的外链时,向后台服务器发送所述不在白名单中的外链。
图15是本发明一种实施方式的确定应用程序内页面跳转的装置的结构框图;参照图15,所述装置包括:
页面接收器1501,适于在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
跳转确定器1502,适于通过调用签到函数来确定所述应用程序内第一响应页面是否发生跳转。
在本发明的一种可选实施方式中,所述装置还包括:
跳转认定器,适于在不能调用所述应用程序内第一响应页面的签到函数时,认定所述应用程序内的第一响应页面发生跳转。
在本发明的一种可选实施方式中,所述装置还包括:
请求重发器,适于通过加密协议重新发送页面访问请求,并接收与重新发送的页面访问请求对应的第二响应页面。
在本发明的一种可选实施方式中,所述装置还包括:
页面展示器,适于在所述应用程序内的显示界面中展示所述第二响应页面。
在本发明的一种可选实施方式中,所述装置还包括:
加密发送器,适于通过所述加密协议发送后续的页面访问请求。
在本发明的一种可选实施方式中,所述装置还包括:
时间判断器,适于判断是否达到预设时间,若否,则调用所述加密发送器。
在本发明的一种可选实施方式中,所述装置还包括:
网络判断器,适于判断本地连接的网络是否发生变化,若否,则调用所述加密发送器。
在本发明的一种可选实施方式中,所述装置还包括:
地址判断器,适于判断本地IP地址是否发生变化,若否,则调用所述加密发送器。
在本发明的一种可选实施方式中,所述装置还包括:
指令接收器,适于接收用户输入的搜索词,根据所述搜索词查找与所述搜索词相关的网页信息,并将查找到的网页信息展示于所述应用程序内的显示界面中,接收用户在所述应用程序内的显示界面中输入的页面访问指令。
在本发明的一种可选实施方式中,所述方法还包括:
指令触发器,适于基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求,并接收第一DNS服务器返回的与待解析域名对应的第一IP地址;
请求发送器,适于将所述域名解析请求发送至第二DNS服务器;
地址接收器,适于接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
地址校验器,适于采用所述第二IP地址对所述第一IP地址进行校验;
相应地,所述页面接收器,进一步适于在应用程序基于用户输入的页面访问指令触发向校验后的第一IP地址发送页面访问请求时,接收与页面访问请求对应的第一响应页面。
图16是本发明一种实施方式的检测应用程序内页面篡改装置的结构框图;参照图16,所述装置包括:
页面接收器1601,适于在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
篡改检测器1602,适于加载所述第一响应页面中内嵌的扫描脚本,以检测所述应用程序内第一响应页面是否被篡改。
在本发明的一种可选实施方式中,所述篡改检测器,进一步适于加载所述第一响应页面中内嵌的扫描脚本,由所述扫描脚本对所述应用程序内第一响应页面的DOM树进行扫描,将所述应用程序内第一响应页面中的外链作为扫描结果,并根据扫描结果来检测所述应用程序内第一响应页面是否被篡改。
在本发明的一种可选实施方式中,所述篡改检测器,进一步适于检测所述扫描结果中的各外链是否在白名单中,在所述扫描结果中具有不在白名单中的外链时,认定所述应用程序内第一响应页面被篡改。
在本发明的一种可选实施方式中,所述装置还包括:
外链发送器,适于将不在白名单中的外链发送至后台服务器。
在本发明的一种可选实施方式中,所述装置还包括:
请求重发器,适于通过加密协议重新发送页面访问请求,接收与重新发送的页面访问请求对应的第二响应页面。
在本发明的一种可选实施方式中,所述装置还包括:
页面展示器,适于在所述应用程序内的显示界面中展示所述第二响应页面。
在本发明的一种可选实施方式中,所述装置还包括:
加密发送器,适于通过所述加密协议发送后续的页面访问请求。
在本发明的一种可选实施方式中,所述装置还包括:
时间判断器,适于判断是否达到预设时间,若否,则调用所述加密发送器。
在本发明的一种可选实施方式中,所述装置还包括:
网络判断器,适于判断本地连接的网络是否发生变化,若否,则调用所述加密发送器。
在本发明的一种可选实施方式中,所述装置还包括:
地址判断器,适于判断本地IP地址是否发生变化,若否,则调用所述加密发送器。
在本发明的一种可选实施方式中,所述装置还包括:
指令接收器,适于接收用户输入的搜索词,根据所述搜索词查找与所述搜索词相关的网页信息,并将查找到的网页信息展示于所述应用程序内的显示界面中,接收用户在所述应用程序内的显示界面中输入的页面访问指令。
在本发明的一种可选实施方式中,所述装置还包括:
指令触发器,适于基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求,并接收第一DNS服务器返回的与待解析域名对应的第一IP地址;
请求发送器,适于将所述域名解析请求发送至第二DNS服务器;
地址接收器,适于接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
地址校验器,适于采用所述第二IP地址对所述第一IP地址进行校验;
相应地,所述页面接收器,进一步适于在应用程序基于用户输入的页面访问指令触发向校验后的第一IP地址发送页面访问请求时,接收与页面访问请求对应的第一响应页面。
对于装置实施方式而言,由于其与方法实施方式基本相似,所以描述的比较简单,相关之处参见方法实施方式的部分说明即可。
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的应用程序内的页面访问设备、确定应用程序内页面跳转的设备、检测应用程序内页面篡改设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图17示出了可以实现根据本发明的一种应用程序内的页面访问的终端设备。该终端设备传统上包括处理器1710和以存储器1720形式的计算机程序产品或者计算机可读介质。存储器1720可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器1720具有用于执行上述方法中的任何方法步骤的程序代码1731的存储空间1730。例如,用于程序代码的存储空间1730可以包括分别用于实现上面的方法中的各种步骤的各个程序代码1731。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图18所述的便携式或者固定存储单元。该存储单元可以具有与图17的终端设备中的存储器1720类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码1731’,即可以由例如诸如1710之类的处理器读取的代码,这些代码当由终端设备运行时,导致该终端设备执行上面所描述的方法中的各个步骤。
当然,对于确定应用程序内页面跳转的终端设备、检测应用程序内页面篡改的终端设备类似图17和图18的结构。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。

Claims (78)

  1. 一种应用程序内的页面访问方法,其特征在于,所述方法包括:
    在应用程序基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求时,接收第一DNS服务器返回的与所述域名解析请求对应的第一IP地址;
    将所述域名解析请求发送至第二DNS服务器;
    接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
    采用所述第二IP地址对所述第一IP地址进行校验,向校验后的第一IP地址发送在所述应用程序内根据所述页面访问指令生成的页面访问请求。
  2. 如权利要求1所述的方法,其特征在于,所述采用所述第二IP地址对所述第一IP地址进行校验,进一步包括:
    判断所述第一IP地址是否与所述第二IP地址相同,若所述第一IP地址与所述第二IP地址相同,则认定所述第一IP地址校验通过,若所述第一IP地址与所述第二IP地址不相同,则认定所述第一IP地址未校验通过,并将所述第一IP地址修改为第二IP地址。
  3. 如权利要求2所述的方法,其特征在于,在所述第一IP地址未校验通过时,在第一预设时间内直接通过所述第二DNS服务器进行域名解析。
  4. 如权利要求1所述的方法,其特征在于,所述将所述域名解析请求发送至第二DNS服务器之前,所述方法还包括:
    判断本地是否第一次连接所述第一DNS服务器,若是,则执行所述将所述域名解析请求发送至第二DNS服务器的步骤。
  5. 如权利要求1所述的方法,其特征在于,所述将所述域名解析请求发送至第二DNS服务器之前,所述方法还包括:
    判断本地连接的网络是否发生变化,若是,则执行所述将所述域名解析请求发送至第二DNS服务器的步骤。
  6. 如权利要求5所述的方法,其特征在于,所述将所述域名解析请求发送至第二DNS服务器之前,所述方法还包括:
    判断本地IP地址是否发生变化,若是,则执行所述将所述域名解析请求发送至预设DNS服务器的步骤。
  7. 如权利要求5所述的方法,其特征在于,所述将所述域名解析请求发送至第二DNS服务器,进一步包括:
    将所述域名解析请求通过加密协议发送至第二DNS服务器。
  8. 如权利要5所述的方法,其特征在于,所述在应用程序基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求时,接收第一DNS服务器返回的与所述域名解析请求对应的第一IP地址之前,所述方法还包括:
    接收用户输入的搜索词,根据所述搜索词查找与所述搜索词相关的网页信息,并将查找到的网页信息展示于所述应用程序内的显示界面中,接收用户在所述应用程序内的显示界面中输入的页面访问指令。
  9. 如权利要求1-8任一项所述的方法,其特征在于,所述向校验后的第一IP地址发送在所述应用程序内根据所述页面访问指令生成的页面访问请求之后,所述方法还包括:
    接收与所述页面访问请求对应的响应页面,在所述应用程序内的显示界面中展示所述响应页面。
  10. 如权利要求9所述的方法,其特征在于,所述接收与所述页面访问请求对应的响应页面之后,所述方法还包括:
    判断是否能够调用所述响应页面的签到函数,若能调用所述响应页面的签到函数,则执行所述在所述应用程序内的显示界面中展示所述响应页面的步骤,若不能调用所述响应页面的签到函数,则通过加密协议重新向校验后的第一IP地址发送在所述应用程序内根据所述页面访问指令生成的页面访问请求,接收与该页面访问请求对应的响应页面,并执行所述在所述应用程序内的显示界面中展示所述响应页面的步骤。
  11. 如权利要求10所述的方法,其特征在于,在不能调用所述响应页面的签到函数时,通过加密协议向校验后的第一IP地址发送后续的页面访问请求。
  12. 如权利要求9所述的方法,其特征在于,所述接收与所述页面访问请求对应的响应页面之后,所述方法还包括:
    通过加载于所述响应页面中的脚本扫描所述响应页面的DOM树,若所述DOM树中具有不在白名单中的外链,则通过加密协议重新向校验后的第一IP地址发送页面访问请求,接收与该页面访问请求对应的响应页面,并执行所述在所述应用程序内的显示界面中展示所述响应页面的步骤;否则执行所述在所述应用程序内的显示界面中展示所述响应页面的步骤。
  13. 如权利要求12所述的方法,其特征在于,在所述DOM树中具有不在白名单中的外链时,通过加密协议向校验后的第一IP地址发送后续的页面访问请求。
  14. 如权利要求12所述的方法,其特征在于,在所述DOM树中具有不在白名单中的外链时,向后台服务器发送所述不在白名单中的外链。
  15. 一种确定应用程序内页面跳转的方法,其特征在于,所述方法包括:
    在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
    通过调用签到函数来确定所述应用程序内第一响应页面是否发生跳转。
  16. 如权利要求15所述的方法,其特征在于,所述通过调用签到函数来确定所述应用程序内的第一响应页面是否发生跳转之后,所述方法还包括:
    在不能调用所述应用程序内第一响应页面的签到函数时,认定所述应用程序内的第一响应页面发生跳转。
  17. 如权利要求16所述的方法,其特征在于,所述认定所述应用程序内的第一响应页面发生跳转之后,所述方法还包括:
    通过加密协议重新发送页面访问请求,并接收与重新发送的页面访问请求对应的第二响应页面。
  18. 如权利要求17所述的方法,其特征在于,所述接收与重新发送的页面访问请求对应的第二响应页面之后,所述方法还包括:
    在所述应用程序内的显示界面中展示所述第二响应页面。
  19. 如权利要求16所述的方法,其特征在于,所述认定所述应用程序内的第一响应页面发生跳转之后,所述方法还包括:
    通过所述加密协议发送后续的页面访问请求。
  20. 如权利要求19所述的方法,其特征在于,所述通过所述加密协议发送后续的页面访问请求之后,所述方法还包括:
    判断是否达到预设时间,若否,则执行所述通过所述加密协议发送后续的页面访问请求的步骤。
  21. 如权利要求19所述的方法,其特征在于,所述通过所述加密协议发送后续的页面访问请求之后,所述方法还包括:
    判断本地连接的网络是否发生变化,若否,则执行所述通过所述加密协议发送后续的页面访问请求的步骤。
  22. 如权利要求19所述的方法,其特征在于,所述通过所述加密协议发送后续的页面访问请求之后,所述方法还包括:
    判断本地IP地址是否发生变化,若否,则执行所述通过所述加密协议发送后续的页面访问请求的步骤。
  23. 如权利要求15-22中任一项所述的方法,其特征在于,所述在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面之前,所述方法还包括:
    接收用户输入的搜索词,根据所述搜索词查找与所述搜索词相关的网页信息,并将查找到的网页信息展示于所述应用程序内的显示界面中,接收用户在所述应用程序内的显示界面中输入的页面访问指令。
  24. 如权利要求23所述的方法,其特征在于,所述在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面之前,所述方法还包括:
    基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求,并接收第一DNS服务器返回的与待解析域名对应的第一IP地址;
    将所述域名解析请求发送至第二DNS服务器;
    接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
    采用所述第二IP地址对所述第一IP地址进行校验;
    相应地,所述在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面,进一步包括:
    在应用程序基于用户输入的页面访问指令触发向校验后的第一IP地址发送页面访问请求时,接收与页面访问请求对应的第一响应页面。
  25. 一种检测应用程序内页面篡改方法,其特征在于,所述方法包括:
    在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
    加载所述第一响应页面中内嵌的扫描脚本,以检测所述应用程序内第一响应页面是否被篡改。
  26. 如权利要求25所述的方法,其特征在于,所述加载所述第一响应页面中内嵌的扫描脚本,以检测所述应用程序内第一响应页面是否被篡改,进一步包括:
    加载所述第一响应页面中内嵌的扫描脚本,由所述扫描脚本对所述应用程序内第一响应页面的DOM树进行扫描,将所述应用程序内第一响应页面中的外链作为扫描结果;
    根据扫描结果来检测所述应用程序内第一响应页面是否被篡改。
  27. 如权利要求26所述的方法,其特征在于,所述根据扫描结果来检测所述应用程序内第一响应页面是否被篡改,进一步包括:
    检测所述扫描结果中的各外链是否在白名单中,在所述扫描结果中具有不在白名单中的外链时,认定所述应用程序内第一响应页面被篡改。
  28. 如权利要求27所述的方法,其特征在于,所述认定所述应用程序内第一响应页面被篡改之后,所述方法还包括:
    将不在白名单中的外链发送至后台服务器。
  29. 如权利要求27所述的方法,其特征在于,所述认定所述应用程序内第一响应页面被篡改之后,所述方法还包括:
    通过加密协议重新发送页面访问请求,接收与重新发送的页面访问请求对应的第二响应页面。
  30. 如权利要求29所述的方法,其特征在于,所述接收与重新发送的页面访问请求对应的第二响应页面之后,所述方法还包括:
    在所述应用程序内的显示界面中展示所述第二响应页面。
  31. 如权利要求27所述的方法,其特征在于,所述认定所述应用程序内第一响应页面被篡改之后,所述方法还包括:
    通过所述加密协议发送后续的页面访问请求。
  32. 如权利要求31所述的方法,其特征在于,所述通过所述加密协议发送后续的页面访问请求之后,所述方法还包括:
    判断是否达到预设时间,若否,则执行所述通过所述加密协议发送后续的页面访问请求的步骤。
  33. 如权利要求32项所述的方法,其特征在于,所述通过所述加密协议发送后续的页面访问请求之后,所述方法还包括:
    判断本地连接的网络是否发生变化,若否,则执行所述通过所述加密协议发送后续的页面访问请求的步骤。
  34. 如权利要求31所述的方法,其特征在于,所述通过所述加密协议发送后续的页面访问请求之后,所述方法还包括:
    判断本地IP地址是否发生变化,若否,则执行所述通过所述加密协议发送后续的页面访问请求的步骤。
  35. 如权利要求25-34中任一项所述的方法,其特征在于,所述在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面之前,所述方法还包括:
    接收用户输入的搜索词,根据所述搜索词查找与所述搜索词相关的网页信息,并将查找到的网页信 息展示于所述应用程序内的显示界面中,接收用户在所述应用程序内的显示界面中输入的页面访问指令。
  36. 如权利要求35所述的方法,其特征在于,所述在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面之前,所述方法还包括:
    基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求,并接收第一DNS服务器返回的与待解析域名对应的第一IP地址;
    将所述域名解析请求发送至第二DNS服务器;
    接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
    采用所述第二IP地址对所述第一IP地址进行校验;
    相应地,所述在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面,进一步包括:
    在应用程序基于用户输入的页面访问指令触发向校验后的第一IP地址发送页面访问请求时,接收与页面访问请求对应的第一响应页面。
  37. 一种应用程序内的页面访问装置,其特征在于,所述装置包括:
    指令触发器,适于在应用程序基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求时,接收第一DNS服务器返回的与所述域名解析请求对应的第一IP地址;
    请求发送器,适于将所述域名解析请求发送至第二DNS服务器;
    地址接收器,适于接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
    校验访问器,适于采用所述第二IP地址对所述第一IP地址进行校验,向校验后的第一IP地址发送在所述应用程序内根据所述页面访问指令生成的页面访问请求。
  38. 如权利要求37所述的装置,其特征在于,所述校验访问器,进一步适于判断所述第一IP地址是否与所述第二IP地址相同,若所述第一IP地址与所述第二IP地址相同,则认定所述第一IP地址校验通过,若所述第一IP地址与所述第二IP地址不相同,则认定所述第一IP地址未校验通过,并将所述第一IP地址修改为第二IP地址。
  39. 如权利要求38所述的装置,其特征在于,所述校验访问器,还适于在所述第一IP地址未校验通过时,在第一预设时间内直接通过所述第二DNS服务器进行域名解析。
  40. 如权利要求37所述的装置,其特征在于,所述装置还包括:
    连接判断器,适于判断本地是否第一次连接所述第一DNS服务器。
  41. 如权利要求37所述的装置,其特征在于,所述装置还包括:
    网络判断器,适于判断本地连接的网络是否发生变化。
  42. 如权利要求37所述的装置,其特征在于,所述装置还包括:
    地址判断器,适于判断本地IP地址是否发生变化。
  43. 如权利要求37所述的装置,其特征在于,所述请求发送器,进一步适于将所述域名解析请求通过加密协议发送至第二DNS服务器。
  44. 如权利要37所述的装置,其特征在于,所述装置还包括:
    指令接收器,适于接收用户输入的搜索词,根据所述搜索词查找与所述搜索词相关的网页信息,并将查找到的网页信息展示于所述应用程序内的显示界面中,接收用户在所述应用程序内的显示界面中输入的页面访问指令。
  45. 如权利要求37-44中任一项所述的装置,其特征在于,所述装置还包括:
    页面展示器,适于接收与所述页面访问请求对应的响应页面,在所述应用程序内的显示界面中展示所述响应页面。
  46. 如权利要求45所述的装置,其特征在于,所述装置还包括:
    函数判断器,适于判断是否能够调用所述响应页面的签到函数,若能调用所述响应页面的签到函数,则调用所述页面展示器,若不能调用所述响应页面的签到函数,则通过加密协议重新向校验后的第一IP地址发送在所述应用程序内根据所述页面访问指令生成的页面访问请求,接收与该页面访问请求对应的响应页面,并调用所述页面展示器。
  47. 如权利要求46所述的装置,其特征在于,所述函数判断器,还适于在不能调用所述响应页面的 签到函数时,通过HTTPS协议向校验后的第一IP地址发送后续的页面访问请求。
  48. 如权利要求45所述的装置,其特征在于,所述装置还包括:
    外链扫描器,适于通过加载于所述响应页面中的脚本扫描所述响应页面的DOM树,若所述DOM树中具有不在白名单中的外链,则通过加密协议重新向校验后的第一IP地址发送页面访问请求,接收与该页面访问请求对应的响应页面,并调用所述页面展示器;否则调用所述页面展示器。
  49. 如权利要求48所述的装置,其特征在于,所述外链扫描器,还适于在所述DOM树中具有不在白名单中的外链时,通过加密协议向校验后的第一IP地址发送后续的页面访问请求。
  50. 如权利要求48所述的装置,其特征在于,所述外链扫描器,还适于在所述DOM树中具有不在白名单中的外链时,向后台服务器发送所述不在白名单中的外链。
  51. 一种确定应用程序内页面跳转的装置,其特征在于,所述装置包括:
    页面接收器,适于在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
    跳转确定器,适于通过调用签到函数来确定所述应用程序内第一响应页面是否发生跳转。
  52. 如权利要求51所述的装置,其特征在于,所述装置还包括:
    跳转认定器,适于在不能调用所述应用程序内第一响应页面的签到函数时,认定所述应用程序内的第一响应页面发生跳转。
  53. 如权利要求52所述的装置,其特征在于,所述装置还包括:
    请求重发器,适于通过加密协议重新发送页面访问请求,并接收与重新发送的页面访问请求对应的第二响应页面。
  54. 如权利要求53所述的装置,其特征在于,所述装置还包括:
    页面展示器,适于在所述应用程序内的显示界面中展示所述第二响应页面。
  55. 如权利要求51所述的装置,其特征在于,所述装置还包括:
    加密发送器,适于通过所述加密协议发送后续的页面访问请求。
  56. 如权利要求55所述的装置,其特征在于,所述装置还包括:
    时间判断器,适于判断是否达到预设时间,若否,则调用所述加密发送器。
  57. 如权利要求55所述的装置,其特征在于,所述装置还包括:
    网络判断器,适于判断本地连接的网络是否发生变化,若否,则调用所述加密发送器。
  58. 如权利要求55所述的装置,其特征在于,所述装置还包括:
    地址判断器,适于判断本地IP地址是否发生变化,若否,则调用所述加密发送器。
  59. 如权利要求51-58中任一项所述的装置,其特征在于,所述装置还包括:
    指令接收器,适于接收用户输入的搜索词,根据所述搜索词查找与所述搜索词相关的网页信息,并将查找到的网页信息展示于所述应用程序内的显示界面中,接收用户在所述应用程序内的显示界面中输入的页面访问指令。
  60. 如权利要求59所述的装置,其特征在于,所述方法还包括:
    指令触发器,适于基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求,并接收第一DNS服务器返回的与待解析域名对应的第一IP地址;
    请求发送器,适于将所述域名解析请求发送至第二DNS服务器;
    地址接收器,适于接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
    地址校验器,适于采用所述第二IP地址对所述第一IP地址进行校验;
    相应地,所述页面接收器,进一步适于在应用程序基于用户输入的页面访问指令触发向校验后的第一IP地址发送页面访问请求时,接收与页面访问请求对应的第一响应页面。
  61. 一种检测应用程序内页面篡改装置,其特征在于,所述装置包括:
    页面接收器,适于在应用程序基于用户输入的页面访问指令触发页面访问请求时,接收与页面访问请求对应的第一响应页面;
    篡改检测器,适于加载所述第一响应页面中内嵌的扫描脚本,以检测所述应用程序内第一响应页面是否被篡改。
  62. 如权利要求61所述的装置,其特征在于,所述篡改检测器,进一步适于加载所述第一响应页面中内嵌的扫描脚本,由所述扫描脚本对所述应用程序内第一响应页面的DOM树进行扫描,将所述应用程序内第一响应页面中的外链作为扫描结果,并根据扫描结果来检测所述应用程序内第一响应页面是否被篡改。
  63. 如权利要求62所述的装置,其特征在于,所述篡改检测器,进一步适于检测所述扫描结果中的各外链是否在白名单中,在所述扫描结果中具有不在白名单中的外链时,认定所述应用程序内第一响应页面被篡改。
  64. 如权利要求62所述的装置,其特征在于,所述装置还包括:
    外链发送器,适于将不在白名单中的外链发送至后台服务器。
  65. 如权利要求62所述的装置,其特征在于,所述装置还包括:
    请求重发器,适于通过加密协议重新发送页面访问请求,接收与重新发送的页面访问请求对应的第二响应页面。
  66. 如权利要求65所述的装置,其特征在于,所述装置还包括:
    页面展示器,适于在所述应用程序内的显示界面中展示所述第二响应页面。
  67. 如权利要求62所述的装置,其特征在于,所述装置还包括:
    加密发送器,适于通过所述加密协议发送后续的页面访问请求。
  68. 如权利要求67所述的装置,其特征在于,所述装置还包括:
    时间判断器,适于判断是否达到预设时间,若否,则调用所述加密发送器。
  69. 如权利要求68所述的装置,其特征在于,所述装置还包括:
    网络判断器,适于判断本地连接的网络是否发生变化,若否,则调用所述加密发送器。
  70. 如权利要求67所述的装置,其特征在于,所述装置还包括:
    地址判断器,适于判断本地IP地址是否发生变化,若否,则调用所述加密发送器。
  71. 如权利要求61-70中任一项所述的装置,其特征在于,所述装置还包括:
    指令接收器,适于接收用户输入的搜索词,根据所述搜索词查找与所述搜索词相关的网页信息,并将查找到的网页信息展示于所述应用程序内的显示界面中,接收用户在所述应用程序内的显示界面中输入的页面访问指令。
  72. 如权利要求71所述的装置,其特征在于,所述装置还包括:
    指令触发器,适于基于用户输入的页面访问指令触发向第一DNS服务器发送域名解析请求,并接收第一DNS服务器返回的与待解析域名对应的第一IP地址;
    请求发送器,适于将所述域名解析请求发送至第二DNS服务器;
    地址接收器,适于接收所述第二DNS服务器返回的与所述域名解析请求对应的第二IP地址;
    地址校验器,适于采用所述第二IP地址对所述第一IP地址进行校验;
    相应地,所述页面接收器,进一步适于在应用程序基于用户输入的页面访问指令触发向校验后的第一IP地址发送页面访问请求时,接收与页面访问请求对应的第一响应页面。
  73. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在终端设备上运行时,导致所述终端设备执行根据权利要求1-14中的任一个所述的应用程序内的页面访问方法。
  74. 一种计算机可读介质,其中存储了如权利要求73所述的计算机程序。
  75. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在终端设备上运行时,导致所述终端设备执行根据权利要求15-24中的任一个所述的确定应用程序内页面跳转的方法。
  76. 一种计算机可读介质,其中存储了如权利要求75所述的计算机程序。
  77. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在终端设备上运行时,导致所述终端设备执行根据权利要求25-36中的任一个所述的检测应用程序内页面篡改方法。
  78. 一种计算机可读介质,其中存储了如权利要求77所述的计算机程序。
PCT/CN2016/091539 2015-07-24 2016-07-25 应用程序内的页面处理方法和装置 WO2017016458A1 (zh)

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
CN201510441013.7 2015-07-24
CN201510441013.7A CN105100298A (zh) 2015-07-24 2015-07-24 应用程序内的页面访问方法及装置
CN201510441257.5A CN105141709B (zh) 2015-07-24 2015-07-24 确定应用程序内页面跳转的方法及装置
CN201510441057.X 2015-07-24
CN201510441257.5 2015-07-24
CN201510441057.XA CN105354511A (zh) 2015-07-24 2015-07-24 检测应用程序内页面篡改方法及装置

Publications (1)

Publication Number Publication Date
WO2017016458A1 true WO2017016458A1 (zh) 2017-02-02

Family

ID=57884050

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/091539 WO2017016458A1 (zh) 2015-07-24 2016-07-25 应用程序内的页面处理方法和装置

Country Status (1)

Country Link
WO (1) WO2017016458A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669716A (zh) * 2018-09-25 2019-04-23 深圳壹账通智能科技有限公司 页面控制方法、装置、设备及可读存储介质
CN111541758A (zh) * 2020-04-17 2020-08-14 支付宝(杭州)信息技术有限公司 页面更新方法及装置
CN111611514A (zh) * 2020-04-11 2020-09-01 上海淇玥信息技术有限公司 一种基于用户登录信息的页面展示方法、装置和电子设备
CN111611514B (zh) * 2020-04-11 2024-04-23 上海淇玥信息技术有限公司 一种基于用户登录信息的页面展示方法、装置和电子设备

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103561121A (zh) * 2013-10-11 2014-02-05 北京奇虎科技有限公司 一种dns的解析方法、装置和浏览器
CN103605926A (zh) * 2013-11-29 2014-02-26 北京奇虎科技有限公司 一种网页篡改的检测方法及装置
US20140331304A1 (en) * 2013-05-03 2014-11-06 John Wong Method and system for mitigation of distributed denial of service (ddos) attacks
CN104408204A (zh) * 2014-12-18 2015-03-11 北京国双科技有限公司 网页页面链接地址的获取方法和装置
CN105100298A (zh) * 2015-07-24 2015-11-25 北京奇虎科技有限公司 应用程序内的页面访问方法及装置
CN105141709A (zh) * 2015-07-24 2015-12-09 北京奇虎科技有限公司 确定应用程序内页面跳转的方法及装置
CN105354511A (zh) * 2015-07-24 2016-02-24 北京奇虎科技有限公司 检测应用程序内页面篡改方法及装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140331304A1 (en) * 2013-05-03 2014-11-06 John Wong Method and system for mitigation of distributed denial of service (ddos) attacks
CN103561121A (zh) * 2013-10-11 2014-02-05 北京奇虎科技有限公司 一种dns的解析方法、装置和浏览器
CN103605926A (zh) * 2013-11-29 2014-02-26 北京奇虎科技有限公司 一种网页篡改的检测方法及装置
CN104408204A (zh) * 2014-12-18 2015-03-11 北京国双科技有限公司 网页页面链接地址的获取方法和装置
CN105100298A (zh) * 2015-07-24 2015-11-25 北京奇虎科技有限公司 应用程序内的页面访问方法及装置
CN105141709A (zh) * 2015-07-24 2015-12-09 北京奇虎科技有限公司 确定应用程序内页面跳转的方法及装置
CN105354511A (zh) * 2015-07-24 2016-02-24 北京奇虎科技有限公司 检测应用程序内页面篡改方法及装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669716A (zh) * 2018-09-25 2019-04-23 深圳壹账通智能科技有限公司 页面控制方法、装置、设备及可读存储介质
CN111611514A (zh) * 2020-04-11 2020-09-01 上海淇玥信息技术有限公司 一种基于用户登录信息的页面展示方法、装置和电子设备
CN111611514B (zh) * 2020-04-11 2024-04-23 上海淇玥信息技术有限公司 一种基于用户登录信息的页面展示方法、装置和电子设备
CN111541758A (zh) * 2020-04-17 2020-08-14 支付宝(杭州)信息技术有限公司 页面更新方法及装置
CN111541758B (zh) * 2020-04-17 2023-06-16 支付宝(杭州)信息技术有限公司 页面更新方法及装置

Similar Documents

Publication Publication Date Title
US10599843B2 (en) Identifying whether an application is malicious
US10484424B2 (en) Method and system for security protection of account information
US10212179B2 (en) Method and system for checking security of URL for mobile terminal
US9742774B2 (en) Method and apparatus for determining phishing website
US9348980B2 (en) Methods, systems and application programmable interface for verifying the security level of universal resource identifiers embedded within a mobile application
US8789204B2 (en) Method and apparatus for secure cross-site scripting
US9953162B2 (en) Rapid malware inspection of mobile applications
US10652748B2 (en) Method, system and application programmable interface within a mobile device for indicating a confidence level of the integrity of sources of information
US10826936B2 (en) Detecting and attributing undesirable automatic redirects
US8505102B1 (en) Detecting undesirable content
US9747455B1 (en) Data protection using active data
WO2016058489A1 (zh) 一种用于提供访问页面的方法与设备
CN103491543A (zh) 通过无线终端检测恶意网址的方法、无线终端
CN111163095B (zh) 网络攻击分析方法、网络攻击分析装置、计算设备和介质
CN112703496B (zh) 关于恶意浏览器插件对应用用户的基于内容策略的通知
CN105141709B (zh) 确定应用程序内页面跳转的方法及装置
CN109672658B (zh) Json劫持漏洞的检测方法、装置、设备及存储介质
US20190222587A1 (en) System and method for detection of attacks in a computer network using deception elements
CN104980404B (zh) 保护账号信息安全的方法和系统
CN104023336A (zh) 移动终端的无线接入方法及移动终端
CN104050054B (zh) 安装包安装失败的处理方法及原因确定方法及装置
US10474810B2 (en) Controlling access to web resources
WO2017016458A1 (zh) 应用程序内的页面处理方法和装置
CN104573486A (zh) 漏洞检测方法和装置
CN105100298A (zh) 应用程序内的页面访问方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16829824

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16829824

Country of ref document: EP

Kind code of ref document: A1