Method and device for protecting JavaScript codes

A code and source code technology, applied in the network field, can solve the problems of JavaScript code obfuscation security, inability to effectively protect JavaScript code, etc., and achieve the effect of preventing theft

Active Publication Date: 2015-12-30
XIAMEN FEIXIN NETWORK TECH CO LTD
View PDF5 Cites 24 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the above first method, since the escape() function and unescape() function in JavaScript are well known, using the first method to obfuscate the JavaScript code cannot guarantee its security
After using the second method to obfuscate

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for protecting JavaScript codes
  • Method and device for protecting JavaScript codes
  • Method and device for protecting JavaScript codes

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0026] figure 1 is a block diagram of an example computing device 100 arranged to implement a JavaScript code protection scheme according to the present invention. In a basic configuration 102 , computing device 100 typically includes system memory 106 and one or more processors 104 . A memory bus 108 may be used for communication between the processor 104 and the system memory 106 .

[0027] Depending on the desired configuratio...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for protecting JavaScript codes. The method includes the steps that variable names in source codes are acquired, the variable names are replaced with preset character strings according to a mapping rule, and then the source codes obtained after replacement are acquired; code snippets in the source codes obtained after replacement are encrypted, and the encrypted source codes are acquired; whether the encrypted code snippets are tampered or not is judged, and if not, the encrypted source codes serve as protected source codes.

Description

technical field [0001] The invention relates to the field of network technology, in particular to a JavaScript code protection method and device. Background technique [0002] JavaScript is a scripting language that runs directly on the target machine. It has code visibility, that is, the code written in JavaScript language must be downloaded to the client in plain text, which makes the JavaScript code displayed in plain text easy to be seen by others. Misappropriation cannot be protected, and the security of the code is very poor. Everyone can directly view the running code fragments and modify, copy, and reproduce them. Now, with the rise of HTML5, the JavaScript language is widely used, including the version of the famous mobile game open source engine Cocos2d-JS, server-side development technology Node.js, and traditional Web development. In the above cases, it is inevitable to expose the running code to third-party manufacturers. [0003] Therefore, the demand for Jav...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F21/14
CPCG06F21/14
Inventor 黄庆铖林志斌
Owner XIAMEN FEIXIN NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products