Search Images Maps Play YouTube News Gmail Drive More »
Advanced Patent Search | Web History | Sign in

Patents

The behavior of browser applications, such as web browsers, can be controlled in part by script-based instructions present within documents read by those browsers. To analyze such scripts in an efficient manner, a script analyzer can identify the scripts in the document, divide them into script modules, and order the modules to represent an interpretational flow. The script can be interpreted and executed on a line-by-line basis and its behavior analyzed. Prior to interpretation, the scripts can be reviewed for delay conditionals, and such statements can be modified for more efficient interpretation. Additionally, if, during interpretation, the script generates new script, or modifies existing script, such new scripts can be themselves interpreted. External function calls made by the script can be intercepted and responded to in a generic fashion, limiting the need to create a document object model, based on the document's data, solely for script analysis purposes.

Referenced by

Citing PatentFiling dateIssue dateOriginal AssigneeTitle
US8140963Dec 19, 2007Mar 20, 2012Yahoo! Inc.Tag aggregator

Claims

1. A method for analyzing one or more scripts contained within a document to determine if the scripts perform one or more predefined functions, the method comprising the steps of:

identifying, from the one or more scripts, one or more scripts relevant to the one or more predefined functions;

interpreting the one or more relevant scripts;

intercepting an external function call from the one or more relevant scripts while the one or more relevant scripts are being interpreted, the external function call directed to a document object model of the document;

providing a generic response, independent of the document object model, to the external function call;
requesting a browser to construct the document object model if the generic response did not enable further operation of the relevant scripts; and
providing a specific response, obtained with reference to the constructed document object model, to the external function call if the browser was requested to construct the document object model.

2. The method of claim 1 further comprising the steps of: providing a time-centric response, unassociated with a current time, to the external function call if the external function call is a time-centric external function call, the time-centric response causing the one or more relevant scripts to resume operation earlier.

3. The method of claim 1 further comprising the steps of: detecting new script added by the interpreting the one or more scripts; and providing the new script to the interpreting the one or more scripts such that the interpreting the one or more scripts comprises interpreting the new script.

4. The method of claim 1, wherein the browser is a lightweight browser designed for a more limited computing platform.

5. The method of claim 1 further comprising the steps of: aggregating the one or more scripts to represent a first interpretational flow for a first set of conditions; and simulating the first set of conditions.

6. The method of claim 5 further comprising the steps of: aggregating the one or more scripts to represent a second interpretational flow for a second set of conditions, the second set of conditions comprising an alternative conditional result than the first set of conditions; interpreting the aggregating scripts representing the second interpretational flow; and simulating the second set of conditions.

7. The method of claim 1 further comprising the steps of: monitoring the interpreting the one or more scripts for a pre-identified type of action; and actively terminating the interpreting the one or more scripts if the pre-identified type of action is detected.

8. A method for analyzing one or more scripts contained within a document comprising the steps of:

interpreting the one or more scripts;

intercepting an external function call from the one or more scripts while the one or more scripts are being interpreted, the external function call making a time-centric request and directed to a document object model of the document; and

providing a time-centric response, unassociated with a current time, causing the one or more scripts to resume operation earlier.

9. The method of claim 8, wherein the time-centric request is directed to waiting for a pre-specified time period prior to performing a task; and wherein the time-centric response comprises responding as if the pre-specified time already occurred.

10. The method of claim 8, wherein the time-centric request is directed to waiting for a user event prior to performing a task; and wherein the time-centric response comprises responding as if the user event already occurred.

11. The method of claim 8 further comprising the steps of: detecting new script added by the interpreting the one or more scripts; and providing the new script to the interpreting the one or more scripts such that the interpreting the one or more scripts comprises interpreting the new script.

12. The method of claim 8 further comprising the steps of:

intercepting an external function call from the one or more scripts while the one or more scripts are being interpreted, the external function call directed to a document object model of the document;

providing a generic response, independent of the document object model, to the external function;

requesting a browser to construct the document object model if the generic response did not enable further operation; and

providing a specific response, obtained with reference to the constructed document object model, to the external function call if the browser was requested to construct the document object model.

13. The method of claim 8 further comprising the steps of: monitoring the interpreting the one or more scripts for a pre-identified type of action; and actively terminating the interpreting the one or more scripts if the pre-identified type of action is detected.

14. One or more computer-readable media comprising computer-executable instructions for analyzing scripts, the computer-executable instructions directed to steps comprising:

interpreting the one or more scripts;

intercepting an external function call from the one or more scripts while the one or more scripts are being interpreted, the external function call directed to a document object model of the document;

providing a generic response, independent of the document object model, to the external function call;

requesting a browser to construct the document object model if the generic response did not enable further operation of the relevant scripts; and
providing a specific response, obtained with reference to the constructed document object model, to the external function call if the browser was requested to construct the document object model.

15. The computer-readable media of claim 14 further comprising computer-executable instructions for: providing a time-centric response, unassociated with a current time, to the external function call if the external function call is a time-centric external function call, the time-centric response causing the one or more relevant scripts to resume operation earlier.

16. The computer-readable media of claim 14 further comprising computer-executable instructions for: detecting new script added by the interpreting the one or more scripts; and providing the new script to the interpreting the one or more scripts such that the interpreting the one or more scripts comprises interpreting the new script.

17. The computer-readable media of claim 14, wherein the browser is a lightweight browser designed for a more limited computing platform.

18. The computer-readable media of claim 14 further comprising computer-executable instructions for: aggregating the one or more scripts to represent a first interpretational flow for a first set of conditions; and simulating the first set of conditions.

19. The computer-readable media of claim 18 further comprising computer-executable instructions for: aggregating the one or more scripts to represent a second interpretational flow for a second set of conditions, the second set of conditions comprising an alternative conditional result than the first set of conditions; interpreting the aggregating scripts representing the second interpretational flow; and simulating the second set of conditions.

20. The computer-readable media of claim 14 further comprising computer-executable instructions for: monitoring the interpreting the one or more scripts for a pre-identified type of action; and actively terminating the interpreting the one or more scripts if the pre-identified type of action is detected.