Webpage script code protection method and device
A script code and webpage technology, applied in the field of webpage script code protection methods and devices, can solve the problems of forged webpage requests, increased reading costs, and poor resistance to malicious code analysis, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0043] see figure 1 , the present embodiment provides a webpage script code protection method, comprising:
[0044] Parse the script code of the web page through the code analysis tool to obtain a tree-like code structure composed of multiple nodes; traverse the nodes to be encrypted in the tree-like code structure, and perform encryption conversion on each node to be encrypted in sequence based on the offset parameter from bottom to top , until the conversion of the topmost node to be encrypted is completed to generate encrypted bytecode; configure the virtual machine interpreter used to construct and execute the encrypted bytecode according to the offset parameter; save the virtual machine interpreter and encrypted bytecode package in the web script code file for execution calls.
[0045]The web page script code protection method provided by this embodiment is applicable to the environment of running web page script language (JavaScript), such as various mainstream browsers...
Embodiment 2
[0063] This embodiment provides a webpage script code protection device, including:
[0064] The initial obfuscation unit is used to initially obfuscate the source code of the webpage script by using a code obfuscation tool to obtain the webpage script code;
[0065] The code block labeling unit is used to select part or all of the script code to mark the protection code block based on the webpage script code, and the protection code block includes entry mark information;
[0066] The code analysis unit is used to analyze the web page script code through the code analysis tool to obtain a tree code structure composed of multiple nodes;
[0067] The encryption conversion unit is used to traverse the nodes to be encrypted in the tree code structure, and perform encryption conversion on each node to be encrypted from bottom to top based on the offset parameter, until the conversion of the topmost node to be encrypted is completed to generate encrypted bytecode ;
[0068] A virt...
Embodiment 3
[0072] This embodiment provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, the steps of the above method for protecting web page script codes are executed.
[0073] Compared with the prior art, the beneficial effect of the computer-readable storage medium provided by this embodiment is the same as the beneficial effect of the method for protecting web page script code provided by the above technical solution, and will not be repeated here.
[0074] Those of ordinary skill in the art can understand that all or part of the steps in the above-mentioned inventive method can be completed by instructing related hardware through a program. The above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it includes: For each step of the method in the foregoing embodiments, the foregoing storage medium may be: ROM / RAM, magnetic di...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More - R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com

