CN113076550B - Script text updating method, script text encryption method and device - Google Patents

Script text updating method, script text encryption method and device Download PDF

Info

Publication number
CN113076550B
CN113076550B CN202110416632.6A CN202110416632A CN113076550B CN 113076550 B CN113076550 B CN 113076550B CN 202110416632 A CN202110416632 A CN 202110416632A CN 113076550 B CN113076550 B CN 113076550B
Authority
CN
China
Prior art keywords
original
encryption
script file
placeholder
decryption
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110416632.6A
Other languages
Chinese (zh)
Other versions
CN113076550A (en
Inventor
肖东爽
肖铮
陈树华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dingxiang Technology Co ltd
Original Assignee
Top Elephant Technology Co ltd
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
Application filed by Top Elephant Technology Co ltd filed Critical Top Elephant Technology Co ltd
Priority to CN202110416632.6A priority Critical patent/CN113076550B/en
Publication of CN113076550A publication Critical patent/CN113076550A/en
Application granted granted Critical
Publication of CN113076550B publication Critical patent/CN113076550B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/602Providing cryptographic facilities or services
    • 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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Abstract

The invention provides a script text updating method, a script text encryption method and a script text encryption device, which relate to the technical field of script updating and encryption and comprise the following steps: sending the original script file to the encryption and decryption publishing system, so that the encryption and decryption publishing system encrypts the original script file according to the encryption algorithm combination corresponding to each original placeholder and each original placeholder in the original script file respectively to obtain an encrypted script file; receiving the encrypted script file fed back by the encryption and decryption issuing system; and if a script file request sent by the client is received, feeding back the encrypted script file to the client so that the client updates the script by using the encrypted script file. The embodiment of the invention can not only improve the updating efficiency and the safety of the script file, but also obviously reduce the cost of manual updating.

Description

Script text updating method, script text encryption method and device
Technical Field
The invention relates to the technical field of script updating and encrypting, in particular to a script text updating method and a script text encrypting method and device.
Background
At present, the code protection of the client script (such as JavaScript) mainly adopts means of directly issuing a confusion source code to a client by using the confusion source code, or reducing the code length by deleting unnecessary blank spaces, changing lines, replacing local variables with shorter variable names and the like, and then issuing the code to the client. In addition, the submitted data is also encrypted by using some algorithm. When the script is cracked, the script logic or the encryption algorithm needs to be manually adjusted, which causes higher code maintenance cost and has hysteresis in protection. In addition, the codes do not change once being issued to the client, and an attacker can crack the codes through long-time analysis, so that the security of the codes of the client is not high.
Disclosure of Invention
In view of this, the present invention provides a script text updating method, a script text encrypting method and a script text encrypting device, which can improve the updating efficiency and security of script files and significantly reduce the cost of manual updating.
In a first aspect, an embodiment of the present invention provides a method for updating a script text, where the method is applied to a server, the server is respectively in communication connection with a client and an encryption/decryption publishing system, the server stores an original script file, the original script file includes one or more original placeholders, and the encryption/decryption publishing system stores a plurality of combinations of encryption algorithms, and the method includes: sending the original script file to the encryption and decryption publishing system, so that the encryption and decryption publishing system encrypts the original script file according to the encryption algorithm combination corresponding to each original placeholder and each original placeholder in the original script file respectively to obtain an encrypted script file; receiving the encrypted script file fed back by the encryption and decryption issuing system; and if a script file request sent by the client is received, feeding back the encrypted script file to the client so that the client updates the script by using the encrypted script file.
In one embodiment, receiving encrypted data sent by the client; the client side encrypts the original data by using the encryption script file to obtain the encrypted data; sending the encrypted data to the encryption and decryption issuing system so as to decrypt the encrypted data through the encryption and decryption issuing system to obtain the original data; and receiving the original data fed back by the encryption and decryption issuing system, and executing service logic processing according to the original data.
In one embodiment, the step of sending the original script file to the encryption/decryption distribution system further includes: and sending the original script file to the encryption and decryption publishing system according to a preset frequency.
In a second aspect, an embodiment of the present invention provides an encryption method for a script text, where the method is applied to an encryption and decryption publishing system, the encryption and decryption publishing system is in communication connection with a server, the server stores an original script file, the original script file includes one or more original placeholders, the encryption and decryption publishing system stores a plurality of encryption algorithm combinations, and the method includes: receiving an original script file sent by the server; according to the original placeholders in the original script file and the encryption algorithm combinations corresponding to the original placeholders, encrypting the original script file to obtain an encrypted script file; and feeding back the encrypted script file to the server.
In an embodiment, the step of encrypting the original script file according to the combination of the encryption algorithms corresponding to each original placeholder and each original placeholder in the original script file to obtain an encrypted script file includes: determining an encrypted placeholder corresponding to each original placeholder in the original script file; wherein the encryption placeholders correspond to one or more combinations of the encryption algorithms; for each original placeholder, replacing the original placeholder with an encrypted placeholder corresponding to the original placeholder; and encrypting the original script file by utilizing each encryption algorithm combination corresponding to each encryption placeholder to obtain an encrypted script file.
In one embodiment, the combination of encryption algorithms is updated at a specified period.
In a third aspect, an embodiment of the present invention provides an apparatus for updating a script text, where the apparatus is applied to a server, the server is respectively in communication connection with a client and an encryption/decryption publishing system, the server stores an original script file, the original script file includes one or more original placeholders, and the encryption/decryption publishing system stores a plurality of combinations of encryption algorithms, and the apparatus includes: the script encryption module is used for sending the original script file to the encryption and decryption publishing system so as to encrypt the original script file through the encryption and decryption publishing system according to the encryption algorithm combination corresponding to each original placeholder and each original placeholder in the original script file to obtain an encrypted script file; the encryption script receiving module is used for receiving the encryption script file fed back by the encryption and decryption issuing system; and the script updating module is used for feeding back the encrypted script file to the client side so as to enable the client side to update the script by using the encrypted script file if receiving a script file request sent by the client side.
In a fourth aspect, an embodiment of the present invention provides an apparatus for encrypting a script text, including: the device is applied to an encryption and decryption issuing system, the encryption and decryption issuing system is in communication connection with a server, the server stores an original script file, the original script file comprises one or more original placeholders, the encryption and decryption issuing system stores a plurality of encryption algorithm combinations, and the device comprises: the original script receiving module is used for receiving an original script file sent by the server; the encryption module is used for encrypting the original script file according to the encryption algorithm combination corresponding to each original placeholder in the original script file and each original placeholder respectively to obtain an encrypted script file; and the feedback module is used for feeding back the encrypted script file to the server.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor; the memory has stored therein a computer program operable on the processor, which when executed by the processor performs the steps of the method of any of the first and fourth aspects.
In a sixth aspect, embodiments of the present invention further provide a computer-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method of any one of the first and fourth aspects.
The embodiment of the invention provides a script text updating method and device. And then returning the encrypted script file to the server, and when the server receives a script file request sent by the client, feeding back the encrypted script file to the server so as to update the script. According to the method, the encryption of the script file is realized by the encryption and decryption release system through the combination of the placeholder and the corresponding encryption algorithm, and the encrypted script file can be fed back when a script file request sent by the client is received.
According to the encryption method and device for the script text, provided by the embodiment of the invention, the encryption and decryption issuing system receives the original script file sent by the server, the original placeholder in the original encryption script file and the encryption algorithm combination corresponding to the original placeholder are utilized to encrypt the original script file, and the encrypted script file obtained after encryption is returned to the server.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a script text updating method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a script text encryption method according to an embodiment of the present invention;
fig. 3 is a schematic application diagram of an updating method of a script text and an encrypting method of the script text according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for updating a script text according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for encrypting a script text according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, once a client script code is determined, the client script code is difficult to update automatically and is easy to attack, and updating script logic needs manpower, so that the cost is high, the safety is low, and the hysteresis is realized on safety protection. Based on this, the embodiment of the invention provides an updating method and an encryption method for a script text, which can improve the security of a client code and reduce the risk of code cracking.
To facilitate understanding of the embodiment, first, a detailed description is given of an updating method of a script text disclosed in the embodiment of the present invention, where the method is applied to a server, where the server is communicatively connected to a client and an encryption/decryption publishing system, an original script file is stored in the server, the original script file includes one or more placeholders, and the encryption/decryption publishing system stores a plurality of combinations of encryption algorithms, and specifically refer to a flowchart of the updating method of a script text shown in fig. 1, where the method mainly includes the following steps:
and step S102, sending the original script file to an encryption and decryption publishing system, and encrypting the original script file through the encryption and decryption publishing system according to the encryption algorithm combination corresponding to each original placeholder and each original placeholder in the original script file to obtain an encrypted script file. In practical application, an original script file is stored in a server, when a user accesses the system, a browser sends a request script file to the server, the server sends the original script file to an encryption and decryption issuing system according to the request, and when the encryption and decryption system receives the original script file, the original script file is encrypted according to an original placeholder contained in the original script file and an encryption algorithm combination corresponding to the placeholder.
And step S104, receiving the encrypted script file fed back by the encryption and decryption issuing system. In practical application, after the encryption and decryption issuing system processes the original script file to obtain the encrypted script file, the encrypted script file is sent to a server side so as to carry out subsequent operation.
And step S106, if a script file request sent by the client is received, feeding back the encrypted script file to the client so that the client updates the script by using the encrypted script file. In practical application, if a user accesses the system, the browser requests the server for a script file, the server feeds back the encrypted script file to the browser according to the request sent by the browser, and the browser can update the script according to the encrypted script file.
According to the script file updating method provided by the embodiment of the invention, the client sends the request script file to the server according to the user request, and the server returns the encrypted script file to the client according to the user request, so that the client updates the script file by using the encrypted script file. The encryption script file is obtained by sending an original script file to an encryption and decryption publishing system through a server, and encrypting the original script file by the encryption and decryption publishing system according to an original placeholder and an encryption algorithm. The embodiment of the invention can automatically update the algorithm and encrypt, reduces the risk of code cracking and improves the development efficiency.
In one embodiment, encrypted data sent by a client is received; the encrypted data is obtained by encrypting original data by using an encryption script file by a client; sending the encrypted data to an encryption and decryption issuing system so as to decrypt the encrypted data through the encryption and decryption issuing system to obtain original data; and receiving the original data fed back by the encryption and decryption issuing system, and executing service logic processing according to the original data. In practical application, a client encrypts original data by using an encryption script file and sends the encrypted data to a server, the server sends the encrypted data to an encryption and decryption issuing system, the encrypted data is decrypted in the encryption and decryption issuing system and returned to the server, and the server performs business logic operation according to the decrypted data, wherein the business logic refers to rules which should be followed when services are provided among different units.
To facilitate understanding, an embodiment of the present invention further provides an implementation manner for sending an original script file to an encryption/decryption publishing system, where the implementation manner includes: and sending the original script file to an encryption and decryption publishing system according to a preset frequency. In practical application, the server sends the original script file to the encryption and decryption publishing system at regular time, so that the encryption and decryption publishing system can set the sending frequency artificially by replacing a placeholder in an original code as an encryption algorithm, for example, if the time for an attacker to crack the client script is 10 hours, the script updating frequency can be set to 8 hours, that is, after the attacker cracks the original script, the script is updated, and the original encryption algorithm is invalid, thereby improving the security of the code.
The invention also provides an encryption method of script text, which is applied to an encryption and decryption publishing system, the encryption and decryption publishing system is in communication connection with a server, the server stores an original script file, the original script file comprises one or more original placeholders, and the encryption and decryption publishing system stores a plurality of encryption algorithm combinations, and specifically, the invention is shown in a flow schematic diagram of the script text encryption method shown in fig. 2, and comprises the following steps:
step S202, the original script file sent by the server is received. In one embodiment, when a user accesses the system, the browser sends a request script file to the server, and the server sends an original script file to the encryption and decryption issuing system according to a certain frequency. In practical applications, the frequency of sending the original script file to the encryption and decryption distribution system by the server may be set artificially, for example, 8 hours, 10 hours, and the like.
And S204, encrypting the original script file according to the original placeholders in the original script file and the encryption algorithm combinations corresponding to the original placeholders respectively to obtain the encrypted script file. In one embodiment, the original script file includes one or more original placeholders, and the encryption and decryption system encrypts the original script file according to an encryption algorithm corresponding to the placeholder in the received original script file. In practical application, the encryption and decryption publishing system replaces placeholders in an original script file with externally provided placeholders, can provide multiple groups of encryption algorithms and update the algorithms according to preset frequency, and can prevent client codes from being attacked when the preset algorithm updating time is longer than the cracking time of an attacker.
And step S206, feeding back the encrypted script file to the server. In practical application, the encrypted script file obtained after the original script file is encrypted is sent to the server.
In the script file encryption method provided by the embodiment of the present invention, it should be noted that the original script file includes one or more original placeholders, and the original placeholders correspond to encryption algorithms respectively. The encryption and decryption issuing system receives the original script file sent by the server, encrypts the original script file according to the original placeholder and the encryption algorithm in the original script file, and returns the encrypted script file to the server so as to perform subsequent processing. The embodiment of the invention can automatically update the algorithm and encrypt, thereby reducing the risk of code cracking and improving the security of the client script.
Based on the step S204, the present invention further provides an implementation method for encrypting the original script file to obtain an encrypted script file according to the original placeholders in the original script file and the encryption algorithm combinations corresponding to the original placeholders, including: determining encrypted placeholders corresponding to all original placeholders in the original script file respectively; wherein the encryption placeholders correspond to one or more combinations of encryption algorithms; for each original placeholder, replacing the original placeholder with an encrypted placeholder corresponding to the original placeholder; and encrypting the original script file by utilizing each encryption algorithm combination corresponding to each encryption placeholder to obtain an encrypted script file. In practical application, different placeholders correspond to different encryption algorithms, the encryption and decryption publishing system carries out encryption by replacing the original placeholder in the original script, wherein the encryption and decryption publishing system can externally provide the encryption placeholder, namely, the encryption placeholder is used for replacing the original placeholder, the encryption algorithm is also updated by replacing the placeholder, and accordingly the encrypted script file is obtained.
In one embodiment, the combination of encryption algorithms is updated at specified periods. In practical application, the specified update period is usually larger than the attack of an attacker for cracking the client script, so that the client can be prevented from being attacked, and the safety of the client script is improved.
For easy understanding, the present invention provides an application example of an updating method of a script text and an encryption method of a script text, and specifically, refer to an application schematic diagram of an updating method of a script text and an encryption method of a script text as shown in fig. 3. Firstly, a user accesses a system, and a browser requests a script file from a server; the server returns the processed original script (namely the original script file) to the browser and analyzes the original script in the browser, the original script subjected to analysis processing encrypts original data to be submitted, and the encrypted data are sent to the server. And then the server submits the encrypted data to the encryption and decryption publishing system, the encryption and decryption publishing system decrypts the encrypted data to obtain decrypted data and returns the decrypted data to the server, and the server receives the decrypted data and then performs the original business process.
In practical application, when the algorithm version is updated, each algorithm of the version changes, and meanwhile, the algorithm of the original version fails. When a developer writes a script, the developer can encrypt data by selecting a placeholder in an original script file. It should be noted that the server sends the original script file to the encryption and decryption publishing system at regular time, and the encryption and decryption publishing system updates the algorithm at regular intervals, and when receiving the script file, the encryption and decryption publishing system replaces the encryption placeholder in the script with the externally provided encryption algorithm, and returns the encrypted script file to the server. When the user needs to access, the server returns the returned script file to the user.
In summary, according to the script text updating method and the script text encryption method provided by the present invention, the server sends the original script file to the encryption and decryption publishing system at regular time, the encryption algorithm is automatically updated in the encryption and decryption publishing system, the encrypted script file is returned to the server, the data is encrypted at the client, and the encrypted script file is sent to the encryption and decryption publishing system through the server again, and finally returned to the server for the business process processing. By the method, the safety of the client script file can be improved, and the manual development cost is reduced.
Based on the feature derivation method of the time series data provided by the foregoing embodiment, the present invention provides an updating apparatus for script text, referring to a schematic structural diagram of an updating apparatus for script text shown in fig. 4, where the apparatus at least includes the following parts:
the script encryption module 402 is configured to send the original script file to the encryption and decryption publishing system, so that the encryption and decryption publishing system encrypts the original script file according to the encryption algorithm combination corresponding to each original placeholder and each original placeholder in the original script file, so as to obtain an encrypted script file.
And the encryption script receiving module 404 is configured to receive an encryption script file fed back by the encryption and decryption publishing system.
And the script updating module 406 is configured to feed back the encrypted script file to the client if a script file request sent by the client is received, so that the client performs script updating by using the encrypted script file.
According to the updating device of the script text, the client sends the request script file to the server according to the user request, and the server returns the encrypted script file to the client according to the user request, so that the client updates the script file by using the encrypted script file. The encryption script file is obtained by sending an original script file to an encryption and decryption publishing system through a server, and encrypting the original script file by the encryption and decryption publishing system according to an original placeholder and an encryption algorithm. The embodiment of the invention can automatically update the algorithm and encrypt, reduces the risk of code cracking and improves the development efficiency.
In one embodiment, encrypted data sent by a client is received; the encrypted data is obtained by encrypting original data by using an encryption script file by a client; sending the encrypted data to an encryption and decryption issuing system so as to decrypt the encrypted data through the encryption and decryption issuing system to obtain original data; and receiving the original data fed back by the encryption and decryption issuing system, and executing service logic processing according to the original data.
In one embodiment, the script encrypting module 402 is further configured to send the original script file to the encryption/decryption issuing system according to a preset frequency.
The embodiment of the present invention provides an apparatus for encrypting a script text, referring to fig. 5, which is a schematic structural diagram of an apparatus for encrypting a script text, and the apparatus at least includes the following components:
an original script receiving module 502, configured to receive an original script file sent by a server.
And the encryption module 504 is configured to encrypt the original script file according to the original placeholders in the original script file and the encryption algorithm combinations corresponding to the original placeholders, respectively, to obtain an encrypted script file.
And a feedback module 506, configured to feed back the encrypted script file to the server.
In one embodiment, the encryption module 504 is further configured to: determining an encryption placeholder corresponding to each original placeholder in the original script file; wherein the encryption placeholders correspond to one or more combinations of encryption algorithms; for each original placeholder, replacing the original placeholder with an encrypted placeholder corresponding to the original placeholder; and encrypting the original script file by utilizing each encryption algorithm combination corresponding to each encryption placeholder to obtain an encrypted script file.
In one embodiment, the combination of encryption algorithms is updated at a specified period.
The device provided by the embodiment has the same implementation principle and technical effect as the foregoing embodiment, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiment for the portion of the embodiment of the device that is not mentioned.
The embodiment of the invention provides electronic equipment, which particularly comprises a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, performs the method of any of the above described embodiments.
Fig. 6 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present invention, where the electronic device 100 includes: a processor 60, a memory 61, a bus 62 and a communication interface 63, wherein the processor 60, the communication interface 63 and the memory 61 are connected through the bus 62; the processor 60 is arranged to execute executable modules, such as computer programs, stored in the memory 61.
The Memory 61 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 63 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
The bus 62 may be an ISA bus, a PCI bus, an EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 6, but this does not indicate only one bus or one type of bus.
The memory 61 is used for storing a program, the processor 60 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 60, or implemented by the processor 60.
The processor 60 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by instructions in the form of hardware integrated logic circuits or software in the processor 60. The Processor 60 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 61, and the processor 60 reads the information in the memory 61 and, in combination with its hardware, performs the steps of the above method.
The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the foregoing method embodiment, which is not described herein again.
The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. The method for updating script text is applied to a server, the server is respectively in communication connection with a client and an encryption and decryption issuing system, the server stores an original script file, the original script file comprises one or more original placeholders, and the encryption and decryption issuing system stores a plurality of encryption algorithm combinations, and comprises the following steps:
sending the original script file to the encryption and decryption publishing system, so that the encryption and decryption publishing system encrypts the original script file according to the encryption algorithm combination corresponding to each original placeholder and each original placeholder in the original script file to obtain an encrypted script file;
receiving the encrypted script file fed back by the encryption and decryption issuing system;
if a script file request sent by the client is received, feeding back the encrypted script file to the client so that the client can update the script by using the encrypted script file;
the step of encrypting the original script file to obtain an encrypted script file by the encryption and decryption issuing system according to the combination of the encryption algorithms corresponding to each original placeholder and each original placeholder in the original script file respectively includes:
determining, by the encryption and decryption publishing system, an encryption placeholder corresponding to each original placeholder in the original script file; wherein the encryption placeholders correspond to one or more combinations of the encryption algorithms;
replacing, by the encryption and decryption publishing system, each original placeholder with an encrypted placeholder corresponding to the original placeholder;
and encrypting the original script file by the encryption and decryption issuing system by using each encryption algorithm combination corresponding to each encryption placeholder to obtain an encrypted script file.
2. The method of claim 1, further comprising:
receiving encrypted data sent by the client; the client side encrypts original data by using the encryption script file to obtain the encrypted data;
sending the encrypted data to the encryption and decryption issuing system so as to decrypt the encrypted data through the encryption and decryption issuing system to obtain the original data;
and receiving the original data fed back by the encryption and decryption issuing system, and executing service logic processing according to the original data.
3. The method according to claim 1, wherein the step of sending the original script file to the encryption/decryption issuing system further comprises:
and sending the original script file to the encryption and decryption publishing system according to a preset frequency.
4. A method for encrypting script text, wherein the method is applied to an encryption/decryption distribution system, wherein the encryption/decryption distribution system is communicatively connected to a server, wherein the server stores an original script file, wherein the original script file comprises one or more original placeholders, wherein the encryption/decryption distribution system stores a plurality of combinations of encryption algorithms, and wherein the method comprises:
receiving an original script file sent by the server;
according to the original placeholders in the original script file and the encryption algorithm combinations corresponding to the original placeholders, encrypting the original script file to obtain an encrypted script file;
feeding back the encrypted script file to the server;
the step of encrypting the original script file according to the combination of the encryption algorithms corresponding to each original placeholder and each original placeholder in the original script file to obtain an encrypted script file includes:
determining an encrypted placeholder corresponding to each original placeholder in the original script file; wherein the encryption placeholders correspond to one or more combinations of the encryption algorithms;
for each original placeholder, replacing the original placeholder with an encrypted placeholder corresponding to the original placeholder;
and encrypting the original script file by utilizing each encryption algorithm combination corresponding to each encryption placeholder to obtain an encrypted script file.
5. The method of claim 4, further comprising:
and updating the encryption algorithm combination according to a specified period.
6. An updating device for script text, wherein the device is applied to a server, the server is respectively connected with a client and an encryption and decryption publishing system in communication, the server stores an original script file, the original script file comprises one or more original placeholders, and the encryption and decryption publishing system stores a plurality of encryption algorithm combinations, and the device comprises:
the script encryption module is used for sending the original script file to the encryption and decryption publishing system so as to encrypt the original script file through the encryption and decryption publishing system according to the encryption algorithm combination corresponding to each original placeholder and each original placeholder in the original script file to obtain an encrypted script file;
the encryption script receiving module is used for receiving the encryption script file fed back by the encryption and decryption issuing system;
the script updating module is used for feeding back the encrypted script file to the client side so as to enable the client side to update the script by using the encrypted script file if receiving a script file request sent by the client side;
a script encryption module further to:
determining, by the encryption and decryption publishing system, an encrypted placeholder corresponding to each original placeholder in the original script file; wherein the encryption placeholders correspond to one or more combinations of the encryption algorithms;
replacing, by the encryption and decryption publishing system, each original placeholder with an encrypted placeholder corresponding to the original placeholder;
and encrypting the original script file by the encryption and decryption issuing system by using each encryption algorithm combination corresponding to each encryption placeholder to obtain an encrypted script file.
7. An apparatus for encrypting script text, wherein the apparatus is applied to an encryption/decryption distribution system, wherein the encryption/decryption distribution system is communicatively connected to a server, wherein the server stores an original script file, wherein the original script file comprises one or more original placeholders, wherein the encryption/decryption distribution system stores a plurality of combinations of encryption algorithms, and wherein the apparatus comprises:
the original script receiving module is used for receiving an original script file sent by the server;
the encryption module is used for encrypting the original script file according to the encryption algorithm combination corresponding to each original placeholder and each original placeholder in the original script file to obtain an encrypted script file;
the feedback module is used for feeding back the encrypted script file to the server;
the encryption module is further configured to:
determining an encrypted placeholder corresponding to each original placeholder in the original script file; wherein the encryption placeholders correspond to one or more combinations of the encryption algorithms;
for each original placeholder, replacing the original placeholder with an encrypted placeholder corresponding to the original placeholder;
and encrypting the original script file by utilizing each encryption algorithm combination corresponding to each encryption placeholder to obtain an encrypted script file.
8. An electronic device comprising a memory and a processor; the memory has stored therein a computer program operable on the processor, which when executed, performs the steps of the method of any of the preceding claims 1 to 5.
9. A computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of any of claims 1 to 5.
CN202110416632.6A 2021-04-16 2021-04-16 Script text updating method, script text encryption method and device Active CN113076550B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110416632.6A CN113076550B (en) 2021-04-16 2021-04-16 Script text updating method, script text encryption method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110416632.6A CN113076550B (en) 2021-04-16 2021-04-16 Script text updating method, script text encryption method and device

Publications (2)

Publication Number Publication Date
CN113076550A CN113076550A (en) 2021-07-06
CN113076550B true CN113076550B (en) 2022-10-18

Family

ID=76617986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110416632.6A Active CN113076550B (en) 2021-04-16 2021-04-16 Script text updating method, script text encryption method and device

Country Status (1)

Country Link
CN (1) CN113076550B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635622B (en) * 2008-07-24 2013-06-12 阿里巴巴集团控股有限公司 Method, system and equipment for encrypting and decrypting web page
US8620879B2 (en) * 2009-10-13 2013-12-31 Google Inc. Cloud based file storage service
CN103634366A (en) * 2012-08-27 2014-03-12 北京千橡网景科技发展有限公司 Method and device for identifying network robot
EP3731458A1 (en) * 2014-01-24 2020-10-28 McAfee, LLC Automatic placeholder finder-filler
CN107493278B (en) * 2017-08-10 2020-09-08 杭州迪普科技股份有限公司 Access method and device for bidirectional encrypted webshell
CN108365957B (en) * 2018-02-22 2020-11-27 北京顶象技术有限公司 Encryption updating method and device
CN108540495A (en) * 2018-05-08 2018-09-14 北京顶象技术有限公司 Encryption and decryption method and device
CN111488558B (en) * 2020-04-08 2022-07-22 腾讯科技(深圳)有限公司 Script protection method and device, computer readable storage medium and computer equipment

Also Published As

Publication number Publication date
CN113076550A (en) 2021-07-06

Similar Documents

Publication Publication Date Title
CN107426173B (en) File protection method and device
CN111669402B (en) Encrypted communication method, device, equipment and storage medium
WO2015058631A1 (en) Method, server and system for malicious url identification
CN110912920A (en) Data processing method, apparatus and medium
CN108431819B (en) Method and system for protecting client access to service of DRM agent of video player
CN111970109B (en) Data transmission method and system
CN112214519B (en) Data query method, device, equipment and readable medium
CN110516471B (en) Product promotion method based on information security and related equipment
CN111404892B (en) Data supervision method and device and server
CN112199622A (en) Page jump method, system and storage medium
WO2017006118A1 (en) Secure distributed encryption system and method
CN104917748A (en) Method and device for performing conversion and processing on password information
CN107181801B (en) Electronic accessory storage method and terminal
CN108846671B (en) Online secure transaction method and system based on block chain
CN113076550B (en) Script text updating method, script text encryption method and device
CN113868704A (en) Signature verification method and system for file data content
CN111984989B (en) Method, device, system and medium for self-checking publishing and accessing URL
CN110532290B (en) Information verification device, method and storage medium based on block chain
CN113765968A (en) File transmission method, device and system
CN112434231B (en) Data processing method and device and electronic equipment
CN110020040B (en) Method, device and system for querying data
CN102262717B (en) Method, device and equipment for changing original installation information and detecting installation information
CN115080147A (en) H5 page loading method, device, equipment and medium based on artificial intelligence
CN109657481B (en) Data management method and device
CN110611674B (en) Protocol interaction method, system and storage medium between different computer systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Room 601, Building 4, No. 165 Wuchang Avenue, Wuchang Street, Yuhang District, Hangzhou City, Zhejiang Province, 311100

Patentee after: Hangzhou Dingxiang Technology Co.,Ltd.

Address before: Room 603b, building 19, No. 998, Wenyi West Road, Wuchang Street, Yuhang District, Hangzhou City, Zhejiang Province

Patentee before: Top Elephant Technology Co.,Ltd.

CP03 Change of name, title or address