Specific embodiment
In order to make those skilled in the art more fully understand the technical solution in this specification one or more, below will
In conjunction with the attached drawing in this specification one or more embodiment, to the technical solution in this specification one or more embodiment into
Row clearly and completely describes, it is clear that and described embodiment is only this specification one or more a part of the embodiment, and
The embodiment being not all of.Based on the embodiment in this specification one or more, those of ordinary skill in the art are not making
The model of this specification one or more protection all should belong in every other embodiment obtained under the premise of creative work out
It encloses.
This specification one or more embodiment provides a kind of front end page providing method and device, can reduce exposure
The readability of code to user for rendering front end page, and within a preset period of time same client for before a certain
The multiple access request in end page face, the target obfuscated codes returned to the client can be different, further increase illegal person
The difficulty for cracking the code for rendering front end page avoids the occurrence of illegal person and carries out to the code for rendering front end page
Malicious attack and the case where play one's own game, achieve the purpose that improve the safety that front end page is executed in front end.
Fig. 1 is that the front end page that this specification one or more embodiment provides provides systematic difference schematic diagram of a scenario,
As shown in Figure 1, the system includes: multiple client, service server and Code obfuscation device, wherein the Code obfuscation device
It can be set in the service server or be set to obscuring in server different from the service server, which can
To be the mobile terminals such as smart phone, tablet computer, it can also be the fixed terminals such as desktop computer, wherein rendering obtains front end
The detailed process of the page are as follows:
Firstly, client sends the access request for being directed to front end page to service server, service server is being received
After the access request, the target obfuscated codes of front end page corresponding with the access request are obtained, wherein the target obfuscated codes
It can be using the determination of real-time code obfuscated manner, be also possible to using the determination of non real-time Code obfuscation mode;
Specifically, as shown in Figure 2 a, the case where determining target obfuscated codes for real-time code obfuscated manner, business service
Device obtains the source code of corresponding with access request front end page after receiving the access request, and by the original generation
Code is sent to Code obfuscation device, and it is mixed that Code obfuscation device carries out dynamic after receiving the source code, to the source code
Confuse to obtain the target obfuscated codes of the front end page of client request access, and the target obfuscated codes are sent to business service
Device, wherein Code obfuscation device is randomly generated for the target obfuscated codes that same source code is obscured, therefore,
The target obfuscated codes returned within a preset period of time for same client for the multiple access request of a certain front end page can
With difference, service server receives the target obfuscated codes;
As shown in Figure 2 b, the case where determining target obfuscated codes for non real-time Code obfuscation mode, service server is pre-
The source code of front end page is first obtained, and the source code is sent to Code obfuscation device, Code obfuscation device is receiving
To after the source code, which is carried out dynamic obfuscation it is corresponding to obtain the front end page including the alternative of preset quantity
This for example, including N number of alternative obfuscated codes in the obfuscated codes set, and is obscured generation by the obfuscated codes set of obfuscated codes
Code collection conjunction is sent to service server, wherein and it is different between multiple alternative obfuscated codes in obfuscated codes set, therefore,
The target obfuscated codes returned within a preset period of time for same client for the multiple access request of a certain front end page can
With difference, service server chooses one after receiving the access request for the front-end code in obfuscated codes set
Alternative obfuscated codes are as target obfuscated codes, for example, choosing alternative obfuscated codes m as target obfuscated codes, wherein scheming
In 2b, dotted line indicates the movement executed before client sends access request;
Then, after service server gets the target obfuscated codes of the front end page of client request access, by the mesh
Mark obfuscated codes are sent to corresponding client;
Finally, client after receiving the target obfuscated codes of front end page, is rendered based on the target obfuscated codes
To corresponding front end page, so as to reduce the readability for the code for rendering front end page for being exposed to user, and
Same client is directed to the multiple access request of a certain front end page, and the target obfuscated codes returned to the client can not
Together, the difficulty for further increasing the code that illegal person is cracked for rendering front end page avoids the occurrence of illegal person to being used for
The case where code of rendering front end page carries out malicious attack and plays one's own game reaches and improves the peace that front end page is executed in front end
The purpose of full property.
Fig. 3 is the first process signal for the front end page providing method that this specification one or more embodiment provides
Figure, the web system high applied to security requirement or the web system high applied to front-end code susceptibility, such as Fig. 3 institute
Show, this method at least includes the following steps:
S301, service server obtain the access request that client is directed to front end page, wherein the access request carries
The mark for the front end page that client identification and user request access to, for example, when client detects that user requests access to pumping
When encouraging the page, the access request for carrying the mark of client identification and the prize drawing page is generated, and the access request is sent out
Service server is given, for another example, when client detects that user requests access to the authentication page, generation carries client
The access request of mark and the mark of the authentication page, and the access request is sent to service server;
S302, service server respond the access request got, obtain front end page corresponding with the access request
Target obfuscated codes, wherein the target obfuscated codes are the generations carried out after dynamic obfuscation based on the source code to front end page
What code determined, and a certain client is directed to specified quantity in the multiple access request of same front end page within a preset period of time
The corresponding target obfuscated codes of access request are different, which is greater than default minimum threshold and is less than or equal to multiple
The quantity of access request;
Wherein, minimum threshold is preset to be directed in the corresponding multiple target obfuscated codes of multiple access request at least for limiting
Have the obfuscated codes that default minimum threshold is different, for example, default minimum threshold is n, at this point within a preset period of time certain
M access request of one client, it is mixed at least n different targets in M target obfuscated codes of client return
Confuse code;
Preferably, which is equal to the quantity of the multiple access request, at this time same client within a preset period of time
End is different for the corresponding target obfuscated codes of multiple access request of a certain front end page, i.e., in preset time period
It is interior that for access request each time, the target obfuscated codes returned for client are different, for example, within a preset period of time certain
One client is M for the quantity of the multiple access request of same front end page, and specified quantity is also M, is at this time the client
The M of return different target obfuscated codes, but the main business logic of M different target obfuscated codes with obscure before
The main business logic of source code is identical;
Source code progress dynamic obfuscation is obtained by Code obfuscation device in real time specifically, target obfuscated codes can be
, and the target obfuscated codes are sent to service server by Code obfuscation device, target obfuscated codes can also be business
Server receives in advance carries out the obtained multiple alternative obfuscated codes of dynamic obfuscation to source code by Code obfuscation device, then
Selection obtains in the multiple alternative obfuscated codes obtained in advance;
S303, the target obfuscated codes that service server will acquire are sent to client, so that client is based on the mesh
Mark obfuscated codes render to obtain front end page, wherein implementing result and client request of the target obfuscated codes in front end are visited
Implementing result of the source code for the front end page asked in front end is consistent.
Specifically, multiple access requests that same client is directed to a certain front end page within a preset period of time return to this
The target obfuscated codes of client can be different, wherein a user terminal with unique identification may be considered same
Client, multiple user terminals with same alike result information are also believed to same client, for example, same client can
To be multiple user terminals in same geographic area, it can also be multiple user terminals positioned at same local area network, it is right
It answers, above-mentioned client identification includes: geographical area information where the unique identification of user terminal, user terminal, user's end
LAN Information etc. where end, service server according to client identification and can preset same client division rule, judge
Current request access front end page client with have requested that within a preset period of time access the front end page client whether
For same client, accordingly even when illegal person cracks last target obfuscated codes, but due to this
The target obfuscated codes of return change again, and illegal person needs to crack again again, however, the target returned obscures generation next time
Code changes again, it follows that illegal person gets target obfuscated codes and cracks to the target obfuscated codes, and is not suitable for
In the target obfuscated codes returned next time, so that it is invalid that illegal person cracks result all every time, and then can be kept away
Exempt from the purposive realization logic in front-end code of illegal person to modify, meanwhile, obscure to source code
When processing, the main business logical AND source code of the every part of obfuscated codes guaranteed is consistent, so that at client
The corresponding editing machine of browser can automatically identify the main business logic of obfuscated codes, to accurately execute the main business
Logic, it is ensured that the front end page of user's request is normally shown in client.
In this specification one or more embodiment, for the access request of the front end page from client, obtain
The target obfuscated codes that dynamic obfuscation obtains are carried out based on the source code to the front end page, which is sent
To corresponding client, so that client renders to obtain its front end page for needing to access based on the target obfuscated codes, in this way
It can reduce the readability for being exposed to the code for rendering front end page of user, and same client within a preset period of time
End is directed to the multiple access request of a certain front end page, and the target obfuscated codes returned to the client can be different, further
Increase the difficulty that illegal person cracks the code for rendering front end page, avoids the occurrence of illegal person to for rendering preceding end page
The case where code in face carries out malicious attack and plays one's own game reaches the mesh for improving the safety that front end page is executed in front end
's.
Wherein, for determine front end page target obfuscated codes process, can in such a way that real-time code is obscured,
It can also be based on this by the way of non real-time Code obfuscation, above-mentioned S302 service server responds the access request got,
The target obfuscated codes for obtaining front end page corresponding with the access request, specifically include:
(1) for using real-time code obfuscated manner the case where, service server is after receiving access request, to code
Obfuscator sends obfuscated codes acquisition request, and receives the target obfuscated codes of Code obfuscation device transmission, wherein this is obscured
Code obtaining request carries the corresponding source code of access request, which is Code obfuscation device to preceding end page
The source code in face carries out what dynamic obfuscation was handled;
(2) for using non real-time Code obfuscation mode the case where, can alternatively be obscured generation by service server from multiple
A target obfuscated codes are chosen in code, specifically, service server is after receiving access request, from the access request pair
In the alternative obfuscated codes for the front end page answered, target obfuscated codes of the alternative obfuscated codes as front end page are chosen,
Wherein, which obtained after Code obfuscation device carries out dynamic obfuscation processing to the source code of front end page in advance
It arrives;
(3) for using non real-time Code obfuscation mode the case where, can also alternatively be mixed by Code obfuscation device from multiple
Confuse and choose a target obfuscated codes in code, i.e., in response to access request, receives the target that Code obfuscation device is sent and obscure
Code, wherein the target obfuscated codes are that Code obfuscation device chooses one alternatively from the alternative obfuscated codes of front end page
Obfuscated codes, the alternative obfuscated codes of front end page are that Code obfuscation device carries out dynamic to the source code of front end page in advance
It is obtained after obscuring processing, specifically, service server obscures generation after receiving access request, to the transmission of Code obfuscation device
Code acquisition request, Code obfuscation device choose one from the alternative obfuscated codes of front end page corresponding with the acquisition request
Alternative target obfuscated codes of the obfuscated codes as front end page, and the target obfuscated codes are sent to service server.
Wherein it is possible to select according to the actual situation using real-time code obfuscated manner or non real-time Code obfuscation side
Formula, for example, in the case that the access request concurrency for being directed to service server is bigger, i.e., when the access request of service server
Concurrency when meeting preset condition, it is preferable that use non real-time Code obfuscation mode, service server pair can be improved in this way
The response efficiency of access request.
Wherein, real-time code obfuscated manner no matter is used, or uses non real-time Code obfuscation mode, it is mixed to be required to code
The device that confuses carries out dynamic obfuscation processing to the source code of front end page, above-mentioned right for the dynamic obfuscation process of source code
The source code of front end page carries out dynamic obfuscation processing, specifically includes:
Step 1, Code obfuscation device obtains the source code for the front end page that service server is sent, and determines the original
The Code obfuscation element of beginning code;
Step 2, Code obfuscation device carry out at dynamic obfuscation source code according to the Code obfuscation element determined
Reason.
Specifically, the case where for using real-time code obfuscated manner, the dynamic obfuscation process of source code is to obtain
Client is for execution after the access request of front end page, as shown in figure 4, showing in client corresponding with access request
The process of front end page, specifically:
S401, client send the access request for being directed to front end page to service server;
S402, service server obtain corresponding with the access request after the access request for receiving client transmission
The source code of front end page, wherein the source code can be the code write based on javascript language;
S403, service server send the source code got to Code obfuscation device;
S404, Code obfuscation device determine the Code obfuscation element of the source code after receiving source code,
In, the quantity of the Code obfuscation element determined is one, the Code obfuscation element with for the first of front end page determination
Code obfuscation element it is different;
S405, Code obfuscation device carry out dynamic obfuscation processing according to the Code obfuscation element determined, to source code,
Obtain the target obfuscated codes of front end page;
S406, the target obfuscated codes that Code obfuscation device is sent to service server;
S407, service server are sent to corresponding visitor after receiving target obfuscated codes, by the target obfuscated codes
Family end;
S408 after client receives the target obfuscated codes of front end page, renders to obtain based on the target obfuscated codes
Front end page simultaneously shows the front end page.
Specifically, the case where for using non real-time Code obfuscation mode, the dynamic obfuscation process of source code is to obtain
Take client for execution before the access request of front end page, as shown in figure 5, showing in client corresponding with access request
Front end page process, specifically:
S501, service server send the source code for being directed to front end page to Code obfuscation device;
S502, Code obfuscation device determine the Code obfuscation element of the source code after receiving source code,
In, the quantity of the Code obfuscation element determined be it is multiple, each Code obfuscation element is different;
S503, Code obfuscation device carry out dynamic obfuscation processing according to the Code obfuscation element determined, to source code,
Obtaining multiple alternative obfuscated codes of front end page, wherein the corresponding Code obfuscation element of each alternative obfuscated codes is different,
Therefore, the multiple alternative obfuscated codes obtained are different;
S504, what Code obfuscation device was sent to service server alternatively obscures generation for the multiple of front end page
Code;
S505, client send the access request for being directed to front end page to service server;
S506, service server is after the access request for receiving client transmission, before corresponding with the access request
In multiple alternative obfuscated codes in end page face, target obfuscated codes of the alternative obfuscated codes as front end page are chosen;
S507, service server send the target obfuscated codes selected to corresponding client;
S508 after client receives the target obfuscated codes of front end page, renders to obtain based on the target obfuscated codes
Front end page simultaneously shows the front end page.
Wherein, above-mentioned for determining that the Code obfuscation element of the obfuscated codes of front end page comprises at least one of the following:
(1) insertion position of the target redundancy code and the target redundancy code that are inserted into, wherein each Code obfuscation
The quantity for the target redundancy code for including in element can be determined according to default insertion rule, for example, default insertion rule instruction
The accounting relationship of main business code in the redundant code for needing to be inserted into and source code is for another example preset insertion rule instruction and is needed
The maximum quantity and/or minimum number of the redundant code of insertion;
(2) position after the adjustment of target object and the target object to be adjusted in source code, wherein the target pair
As can be function declaration, it can also be variable declarations;
(3) target character to be compressed in source code, wherein the target character can be space, can also be line feed
Etc.;
(4) in source code after the change of the object element renamed and the object element title, wherein the target element
Element can be name variable, can also be function name.
Specifically, the case where for insertion redundant code, can be pre-created redundant code library, redundant code library Zhong Bao
Containing the multiple redundant codes generated according to preset rules, which, which can be, can normally execute and not influence source code
The dead code of implementing result, the main business code for not needing to execute after being also possible to encapsulation, which is original
Pre-set code section in code, after needing to be packaged the main business code at this time, then by after encapsulation main business code make
It is target redundancy code insertion into source code, marks the main business code not need to hold for example, the mode of encapsulation can be
Row;
Wherein, if target redundancy code is the main business code after encapsulation, in client executing target obfuscated codes,
After being preparatory encapsulation due to the main business code, guarantee on the implementing result of the main business code in source code without influence,
For example, using the main business code of the instruction " transferring camera " after encapsulation as in target redundancy code insertion source code, this
When target obfuscated codes in the main business codes comprising two sections of instructions " transferring camera ", one of instruction " transferring camera "
Main business code be packaged, skip in going to the packed main business code and do not execute automatically, in this way
In the case where guaranteeing does not influence source code implementing result, it is with being performed main business which section is illegal person, which can not distinguish,
Code, to play the purpose of fascination illegal person.
Specifically, the case where for code position adjustment, need to advance with the syntactic analysis tool of open source, determine adjustment
Position does not influence the target object of source code implementing result, wherein successively holds if do not had between two sections of main business codes
Capable dependence, then using the main business code as the target object for carrying out position adjustment, for example, the letter under the same domain
Number statement is not carried out sequence and limits, should by the objective function statement under a certain domain as the target object for carrying out position adjustment
Any position under domain where position can be it after the adjustment of objective function statement.
In the specific implementation, it is contemplated that if only carrying out compression processing or target element to target character in source code
Element, which rename, processing or carries out compression processing to target character in source code and object element rename the knot of processing
It closes to reduce the readability for the front-end code for feeding back to client, the basic code of front-end code constitutes frame and is to maintain not at this time
Become, illegal person is smaller to the identification difficulty of the realization logic of front-end code, causes to be easy there are front-end code illegal
The risk that molecule is cracked and attacked, and the front-end code variation that code compaction and title change every time is smaller, in this way
Illegal person cracks once front-end code, the subsequent realization logic that can rapidly identify the front-end code, therefore, excellent
Character compression, title change, redundant code insertion, target object position are adjusted while being used as Code obfuscation element by selection of land, are increased
The difference of the front-end code (i.e. target obfuscated codes) of client is returned to for the multiple access request of same front end page greatly
Property, and then improve illegal person and difficulty is cracked to the code of front end page.
Specifically, if Code obfuscation element includes: the target redundancy code being inserted into and the target redundancy code
Insertion position;Corresponding, above-mentioned steps two carry out at dynamic obfuscation source code according to the Code obfuscation element determined
Reason, specifically includes:
In the redundant code library being pre-created, the target redundancy code that the Code obfuscation element determined includes is chosen,
Wherein, it may include the mark of target redundancy code in Code obfuscation element, therefore, carried out at dynamic obfuscation to source code
When reason, in the redundant code library being pre-created, based on the mark of target redundancy code, the target redundancy generation being inserted into is searched
Code, for example, the target redundancy code can be the main business after useless variable declarations, useless mathematical operation code, encapsulation
Code, i.e., on redundant code of the main business logic without influence in source code;
In the source code of front end page, in target redundancy generation, is added according to the insertion position of each target redundancy code
Code, for example, target redundancy code includes a, b, c, d, the multistage main business code in source code includes A, B, C, D, is inserted into superfluous
Source code after remaining code can be A;a;B;b;c;C;d;D can also be b;A;a;c;B;d;d;C;a;D, etc..
Specifically, if Code obfuscation element includes: target object and the target object to be adjusted in source code
Adjustment after position;Corresponding, above-mentioned steps two carry out dynamic obfuscation according to the Code obfuscation element determined, to source code
Processing, specifically includes:
In the source code of front end page, the target object that the Code obfuscation element determined includes is searched, wherein generation
Code obscures the mark that may include target object in element, therefore, when carrying out dynamic obfuscation processing to source code, original
In code, the mark based on target object searches the target object of position to be adjusted, for example, the target object can be function
Statement, variable declarations, i.e. main business code behind adjustment position on main business logic in source code without influence;
According to after adjustment position change target object position, specifically, by target object be moved to adjustment after position,
Wherein, implementing result of the target object positioned at call by location source code after change and the call by location original generation after change
The implementing result of code is consistent.
For example, the source code structure before the adjustment of position are as follows:
function A(){}
Var B='123';
Var C='456';
It is corresponding, position source code structure adjusted are as follows:
Var B='123';
Var C='456';
function A(){}
Specifically, if Code obfuscation element includes: target character to be compressed in source code;It is corresponding, above-mentioned step
Rapid two carry out dynamic obfuscation processing according to the Code obfuscation element determined, to source code, specifically include:
In the source code of front end page, the target character that the Code obfuscation element determined includes is searched, wherein generation
Code obscures the mark that may include target character in element, therefore, when carrying out dynamic obfuscation processing to source code, original
In code, the mark based on target character searches target character to be deleted, for example, the target character can be space character,
Line feed character;
The target character found is deleted, i.e., compression processing is carried out to source code.
Specifically, if Code obfuscation element includes: object element and the object element to be renamed in source code
Change after title;Corresponding, above-mentioned steps two carry out dynamic obfuscation according to the Code obfuscation element determined, to source code
Processing, specifically includes:
In the source code of front end page, the object element that the Code obfuscation element determined includes is searched, wherein generation
Code obscures the mark that may include object element in element, therefore, when carrying out dynamic obfuscation processing to source code, original
In code, the mark based on object element searches object element to be renamed, for example, the object element can be function name,
Name variable;
According to the title of the name modifications object element after the corresponding change of each object element, i.e., by function name or variable
Title is named in the way of non-semanticization.
For example, the intention and logic of code are understood for the ease of developer, the main business in source code before the change of title
Business code are as follows:
Hello by var hello=" ";
The world var world=" ";
It is corresponding, the main business code in obfuscated codes after the change of title are as follows:
Hello by var a=" ";
The world var b=" ";
Further, if target obfuscated codes are chosen from alternative obfuscated codes, i.e., mixed using non real-time code
Mode of confusing determines target obfuscated codes;At this point, the quantity for the Code obfuscation element determined is multiple, and each Code obfuscation element
It is different, it is thus necessary to determine that the variant quantity of source code, that is, determine the quantity of Code obfuscation element, it is corresponding, it is above-mentioned
Step 1 determines the Code obfuscation element of source code, specifically includes:
It determines the variant quantity of source code, and determines the different Code obfuscation element of variant quantity, specifically
, each alternative obfuscated codes are to be obscured based on a Code obfuscation element source code.
Wherein, in order to guarantee that the obfuscated codes returned every time to client can be different, it is ensured that pre-generated is multiple standby
The demand for the obfuscated codes distribution for selecting obfuscated codes to can satisfy within a preset period of time, is based on this, above-mentioned determining source code
Variant quantity, specifically include:
Determine the target access number for being directed to front end page within a preset period of time, wherein in order to guarantee in preset time
For same client to the access request of a certain front end page in section, each not phase of the target obfuscated codes returned to the client
Together, which can be the average target access times of each client, which can also be pre-
The unauthorized access the estimated and number for obtaining front-end code, the preset time period can be the adjacent code twice of Code obfuscation device
The time interval obscured, for being required to each time from access request of the same client to a certain front end page to client
The target obfuscated codes of the front end page are fed back, therefore, it is necessary to the quantity of obtained alternative obfuscated codes and client pair
The target access number of front end page is directly related;
According to target access number is determined, the variant quantity of the source code of front end page is determined, wherein the variant number
Amount is not less than target access number, wherein since same client is to the target access number and preset time period of front end page
The quantity of alternative obfuscated codes needed for interior is directly related, therefore, the variant quantity of source code is determined based on target access number,
The quantity of Code obfuscation element is determined based on variant quantity again, and then obtains the alternative obfuscated codes of variant quantity;In addition, having
It, can also be according to preset quantity and predeterminated frequency, to original generation for using non real-time Code obfuscation mode when body is implemented
Code carries out dynamic obfuscation processing, obtains the alternative obfuscated codes of preset quantity.
Front end page providing method in this specification one or more embodiment, for the preceding end page from client
The access request in face obtains and carries out the target obfuscated codes that dynamic obfuscation obtains based on the source code to the front end page, will
The target obfuscated codes are sent to corresponding client, render to obtain it and need to visit so that client is based on the target obfuscated codes
The front end page asked can reduce the readability for being exposed to the code for rendering front end page of user in this way, and pre-
If same client is directed to the multiple access request of a certain front end page in the period, the target returned to the client obscures generation
Code can be different, further increase the difficulty for the code that illegal person is cracked for rendering front end page, avoid the occurrence of illegal point
The case where son carries out malicious attack to the code for rendering front end page and plays one's own game reaches and improves front end page in front end
The purpose of the safety of execution.
The front end page providing method that corresponding above-mentioned Fig. 2 to Fig. 5 is described, based on the same technical idea, this specification one
A or multiple embodiments additionally provide a kind of front end page providing method, and Fig. 6 provides for this specification one or more embodiment
Front end page providing method flow diagram, as shown in fig. 6, this method at least includes the following steps:
S601, service server obtain the access request for the front end page that client is directed to for subscriber authentication,
In, which is subscriber authentication request, for example, subscriber authentication can be face verification, corresponding, Yong Hushen
Part checking request can be brush face checking request;
S602, service server respond the access request got, obtain front end page corresponding with the access request
Target obfuscated codes, wherein the target obfuscated codes are the generations carried out after dynamic obfuscation based on the source code to front end page
What code determined, for the corresponding target obfuscated codes of access request of specified quantity in the multiple access request of same front end page
It is different;
S603, the target obfuscated codes that service server will acquire are sent to client, so that client is based on the mesh
Mark obfuscated codes render to obtain the front end page for subscriber authentication, wherein execution of the target obfuscated codes in front end
As a result the implementing result with the source code of the front end page of client request access in front end is consistent.
Wherein, it is logged in for than more sensitive business scenario, such as brush face, client is related to comprising main business logic
The implementation procedure of front-end code becomes thus, it is possible to which there are illegal persons by cracking front-end code, and then to front-end code
More and the risk attacked, achieve the purpose that skip crucial check logic or replacement facial image, so that face verification fails, because
This, increases illegal person and cracks difficulty to front-end code.
In this specification one or more embodiment, for the access request of the front end page from client, obtain
The target obfuscated codes that dynamic obfuscation obtains are carried out based on the source code to the front end page, which is sent
To corresponding client, so that client renders to obtain its front end page for needing to access based on the target obfuscated codes, in this way
It can reduce the readability for being exposed to the code for rendering front end page of user, and same client within a preset period of time
End is directed to the multiple access request of a certain front end page, and the target obfuscated codes returned to client can be different, further increases
The difficulty for the code for adding illegal person to crack for rendering front end page avoids the occurrence of illegal person to for rendering front end page
Code carry out malicious attack the case where play one's own game, achieve the purpose that improve the safety that front end page is executed in front end.
Wherein, for determine front end page target obfuscated codes process, can in such a way that real-time code is obscured,
It can also be based on this by the way of non real-time Code obfuscation, above-mentioned S602 service server responds the access request got,
The target obfuscated codes for obtaining front end page corresponding with the access request, specifically include:
(1) for using real-time code obfuscated manner the case where, service server is after receiving access request, to code
Obfuscator sends obfuscated codes acquisition request, and receives the target obfuscated codes of Code obfuscation device transmission, wherein this is obscured
Code obtaining request carries the corresponding source code of access request, which is Code obfuscation device to preceding end page
The source code in face carries out what dynamic obfuscation was handled;
(2) for using non real-time Code obfuscation mode the case where, can alternatively be obscured generation by service server from multiple
A target obfuscated codes are chosen in code, specifically, service server is after receiving access request, from the access request pair
In the alternative obfuscated codes for the front end page answered, target obfuscated codes of the alternative obfuscated codes as front end page are chosen,
Wherein, which obtained after Code obfuscation device carries out dynamic obfuscation processing to the source code of front end page in advance
It arrives;
(3) for using non real-time Code obfuscation mode the case where, can also alternatively be mixed by Code obfuscation device from multiple
Confuse and choose a target obfuscated codes in code, i.e., in response to access request, receives the target that Code obfuscation device is sent and obscure
Code, wherein the target obfuscated codes are that Code obfuscation device chooses one alternatively from the alternative obfuscated codes of front end page
Obfuscated codes, the alternative obfuscated codes of front end page are that Code obfuscation device carries out dynamic to the source code of front end page in advance
It is obtained after obscuring processing, specifically, service server obscures generation after receiving access request, to the transmission of Code obfuscation device
Code acquisition request, Code obfuscation device choose one from the alternative obfuscated codes of front end page corresponding with the acquisition request
Alternative target obfuscated codes of the obfuscated codes as front end page, and the target obfuscated codes are sent to service server.
Wherein, real-time code obfuscated manner no matter is used, or uses non real-time Code obfuscation mode, it is mixed to be required to code
The device that confuses carries out dynamic obfuscation processing to the source code of front end page, above-mentioned right for the dynamic obfuscation process of source code
The source code of front end page carries out dynamic obfuscation processing, specifically includes:
Step 1, Code obfuscation device obtains the source code for the front end page that service server is sent, and determines the original
The Code obfuscation element of beginning code;
Step 2, Code obfuscation device carry out at dynamic obfuscation source code according to the Code obfuscation element determined
Reason.
Wherein, above-mentioned for determining that the Code obfuscation element of the obfuscated codes of front end page comprises at least one of the following:
(1) insertion position of the target redundancy code and the target redundancy code that are inserted into;
(2) position after the adjustment of target object and the target object to be adjusted in source code;
(3) target character to be compressed in source code;
(4) in source code after the change of the object element renamed and the object element title.
Further, if target obfuscated codes are chosen from alternative obfuscated codes, i.e., mixed using non real-time code
Mode of confusing determines target obfuscated codes;At this point, the quantity for the Code obfuscation element determined is multiple, and each Code obfuscation element
It is different, it is thus necessary to determine that the variant quantity of source code, that is, determine the quantity of Code obfuscation element, it is corresponding, it is above-mentioned
Step 1 determines the Code obfuscation element of source code, specifically includes:
It determines the variant quantity of source code, and determines the different Code obfuscation element of variant quantity, specifically
, each alternative obfuscated codes are to be obscured based on a Code obfuscation element source code.
Wherein, in order to guarantee that the obfuscated codes returned every time to client can be different, it is ensured that pre-generated is multiple standby
The demand for the obfuscated codes distribution for selecting obfuscated codes to can satisfy within a preset period of time, is based on this, above-mentioned determining source code
Variant quantity, specifically include:
Determine the target access number for being directed to front end page within a preset period of time, wherein in order to guarantee in preset time
For same client to the access request of a certain front end page in section, each not phase of the target obfuscated codes returned to the client
Together, which can be the average target access times of each client, which can also be pre-
The unauthorized access the estimated and number for obtaining front-end code, the preset time period can be the adjacent code twice of Code obfuscation device
The time interval obscured, for being required to each time from access request of the same client to a certain front end page to client
The target obfuscated codes of the front end page are fed back, therefore, it is necessary to the quantity of obtained alternative obfuscated codes and client pair
The target access number of front end page is directly related;
According to target access number is determined, the variant quantity of the source code of front end page is determined, wherein the variant number
Amount is not less than target access number, wherein since same client is to the target access number and preset time period of front end page
The quantity of alternative obfuscated codes needed for interior is directly related, therefore, the variant quantity of source code is determined based on target access number,
The quantity of Code obfuscation element is determined based on variant quantity again, and then obtains the alternative obfuscated codes of variant quantity;In addition, having
It, can also be according to preset quantity and predeterminated frequency, to original generation for using non real-time Code obfuscation mode when body is implemented
Code carries out dynamic obfuscation processing, obtains the alternative obfuscated codes of preset quantity.
Front end page providing method in this specification one or more embodiment, for the preceding end page from client
The access request in face obtains and carries out the target obfuscated codes that dynamic obfuscation obtains based on the source code to the front end page, will
The target obfuscated codes are sent to corresponding client, render to obtain it and need to visit so that client is based on the target obfuscated codes
The front end page asked can reduce the readability for being exposed to the code for rendering front end page of user in this way, and pre-
If same client is directed to the multiple access request of a certain front end page in the period, the target returned to the client obscures generation
Code can be different, further increase the difficulty for the code that illegal person is cracked for rendering front end page, avoid the occurrence of illegal point
The case where son carries out malicious attack to the code for rendering front end page and plays one's own game reaches and improves front end page in front end
The purpose of the safety of execution.
It should be noted that the embodiment is with a upper embodiment in this specification based on same invention structure in this specification
Think, therefore the specific implementation of the embodiment may refer to the implementation of aforementioned front end page providing method, overlaps will not be repeated.
The front end page providing method that corresponding above-mentioned Fig. 2 to Fig. 5 is described, based on the same technical idea, this specification one
A or multiple embodiments additionally provide a kind of front end page providing method, and Fig. 7 provides for this specification one or more embodiment
Front end page providing method flow diagram, this method be applied to client, as shown in fig. 7, this method include at least with
Lower step:
S701, client send the access request for being directed to front end page to service server;
S702, client receive service server and obscure generation for the target for the front end page that above-mentioned access request returns
Code, wherein the target obfuscated codes are that the code after being carried out dynamic obfuscation based on the source code to front end page is determined, needle
It is different to the corresponding target obfuscated codes of access request of specified quantity in the multiple access request of same front end page;
S703, client render to obtain corresponding front end page based on the target obfuscated codes received, and before showing this
End page face.
Wherein, specific reality of the determination process of target obfuscated codes referring to figs. 2 to Fig. 5 front end page providing method described
Process is applied, details are not described herein.
Front end page providing method in this specification one or more embodiment, firstly, sending needle to service server
To the access request of front end page;Then, the target for receiving service server for the front end page that the access request returns is mixed
Confuse code, which is determining based on the code after the source code progress dynamic obfuscation to front end page, and
It is different for the corresponding target obfuscated codes of access request of specified quantity in the multiple access request of same front end page;
Finally, rendering to obtain corresponding front end page based on the target obfuscated codes received, it can reduce be exposed to user's in this way
For rendering the readability of the code of front end page, and within a preset period of time, same client is directed to a certain front end page
Multiple access request, the target obfuscated codes returned to the client can be different, further increase illegal person and crack and are used for
The difficulty for rendering the code of front end page avoids the occurrence of illegal person and carries out malicious attack to the code for rendering front end page
And the case where playing one's own game, achieve the purpose that improve the safety that front end page is executed in front end.
It should be noted that the embodiment is with first embodiment in this specification based on same invention structure in this specification
Think, therefore the specific implementation of the embodiment may refer to the implementation of aforementioned front end page providing method, overlaps will not be repeated.
The front end page providing method that corresponding above-mentioned Fig. 2 to Fig. 5 is described, based on the same technical idea, this specification one
A or multiple embodiments additionally provide a kind of front end page offer device, and Fig. 8 provides for this specification one or more embodiment
Front end page the module composition schematic diagram of device is provided, the device is for executing the front end page provider that Fig. 2 to Fig. 5 is described
Method, as shown in figure 8, the device includes: that access request obtains module 801, obfuscated codes obtain module 802 and obfuscated codes are sent
Module 803, access request obtains module 801, obfuscated codes obtain module 802 and obfuscated codes sending module 803 is sequentially connected.
In a specific embodiment, access request obtains module 801, for obtaining client for front end page
Access request;
Obfuscated codes obtain module 802, in response to the access request, the target for obtaining the front end page to be obscured
Code, wherein the target obfuscated codes are the codes carried out after dynamic obfuscation based on the source code to the front end page
Determining, and visit of the same client for specified quantity in the multiple access request of the front end page within a preset period of time
Ask that the corresponding target obfuscated codes of request are different;
Obfuscated codes sending module 803, for the target obfuscated codes to be sent to the client, so that the visitor
Family end group renders to obtain the front end page in the target obfuscated codes.
Optionally, above-mentioned obfuscated codes obtain module 802, are specifically used for:
In response to the access request, receives the source code to the front end page that Code obfuscation device is sent and carry out
The target obfuscated codes that dynamic obfuscation is handled;
Alternatively,
In response to the access request, from the alternative obfuscated codes of the front end page, selection one is described alternative mixed
Confuse target obfuscated codes of the code as the front end page, wherein the alternative obfuscated codes are that Code obfuscation device is preparatory
To what is obtained after the source code progress dynamic obfuscation processing of the front end page.
Optionally, above-mentioned apparatus further include: Code obfuscation module, the Code obfuscation module are used for:
The source code of the front end page is obtained, and determines the Code obfuscation element of the source code;
According to the Code obfuscation element determined, dynamic obfuscation processing is carried out to the source code.
Optionally, the Code obfuscation element comprises at least one of the following:
The insertion position of the target redundancy code and the target redundancy code that are inserted into;
Position after the adjustment of target object and the target object to be adjusted in source code;
Target character to be compressed in source code;
In source code after the change of the object element renamed and the object element title.
Optionally, the Code obfuscation element includes: the target redundancy code being inserted into and the target redundancy code
Insertion position;
Corresponding, the Code obfuscation module is specifically used for:
In the redundant code library being pre-created, the target redundancy code that the Code obfuscation element includes is chosen;
In the source code of the front end page, the target redundancy code is added according to the insertion position.
Optionally, the Code obfuscation element includes: target object and the target object to be adjusted in source code
Adjustment after position;
Corresponding, the Code obfuscation module is specifically used for:
In the source code of the front end page, the target pair that the Code obfuscation element includes is searched
As;
In the source code, the target object position is changed according to position after the adjustment.
Optionally, the Code obfuscation element includes: target character to be compressed in source code;
Corresponding, the Code obfuscation module is specifically used for:
In the source code of the front end page, the target word that the Code obfuscation element includes is searched
Symbol;
In the source code, the target character found is deleted.
Optionally, the Code obfuscation element includes: object element and the object element to be renamed in source code
Change after title;
Corresponding, the Code obfuscation module is specifically used for:
In the source code of the front end page, the target element that the Code obfuscation element includes is searched
Element;
In the source code, according to the title of object element described in name modifications after the change.
Optionally, the target obfuscated codes are chosen from the alternative obfuscated codes;
It is corresponding, the Code obfuscation module, also particularly useful for:
It determines the variant quantity of the source code, and determines that the different Code obfuscation of the variant quantity is wanted
Element.
Optionally, the Code obfuscation module, is also further specifically used for:
Determine the target access number for being directed to the front end page within a preset period of time;
According to the target access number, the variant quantity of the source code of the front end page is determined.
Front end page in this specification one or more embodiment provides device, for the preceding end page from client
The access request in face obtains and carries out the target obfuscated codes that dynamic obfuscation obtains based on the source code to the front end page, will
The target obfuscated codes are sent to corresponding client, render to obtain it and need to visit so that client is based on the target obfuscated codes
The front end page asked can reduce the readability for being exposed to the code for rendering front end page of user in this way, and pre-
If same client is directed to the multiple access request of a certain front end page in the period, the target returned to the client obscures generation
Code can be different, further increase the difficulty for the code that illegal person is cracked for rendering front end page, avoid the occurrence of illegal point
The case where son carries out malicious attack to the code for rendering front end page and plays one's own game reaches and improves front end page in front end
The purpose of the safety of execution.
In another specific embodiment, access request obtains module 801, is directed to for obtaining client for user
The access request of the front end page of authentication;
Obfuscated codes obtain module 802, in response to the access request, the target for obtaining the front end page to be obscured
Code, wherein the target obfuscated codes are the codes carried out after dynamic obfuscation based on the source code to the front end page
Determining, and visit of the same client for specified quantity in the multiple access request of the front end page within a preset period of time
Ask that the corresponding target obfuscated codes of request are different;
Obfuscated codes sending module 803, for the target obfuscated codes to be sent to the client, so that the visitor
Family end group renders to obtain the front end page for subscriber authentication in the target obfuscated codes.
Optionally, above-mentioned obfuscated codes obtain module 802, are specifically used for:
In response to the access request, receives the source code to the front end page that Code obfuscation device is sent and carry out
The target obfuscated codes that dynamic obfuscation is handled;
Alternatively,
In response to the access request, from the alternative obfuscated codes of the front end page, selection one is described alternative mixed
Confuse target obfuscated codes of the code as the front end page, wherein the alternative obfuscated codes are that Code obfuscation device is preparatory
To what is obtained after the source code progress dynamic obfuscation processing of the front end page.
Optionally, above-mentioned apparatus further include: Code obfuscation module, the Code obfuscation module are used for:
The source code of the front end page is obtained, and determines the Code obfuscation element of the source code;
According to the Code obfuscation element determined, dynamic obfuscation processing is carried out to the source code.
Optionally, the Code obfuscation element comprises at least one of the following:
The insertion position of the target redundancy code and the target redundancy code that are inserted into;
Position after the adjustment of target object and the target object to be adjusted in source code;
Target character to be compressed in source code;
In source code after the change of the object element renamed and the object element title.
Optionally, the target obfuscated codes are chosen from the alternative obfuscated codes;
Corresponding, the Code obfuscation module is specifically used for:
It determines the variant quantity of the source code, and determines that the different Code obfuscation of the variant quantity is wanted
Element.
Optionally, the Code obfuscation module, is further specifically used for:
Determine the target access number for being directed to the front end page within a preset period of time;
According to the target access number, the variant quantity of the source code of the front end page is determined.
Front end page in this specification one or more embodiment provides device, for the preceding end page from client
The access request in face obtains and carries out the target obfuscated codes that dynamic obfuscation obtains based on the source code to the front end page, will
The target obfuscated codes are sent to corresponding client, render to obtain it and need to visit so that client is based on the target obfuscated codes
The front end page asked can reduce the readability for being exposed to the code for rendering front end page of user in this way, and pre-
If same client is directed to the multiple access request of a certain front end page in the period, to the target obfuscated codes of client return
Can be different, the difficulty for the code that illegal person is cracked for rendering front end page is further increased, illegal person is avoided the occurrence of
The case where carrying out malicious attack to the code for rendering front end page and playing one's own game reaches raising front end page and holds in front end
The purpose of capable safety.
It should be noted that the embodiment is with first embodiment in this specification based on same invention structure in this specification
Think, therefore the specific implementation of the embodiment may refer to the implementation of aforementioned front end page providing method, overlaps will not be repeated.
The front end page providing method of corresponding above-mentioned Fig. 7 description, based on the same technical idea, this specification one or more
A embodiment additionally provides a kind of front end page offer device, and Fig. 9 is the front end that this specification one or more embodiment provides
The page provides the module composition schematic diagram of device, which is used to execute the front end page providing method of Fig. 7 description, such as Fig. 9 institute
Show, which includes:
Access request sending module 901, for sending the access request for being directed to front end page to service server;
Obfuscated codes receiving module 902, the target for receiving the front end page that the service server returns are mixed
Confuse code, wherein the target obfuscated codes are the generations carried out after dynamic obfuscation based on the source code to the front end page
What code determined, and same client is directed to specified quantity in the multiple access request of the front end page within a preset period of time
The corresponding target obfuscated codes of access request are different;
Front end page display module 903, for rendering to obtain the front end based on the target obfuscated codes received
The page, and show the front end page.
Wherein, specific reality of the determination process of target obfuscated codes referring to figs. 2 to Fig. 5 front end page providing method described
Process is applied, details are not described herein.
Front end page in this specification one or more embodiment provides device, firstly, sending needle to service server
To the access request of front end page;Then, the target for receiving service server for the front end page that the access request returns is mixed
Confuse code, which is determining based on the code after the source code progress dynamic obfuscation to front end page, and
It is different for the corresponding target obfuscated codes of access request of specified quantity in the multiple access request of same front end page;
Finally, rendering to obtain corresponding front end page based on the target obfuscated codes received, it can reduce be exposed to user's in this way
For rendering the readability of the code of front end page, and within a preset period of time, same client is directed to a certain front end page
Multiple access request, the target obfuscated codes returned to the client can be different, further increase illegal person and crack and are used for
The difficulty for rendering the code of front end page avoids the occurrence of illegal person and carries out malicious attack to the code for rendering front end page
And the case where playing one's own game, achieve the purpose that improve the safety that front end page is executed in front end.
It should be noted that the embodiment is with first embodiment in this specification based on same invention structure in this specification
Think, therefore the specific implementation of the embodiment may refer to the implementation of aforementioned front end page providing method, overlaps will not be repeated.
The front end page providing method that corresponding above-mentioned Fig. 2 to Fig. 5 is described, based on the same technical idea, this specification one
A or multiple embodiments additionally provide a kind of front end page offer system, and Figure 10 provides for this specification one or more embodiment
Front end page provide system module composition schematic diagram, as shown in Figure 10, which includes:
Service server 20, Code obfuscation device 30 and multiple client 10, wherein the Code obfuscation device 30 can
To be set in the service server 20 or be set to obscuring in server different from the service server 20;
Client sends the access request for being directed to front end page to service server, and service server is receiving the access
After request, the target obfuscated codes of front end page corresponding with the access request are obtained, wherein the target obfuscated codes can be
Using the determination of real-time code obfuscated manner, it is also possible to using the determination of non real-time Code obfuscation mode;
Specifically, the case where determining target obfuscated codes for real-time code obfuscated manner, service server is being received
After the access request, the source code of front end page corresponding with the access request is obtained, and the source code is sent to generation
Code obfuscator, Code obfuscation device carry out dynamic obfuscation to the source code and obtain client after receiving the source code
The target obfuscated codes of the front end page requested access to are held, and the target obfuscated codes are sent to service server, wherein generation
Code obfuscator is randomly generated for the target obfuscated codes that same source code is obscured, therefore, in preset time
The target obfuscated codes returned for same client for the multiple access request of a certain front end page in section can be different, business
Server receives the target obfuscated codes;
The case where determining target obfuscated codes for non real-time Code obfuscation mode, service server obtain preceding end page in advance
The source code in face, and the source code is sent to Code obfuscation device, Code obfuscation device is receiving the source code
Afterwards, dynamic obfuscation is carried out to the source code and obtains the mixed of the corresponding alternative obfuscated codes comprising preset quantity of the front end page
Confuse code collection, and the obfuscated codes set is sent to service server, wherein multiple in obfuscated codes set alternatively to obscure
Different between code, therefore, the multiple access for same client for a certain front end page is asked within a preset period of time
Ask the target obfuscated codes of return can be different, service server after receiving the access request for the front-end code,
An alternative obfuscated codes are chosen in obfuscated codes set as target obfuscated codes;
After service server gets the target obfuscated codes of the front end page of client request access, which is obscured
Code is sent to corresponding client;
Client is rendered based on the target obfuscated codes and is corresponded to after receiving the target obfuscated codes of front end page
Front end page.
Front end page in this specification one or more embodiment provides system, for the preceding end page from client
The access request in face obtains and carries out the target obfuscated codes that dynamic obfuscation obtains based on the source code to the front end page, will
The target obfuscated codes are sent to corresponding client, render to obtain it and need to visit so that client is based on the target obfuscated codes
The front end page asked can reduce the readability for being exposed to the code for rendering front end page of user in this way, and pre-
If same client is directed to the multiple access request of a certain front end page in the period, the target returned to the client obscures generation
Code can be different, further increase the difficulty for the code that illegal person is cracked for rendering front end page, avoid the occurrence of illegal point
The case where son carries out malicious attack to the code for rendering front end page and plays one's own game reaches and improves front end page in front end
The purpose of the safety of execution.
Further, corresponding above-mentioned method shown in Fig. 2 to Fig. 5, based on the same technical idea, this specification one or
Multiple embodiments additionally provide a kind of front end page offer equipment, which is used to execute above-mentioned front end page providing method,
As shown in figure 11.
Front end page, which provides equipment, to generate bigger difference because configuration or performance are different, may include one or one
A above processor 1101 and memory 1102 can store one or more storages using journey in memory 1102
Sequence or data.Wherein, memory 1102 can be of short duration storage or persistent storage.The application program for being stored in memory 1102 can
To include one or more modules (diagram is not shown), each module may include one provided front end page in equipment
Family computer executable instruction.Further, processor 1101 can be set to communicate with memory 1102, in preceding end page
Face provides the series of computation machine executable instruction executed in memory 1102 in equipment.Front end page provides equipment and can also wrap
One or more power supplys 1103 are included, one or more wired or wireless network interfaces 1104, one or more
Input/output interface 1105, one or more keyboards 1106 etc..
In a specific embodiment, front end page provide equipment include memory and one or more
Program, perhaps more than one program is stored in memory and one or more than one program may include for one of them
One or more modules, and each module may include that the series of computation machine provided front end page in equipment can be performed
Instruction, and be configured to execute this or more than one program by one or more than one processor to include for carrying out
Following computer executable instructions:
Obtain the access request that client is directed to front end page;
In response to the access request, the target obfuscated codes of the front end page are obtained, wherein the target obscures generation
Code is determining and same within a preset period of time based on the code after the source code progress dynamic obfuscation to the front end page
One client is obscured for the corresponding target of access request of specified quantity in the multiple access request of the front end page
Code is different;
The target obfuscated codes are sent to the client, so that the client is based on the target obfuscated codes
Rendering obtains the front end page.
Optionally, computer executable instructions are when executed, described in response to the access request, obtain the front end
The target obfuscated codes of the page, comprising:
In response to the access request, receives the source code to the front end page that Code obfuscation device is sent and carry out
The target obfuscated codes that dynamic obfuscation is handled;
Alternatively,
In response to the access request, from the alternative obfuscated codes of the front end page, selection one is described alternative mixed
Confuse target obfuscated codes of the code as the front end page, wherein the alternative obfuscated codes are that Code obfuscation device is preparatory
To what is obtained after the source code progress dynamic obfuscation processing of the front end page.
Optionally, computer executable instructions when executed, move by the source code to the front end page
State obscures processing, comprising:
The source code of the front end page is obtained, and determines the Code obfuscation element of the source code;
According to the Code obfuscation element determined, dynamic obfuscation processing is carried out to the source code.
Optionally, when executed, the Code obfuscation element comprises at least one of the following computer executable instructions:
The insertion position of the target redundancy code and the target redundancy code that are inserted into;
Position after the adjustment of target object and the target object to be adjusted in source code;
Target character to be compressed in source code;
In source code after the change of the object element renamed and the object element title.
Optionally, when executed, the Code obfuscation element includes: that the target that is inserted into is superfluous to computer executable instructions
The insertion position of remaining code and the target redundancy code;
The Code obfuscation element that the basis is determined carries out dynamic obfuscation processing to the source code, comprising:
In the redundant code library being pre-created, the target redundancy code that the Code obfuscation element includes is chosen;
In the source code of the front end page, the target redundancy code is added according to the insertion position.
Optionally, when executed, the Code obfuscation element includes: in source code wait adjust to computer executable instructions
Position after the adjustment of whole target object and the target object;
The Code obfuscation element that the basis is determined carries out dynamic obfuscation processing to the source code, comprising:
In the source code of the front end page, the target pair that the Code obfuscation element includes is searched
As;
In the source code, the target object position is changed according to position after the adjustment.
Optionally, when executed, the Code obfuscation element includes: in source code wait press to computer executable instructions
The target character of contracting;
The Code obfuscation element that the basis is determined carries out dynamic obfuscation processing to the source code, comprising:
In the source code of the front end page, the target word that the Code obfuscation element includes is searched
Symbol;
In the source code, the target character found is deleted.
Optionally, when executed, the Code obfuscation element includes: in source code to more to computer executable instructions
Title after the change of the object element and the object element of name;
The Code obfuscation element that the basis is determined carries out dynamic obfuscation processing to the source code, comprising:
In the source code of the front end page, the target element that the Code obfuscation element includes is searched
Element;
In the source code, according to the title of object element described in name modifications after the change.
Optionally, when executed, the target obfuscated codes are alternatively to obscure generation from described to computer executable instructions
It is chosen in code;
The Code obfuscation element of the determination source code, comprising:
It determines the variant quantity of the source code, and determines that the different Code obfuscation of the variant quantity is wanted
Element.
Optionally, computer executable instructions when executed, wrap by the variant quantity of the determination source code
It includes:
Determine the target access number for being directed to the front end page within a preset period of time;
According to the target access number, the variant quantity of the source code of the front end page is determined.
Front end page in this specification one or more embodiment provides equipment, for the preceding end page from client
The access request in face obtains and carries out the target obfuscated codes that dynamic obfuscation obtains based on the source code to the front end page, will
The target obfuscated codes are sent to corresponding client, render to obtain it and need to visit so that client is based on the target obfuscated codes
The front end page asked can reduce the readability for being exposed to the code for rendering front end page of user in this way, and pre-
If same client is directed to the multiple access request of a certain front end page in the period, the target returned to the client obscures generation
Code can be different, further increase the difficulty for the code that illegal person is cracked for rendering front end page, avoid the occurrence of illegal point
The case where son carries out malicious attack to the code for rendering front end page and plays one's own game reaches and improves front end page in front end
The purpose of the safety of execution.
In another specific embodiment, front end page provide equipment include memory and one or one with
On program, perhaps more than one program is stored in memory and one or more than one program can wrap for one of them
One or more modules are included, and each module may include providing the series of computation machine in equipment to front end page to hold
Row instruction, and be configured to be executed this by one or more than one processor or more than one program include for into
The following computer executable instructions of row:
Obtain the access request for the front end page that client is directed to for subscriber authentication;
In response to the access request, the target obfuscated codes of the front end page are obtained, wherein the target obscures generation
Code is determining and same within a preset period of time based on the code after the source code progress dynamic obfuscation to the front end page
One client is obscured for the corresponding target of access request of specified quantity in the multiple access request of the front end page
Code is different;
The target obfuscated codes are sent to the client, so that the client is based on the target obfuscated codes
Rendering obtains the front end page for subscriber authentication.
Optionally, computer executable instructions are when executed, described in response to the access request, obtain the front end
The target obfuscated codes of the page, comprising:
In response to the access request, receives the source code to the front end page that Code obfuscation device is sent and carry out
The target obfuscated codes that dynamic obfuscation is handled;
Alternatively,
In response to the access request, from the alternative obfuscated codes of the front end page, selection one is described alternative mixed
Confuse target obfuscated codes of the code as the front end page, wherein the alternative obfuscated codes are that Code obfuscation device is preparatory
To what is obtained after the source code progress dynamic obfuscation processing of the front end page.
Optionally, computer executable instructions when executed, move by the source code to the front end page
State obscures processing, comprising:
The source code of the front end page is obtained, and determines the Code obfuscation element of the source code;
According to the Code obfuscation element determined, dynamic obfuscation processing is carried out to the source code.
Optionally, when executed, the Code obfuscation element comprises at least one of the following computer executable instructions:
The insertion position of the target redundancy code and the target redundancy code that are inserted into;
Position after the adjustment of target object and the target object to be adjusted in source code;
Target character to be compressed in source code;
In source code after the change of the object element renamed and the object element title.
Optionally, when executed, the target obfuscated codes are alternatively to obscure generation from described to computer executable instructions
It is chosen in code;
The Code obfuscation element of the determination source code, comprising:
It determines the variant quantity of the source code, and determines that the different Code obfuscation of the variant quantity is wanted
Element.
Optionally, computer executable instructions when executed, wrap by the variant quantity of the determination source code
It includes:
Determine the target access number for being directed to the front end page within a preset period of time;
According to the target access number, the variant quantity of the source code of the front end page is determined.
Front end page in this specification one or more embodiment provides equipment, for the preceding end page from client
The access request in face obtains and carries out the target obfuscated codes that dynamic obfuscation obtains based on the source code to the front end page, will
The target obfuscated codes are sent to corresponding client, render to obtain it and need to visit so that client is based on the target obfuscated codes
The front end page asked can reduce the readability for being exposed to the code for rendering front end page of user in this way, and pre-
If same client is directed to the multiple access request of a certain front end page in the period, the target returned to the client obscures generation
Code can be different, further increase the difficulty for the code that illegal person is cracked for rendering front end page, avoid the occurrence of illegal point
The case where son carries out malicious attack to the code for rendering front end page and plays one's own game reaches and improves front end page in front end
The purpose of the safety of execution.
In another specific embodiment, front end page provide equipment include memory and one or one with
On program, perhaps more than one program is stored in memory and one or more than one program can wrap for one of them
One or more modules are included, and each module may include providing the series of computation machine in equipment to front end page to hold
Row instruction, and be configured to be executed this by one or more than one processor or more than one program include for into
The following computer executable instructions of row:
The access request for being directed to front end page is sent to service server;
Receive the target obfuscated codes for the front end page that the service server returns, wherein the target is obscured
Code is determining based on the code after the source code progress dynamic obfuscation to the front end page, and within a preset period of time
Same client is mixed for the corresponding target of access request of specified quantity in the multiple access request of the front end page
The code that confuses is different;
It renders to obtain the front end page based on the target obfuscated codes received, and shows the front end page.
Front end page in this specification one or more embodiment provides equipment, firstly, sending needle to service server
To the access request of front end page;Then, the target for receiving service server for the front end page that the access request returns is mixed
Confuse code, which is determining based on the code after the source code progress dynamic obfuscation to front end page, and
It is different for the corresponding target obfuscated codes of access request of specified quantity in the multiple access request of same front end page;
Finally, rendering to obtain corresponding front end page based on the target obfuscated codes received, it can reduce be exposed to user's in this way
For rendering the readability of the code of front end page, and within a preset period of time, same client is directed to a certain front end page
Multiple access request, the target obfuscated codes returned to the client can be different, further increase illegal person and crack and are used for
The difficulty for rendering the code of front end page avoids the occurrence of illegal person and carries out malicious attack to the code for rendering front end page
And the case where playing one's own game, achieve the purpose that improve the safety that front end page is executed in front end.
Further, corresponding above-mentioned method shown in Fig. 2 to Fig. 5, based on the same technical idea, this specification one or
Multiple embodiments additionally provide a kind of storage medium,, should in a kind of specific embodiment for storing computer executable instructions
Storage medium can be USB flash disk, CD, hard disk etc., and the computer executable instructions of storage medium storage are being executed by processor
When, it is able to achieve following below scheme:
Obtain the access request that client is directed to front end page;
In response to the access request, the target obfuscated codes of the front end page are obtained, wherein the target obscures generation
Code is determining and same within a preset period of time based on the code after the source code progress dynamic obfuscation to the front end page
One client is obscured for the corresponding target of access request of specified quantity in the multiple access request of the front end page
Code is different;
The target obfuscated codes are sent to the client, so that the client is based on the target obfuscated codes
Rendering obtains the front end page.
Optionally, the computer executable instructions of storage medium storage are described in response to institute when being executed by processor
Access request is stated, the target obfuscated codes of the front end page are obtained, comprising:
In response to the access request, receives the source code to the front end page that Code obfuscation device is sent and carry out
The target obfuscated codes that dynamic obfuscation is handled;
Alternatively,
In response to the access request, from the alternative obfuscated codes of the front end page, selection one is described alternative mixed
Confuse target obfuscated codes of the code as the front end page, wherein the alternative obfuscated codes are that Code obfuscation device is preparatory
To what is obtained after the source code progress dynamic obfuscation processing of the front end page.
Optionally, the computer executable instructions of storage medium storage are described to before described when being executed by processor
The source code in end page face carries out dynamic obfuscation processing, comprising:
The source code of the front end page is obtained, and determines the Code obfuscation element of the source code;
According to the Code obfuscation element determined, dynamic obfuscation processing is carried out to the source code.
Optionally, the computer executable instructions of storage medium storage are when being executed by processor, the Code obfuscation
Element comprises at least one of the following:
The insertion position of the target redundancy code and the target redundancy code that are inserted into;
Position after the adjustment of target object and the target object to be adjusted in source code;
Target character to be compressed in source code;
In source code after the change of the object element renamed and the object element title.
Optionally, the computer executable instructions of storage medium storage are when being executed by processor, the Code obfuscation
Element includes: the target redundancy code being inserted into and the insertion position of the target redundancy code;
The Code obfuscation element that the basis is determined carries out dynamic obfuscation processing to the source code, comprising:
In the redundant code library being pre-created, the target redundancy code that the Code obfuscation element includes is chosen;
In the source code of the front end page, the target redundancy code is added according to the insertion position.
Optionally, the computer executable instructions of storage medium storage are when being executed by processor, the Code obfuscation
Element include: target object and the target object to be adjusted in source code adjustment after position;
The Code obfuscation element that the basis is determined carries out dynamic obfuscation processing to the source code, comprising:
In the source code of the front end page, the target pair that the Code obfuscation element includes is searched
As;
In the source code, the target object position is changed according to position after the adjustment.
Optionally, the computer executable instructions of storage medium storage are when being executed by processor, the Code obfuscation
Element includes: target character to be compressed in source code;
The Code obfuscation element that the basis is determined carries out dynamic obfuscation processing to the source code, comprising:
In the source code of the front end page, the target word that the Code obfuscation element includes is searched
Symbol;
In the source code, the target character found is deleted.
Optionally, the computer executable instructions of storage medium storage are when being executed by processor, the Code obfuscation
Element include: in source code after the change of the object element renamed and the object element title;
The Code obfuscation element that the basis is determined carries out dynamic obfuscation processing to the source code, comprising:
In the source code of the front end page, the target element that the Code obfuscation element includes is searched
Element;
In the source code, according to the title of object element described in name modifications after the change.
Optionally, the computer executable instructions of storage medium storage when being executed by processor, obscure by the target
Code is chosen from the alternative obfuscated codes;
The Code obfuscation element of the determination source code, comprising:
It determines the variant quantity of the source code, and determines that the different Code obfuscation of the variant quantity is wanted
Element.
Optionally, the computer executable instructions of storage medium storage are when being executed by processor, described in the determination
The variant quantity of source code, comprising:
Determine the target access number for being directed to the front end page within a preset period of time;
According to the target access number, the variant quantity of the source code of the front end page is determined.
The computer executable instructions of storage medium storage in this specification one or more embodiment are by processor
When execution, for the access request of the front end page from client, obtain based on the source code to the front end page into
The target obfuscated codes are sent to corresponding client, so that client's end group by the target obfuscated codes that Mobile state is obscured
Render to obtain its front end page for needing to access in the target obfuscated codes, can reduce in this way be exposed to user for rendering
The readability of the code of front end page, and same client is directed to the multiple access of a certain front end page within a preset period of time
Request, the target obfuscated codes returned to the client can be different, further increase illegal person and crack for rendering front end
The difficulty of the code of the page avoids the occurrence of illegal person and carries out malicious attack to the code for rendering front end page and seek private
The situation of benefit achievees the purpose that improve the safety that front end page is executed in front end.
In another specific embodiment, which can be USB flash disk, CD, hard disk etc., storage medium storage
Computer executable instructions when being executed by processor, be able to achieve following below scheme:
Obtain the access request for the front end page that client is directed to for subscriber authentication;
In response to the access request, the target obfuscated codes of the front end page are obtained, wherein the target obscures generation
Code is determining and same within a preset period of time based on the code after the source code progress dynamic obfuscation to the front end page
One client is obscured for the corresponding target of access request of specified quantity in the multiple access request of the front end page
Code is different;
The target obfuscated codes are sent to the client, so that the client is based on the target obfuscated codes
Rendering obtains the front end page for subscriber authentication.
Optionally, the computer executable instructions of storage medium storage are described in response to institute when being executed by processor
Access request is stated, the target obfuscated codes of the front end page are obtained, comprising:
In response to the access request, receives the source code to the front end page that Code obfuscation device is sent and carry out
The target obfuscated codes that dynamic obfuscation is handled;
Alternatively,
In response to the access request, from the alternative obfuscated codes of the front end page, selection one is described alternative mixed
Confuse target obfuscated codes of the code as the front end page, wherein the alternative obfuscated codes are that Code obfuscation device is preparatory
To what is obtained after the source code progress dynamic obfuscation processing of the front end page.
Optionally, the computer executable instructions of storage medium storage are described to before described when being executed by processor
The source code in end page face carries out dynamic obfuscation processing, comprising:
The source code of the front end page is obtained, and determines the Code obfuscation element of the source code;
According to the Code obfuscation element determined, dynamic obfuscation processing is carried out to the source code.
Optionally, the computer executable instructions of storage medium storage are when being executed by processor, the Code obfuscation
Element comprises at least one of the following:
The insertion position of the target redundancy code and the target redundancy code that are inserted into;
Position after the adjustment of target object and the target object to be adjusted in source code;
Target character to be compressed in source code;
In source code after the change of the object element renamed and the object element title.
Optionally, the computer executable instructions of storage medium storage when being executed by processor, obscure by the target
Code is chosen from the alternative obfuscated codes;
The Code obfuscation element of the determination source code, comprising:
It determines the variant quantity of the source code, and determines that the different Code obfuscation of the variant quantity is wanted
Element.
Optionally, the computer executable instructions of storage medium storage are when being executed by processor, described in the determination
The variant quantity of source code, comprising:
Determine the target access number for being directed to the front end page within a preset period of time;
According to the target access number, the variant quantity of the source code of the front end page is determined.
The computer executable instructions of storage medium storage in this specification one or more embodiment are by processor
When execution, for the access request of the front end page from client, obtain based on the source code to the front end page into
The target obfuscated codes are sent to corresponding client, so that client's end group by the target obfuscated codes that Mobile state is obscured
Render to obtain its front end page for needing to access in the target obfuscated codes, can reduce in this way be exposed to user for rendering
The readability of the code of front end page, and same client is directed to the multiple access of a certain front end page within a preset period of time
Request, the target obfuscated codes returned to the client can be different, further increase illegal person and crack for rendering front end
The difficulty of the code of the page avoids the occurrence of illegal person and carries out malicious attack to the code for rendering front end page and seek private
The situation of benefit achievees the purpose that improve the safety that front end page is executed in front end.
In another specific embodiment, which can be USB flash disk, CD, hard disk etc., storage medium storage
Computer executable instructions when being executed by processor, be able to achieve following below scheme:
The access request for being directed to front end page is sent to service server;
Receive the target obfuscated codes for the front end page that the service server returns, wherein the target is obscured
Code is determining based on the code after the source code progress dynamic obfuscation to the front end page, and within a preset period of time
Same client is mixed for the corresponding target of access request of specified quantity in the multiple access request of the front end page
The code that confuses is different;
It renders to obtain the front end page based on the target obfuscated codes received, and shows the front end page.
The computer executable instructions of storage medium storage in this specification one or more embodiment are by processor
When execution, firstly, sending the access request for being directed to front end page to service server;Then, reception service server, which is directed to, is somebody's turn to do
The target obfuscated codes for the front end page that access request returns, which is based on the source code to front end page
What the code after carrying out dynamic obfuscation determined, and asked for the access of specified quantity in the multiple access request of same front end page
Ask corresponding target obfuscated codes different;Finally, rendering to obtain corresponding front end based on the target obfuscated codes received
The page can reduce the readability for being exposed to the code for rendering front end page of user in this way, and in preset time period
Interior same client is directed to the multiple access request of a certain front end page, and the target obfuscated codes returned to the client can not
Together, the difficulty for further increasing the code that illegal person is cracked for rendering front end page avoids the occurrence of illegal person to being used for
The case where code of rendering front end page carries out malicious attack and plays one's own game reaches and improves the peace that front end page is executed in front end
The purpose of full property.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example,
Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So
And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit.
Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause
This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device
(Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate
Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer
Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker
Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " is patrolled
Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development,
And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language
(Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL
(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description
Language)、Confluence、CUPL(Cornell University Programming Language)、HD Cal、
JHDL(Java Hardware Description Language)、Lava、Lola、My HDL、PALASM、RHDL(Ruby
Hardware Description Language) etc., VHDL (Very-High-Speed is most generally used at present
Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer
This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages,
The hardware circuit for realizing the logical method process can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing
The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can
Read medium, logic gate, switch, specific integrated circuit (Application Specific Integrated Circuit,
ASIC), the form of programmable logic controller (PLC) and insertion microcontroller, the example of controller includes but is not limited to following microcontroller
Device: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320 are deposited
Memory controller is also implemented as a part of the control logic of memory.It is also known in the art that in addition to
Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic
Controller is obtained to come in fact in the form of logic gate, switch, specific integrated circuit, programmable logic controller (PLC) and insertion microcontroller etc.
Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it
The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions
For either the software module of implementation method can be the structure in hardware component again.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit can be realized in the same or multiple software and or hardware when specification one or more.
It should be understood by those skilled in the art that, the embodiment of this specification one or more can provide for method, system,
Or computer program product.Therefore, this specification one or more can be used complete hardware embodiment, complete software embodiment,
Or the form of embodiment combining software and hardware aspects.Moreover, this specification one or more can be used in one or more
It wherein include computer-usable storage medium (the including but not limited to magnetic disk storage, CD- of computer usable program code
ROM, optical memory etc.) on the form of computer program product implemented.
This specification one or more is referring to (being according to method, the equipment of this specification one or more embodiment
System) and the flowchart and/or the block diagram of computer program product describe.It should be understood that can be realized by computer program instructions
The process and/or box in each flow and/or block and flowchart and/or the block diagram in flowchart and/or the block diagram
Combination.Can provide these computer program instructions to general purpose computer, special purpose computer, Embedded Processor or other can compile
The processor of journey data processing equipment is to generate a machine, so that passing through computer or other programmable data processing devices
The instruction that processor executes generates for realizing in one box of one or more flows of the flowchart and/or block diagram or more
The device for the function of being specified in a box.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that the embodiment of this specification one or more can provide as method, system or meter
Calculation machine program product.Therefore, complete hardware embodiment, complete software embodiment or combination can be used in this specification one or more
The form of embodiment in terms of software and hardware.It is wherein wrapped moreover, this specification one or more can be used in one or more
Computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optics containing computer usable program code
Memory etc.) on the form of computer program product implemented.
This specification one or more can be in the general context of computer-executable instructions executed by a computer
Description, such as program module.Generally, program module includes the example for executing particular task or realizing particular abstract data type
Journey, programs, objects, component, data structure etc..This specification one or more can also be practiced in a distributed computing environment
It is a, in these distributed computing environments, by executing task by the connected remote processing devices of communication network.Dividing
Cloth calculates in environment, and program module can be located in the local and remote computer storage media including storage equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.
The foregoing is merely the embodiment of this specification one or more, be not limited to this specification one or
It is multiple.To those skilled in the art, this specification one or more can have various modifications and variations.It is all in this explanation
Any modification, equivalent replacement, improvement and so within book one or more spirit and principle, should be included in this specification
Within one or more scopes of the claims.