CN103207958A - Encryption device and method for batch SWF (small web format) files in AS3.0 (action script 3.0) scripting - Google Patents
Encryption device and method for batch SWF (small web format) files in AS3.0 (action script 3.0) scripting Download PDFInfo
- Publication number
- CN103207958A CN103207958A CN2013101205964A CN201310120596A CN103207958A CN 103207958 A CN103207958 A CN 103207958A CN 2013101205964 A CN2013101205964 A CN 2013101205964A CN 201310120596 A CN201310120596 A CN 201310120596A CN 103207958 A CN103207958 A CN 103207958A
- Authority
- CN
- China
- Prior art keywords
- label
- file
- swf file
- swf
- symbolclass
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Storage Device Security (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides encryption device and method for batch SWF (small web format) files in AS3.0 (action script 3.0) scripting. The method includes: acquiring a source SWF file uploaded by a user; analyzing the source SWF file to obtain header information and judging whether the version type of the source SWF file is AVM2 (actionscript version machine 2) or not according to the header information; if yes, locating to a DoABC (defines actionscriptbytecode) tag and a symbolclass tag according to the header information, and subjecting the DoABC tag and the symbolclass tag to obfuscated encryption; and recombining all encrypted tags to generate an encrypted SWF file. The batch SWF files are uploaded to the batch SWF file encryption device for AS3.0 scripting language development by users and are encrypted in batches, so that encrypting efficiency is increased greatly and no disk resource of a client is occupied.
Description
Technical field
The present invention relates to the video playback technology, relate in particular to a kind of SWF file bulk encryption method and device of AS3.0 script exploitation.
Background technology
The SWF file is the professional format of Flash, is a kind of animation file form of supporting vector and dot pattern, is widely used in webpage design, fields such as cartoon making, and the SWF file is also referred to as the Flash file usually.Usually the game developer is not at will usurped modification for the SWF file of writing of protecting oneself, and can be encrypted the SWF file usually.
In conventional art, the means that the SWF file is encrypted are to download the software that can be encrypted from the Internet, and single SWF file is encrypted.But said method can only be to single SWF file encryption, inefficiency, and need user oneself to download application file from the Internet, take hard drive space.
Summary of the invention
Above-mentioned defective at conventional art, the embodiment of the invention provides a kind of SWF file bulk encryption method and device of AS3.0 script exploitation, make that the user can be by uploading the SWF file to the SWF file bulk encryption device of AS3.0 script exploitation in batches, a large amount of SWF files are carried out bulk encryption, thereby improved encryption efficiency greatly, and do not taken the hard disk resource of client.
The embodiment of the invention provides a kind of SWF file bulk encryption method of AS3.0 script exploitation, comprising:
Obtain the source SWF file that the user uploads;
Read described source SWF file by binary stream, resolve described source SWF file and obtain file header information, judge according to described file header information whether the release type of described source SWF file belongs to the AVM2 type;
If the release type of described source SWF file is the AVM2 type, then according to described file header information, navigate to DoABC label and SYMBOLCLASS label, described DoABC label and described SYMBOLCLASS label are obscured encryption;
All labels after reorganization is encrypted generate and encrypt the SWF file.
Preferably, before whether the release type of judging described source SWF file according to described file header information belongs to AVM2 type step, also comprise:
Judge according to described file header information whether described source SWF file is compressed file, if the described source of decompress(ion) SWF file then.
Preferably, if the release type of described source SWF file is the AVM2 type, then according to described file header information, navigate to DoABC label and SYMBOLCLASS label, described DoABC label and described SYMBOLCLASS label obscured encrypting step, comprising:
According to described file header information, the length value that obtains the length value of file header in the SWF file of described source and be positioned at described DoABC label each label before, and carry out read group total, obtain the positional value of described DoABC label, directly navigate to described DoABC label according to the positional value of described DoABC label;
According to described file header information, the length value that obtains the length value of file header in the SWF file of described source and be positioned at described SYMBOLCLASS label each label before, and carry out read group total, obtain the positional value of described SYMBOLCLASS label, directly navigate to described SYMBOLCLASS label according to the positional value of described SYMBOLCLASS label;
Resolve described DoABC label and described SYMBOLCLASS label, obtain class name, variable name and function name in the SWF file of described source, class name, variable name and function name in the SWF file of described source are obscured encryption.
The embodiment of the invention provides a kind of SWF file bulk encryption device of AS3.0 script exploitation, comprising:
Receiver module is used for obtaining the source SWF file that the user uploads;
First judge module is resolved described source SWF file and is obtained file header information, judges according to described file header information whether the release type of described source SWF file belongs to the AVM2 type;
Encrypting module is used for then according to described file header information, navigating to DoABC label and SYMBOLCLASS label if the release type of described source SWF file is the AVM2 type, and described DoABC label and described SYMBOLCLASS label are obscured encryption;
Recombination module is used for all labels after reorganization is encrypted, and generates and encrypts the SWF file.
Preferably, this device also comprises:
Second judge module is used for judging according to described file header information whether described source SWF file is compressed file, if the described source of decompress(ion) SWF file then.
Preferably, encrypting module comprises:
First positioning unit, be used for according to described file header information, the length value that obtains the length value of file header in the SWF file of described source and be positioned at described DoABC label each label before, and carry out read group total, obtain the positional value of described DoABC label, directly navigate to described DoABC label according to the positional value of described DoABC label;
Second positioning unit, be used for according to described file header information, the length value that obtains the length value of file header in the SWF file of described source and be positioned at described SYMBOLCLASS label each label before, and carry out read group total, obtain the positional value of described SYMBOLCLASS label, directly navigate to described SYMBOLCLASS label according to the positional value of described SYMBOLCLASS label;
Obscure the unit, be used for resolving described DoABC label and described SYMBOLCLASS label, obtain class name, variable name and function name in the SWF file of described source, class name, variable name and function name in the SWF file of described source are obscured encryption.
In the technical scheme of present embodiment, the user is by uploading the SWF file in batches to the SWF file bulk encryption device of AS3.0 script exploitation, a large amount of SWF files are carried out bulk encryption, thereby improved encryption efficiency greatly, and do not take the hard disk resource of client.
Description of drawings
Fig. 1 is the process flow diagram of SWF file bulk encryption method first embodiment of AS3.0 script exploitation of the present invention;
Fig. 2 is the structural representation of SWF file bulk encryption device first embodiment of AS3.0 script exploitation of the present invention;
Fig. 3 is the structural representation of SWF file bulk encryption device second embodiment of AS3.0 script exploitation of the present invention.
Embodiment
Fig. 1 is the process flow diagram of SWF file bulk encryption method first embodiment of AS3.0 script exploitation of the present invention, as shown in Figure 1, the SWF file bulk encryption method of the AS3.0 script exploitation that present embodiment provides is carried out by the SWF file bulk encryption device of AS3.0 script exploitation, this device is located on the server of network side, this device obtains the user and uploads source SWF file in batches from end side, respectively each source SWF file is encrypted, and the source SWF file compression of encrypting is sent to the local directory of terminal.This device can adopt the form of software and/or hardware to realize, this method comprises:
Step S100 obtains the source SWF file that the user uploads;
Step S102, resolve described source SWF file and obtain file header information, judge according to described file header information whether the release type of described source SWF file belongs to the AVM2 type, if the release type of described source SWF file is the AVM2 type, then enter step S104, then flow process finishes if not;
Step S104 according to described file header information, navigates to DoABC label and SYMBOLCLASS label, and described DoABC label and described SYMBOLCLASS label are obscured encryption;
Step S106, all labels after reorganization is encrypted generate and encrypt the SWF file.
Particularly, the SWF file is made up of file header and data volume; Wherein, data volume is obtained by a plurality of different types of label definition.For example: shape definition tag, sound definition label and end-tag etc.When the SWF file was write generation by the as3.0 code, the label of storage as3.0 code was DoABC label and SYMBOLCLASS label.
After the SWF file bulk encryption device of AS3.0 script exploitation receives the batch source SWF file that the user uploads, at first need each source SWF file is resolved, concrete analytic method can be for reading each source SWF file by binary stream, file header information in the SWF file of parsing source, comprising the version information of this source SWF file, for example 0x06 represents version 6.
Whether the release type of judging source SWF file according to version information belongs to the AVM2 type, and the AVM2 type is to write generation by the as3.0 code, dissimilar SWF files, the version information difference in its file header.
Further, the user is when uploading source SWF file, and source SWF file may be the file that compressed, and therefore needs to judge whether this document is compressed before this document is encrypted, if then need first decompression.The file header of source SWF file begins with three identifiers, and described three identifiers are 0x46,0x57 and 0x53 or 0x46,0x57 and 0x43, if three identifiers of the file header of source SWF file are 0x46,0x57 and 0x53, then is compressed file not; If three identifiers of the file header of former swf file are 0x46,0x57 and 0x43, then are compressed file.
Further, the specific implementation method of step S104 is:
According to described file header information, the length value that obtains the length value of file header in the SWF file of described source and be positioned at described DoABC label each label before, and carry out read group total, obtain the positional value of described DoABC label, directly navigate to described DoABC label according to the positional value of described DoABC label;
According to described file header information, the length value that obtains the length value of file header in the SWF file of described source and be positioned at described SYMBOLCLASS label each label before, and carry out read group total, obtain the positional value of described SYMBOLCLASS label, directly navigate to described SYMBOLCLASS label according to the positional value of described SYMBOLCLASS label;
Resolve described DoABC label and described SYMBOLCLASS label, obtain class name, variable name and function name in the SWF file of described source, class name, variable name and function name in the SWF file of described source are obscured encryption.
Particularly; because DoABC label and SYMBOLCLASS label are the control label; be used for the concrete code information of storage; therefore wherein comprise a large amount of important character informations such as bag name, class name, method name, attribute-name and parameter name; by the mode that these important character informations are replaced with mess code it is encrypted, thereby reaches the effect of protection source SWF file.
In the technical scheme of present embodiment, the user is by uploading the SWF file in batches to the SWF file bulk encryption device of AS3.0 script exploitation, a large amount of SWF files are carried out bulk encryption, thereby improved encryption efficiency greatly, and do not take the hard disk resource of client.
Fig. 2 is the structural representation of SWF file bulk encryption device first embodiment of AS3.0 script exploitation of the present invention, as shown in Figure 2, this device is located on the server of network side, after obtaining the user and uploading source SWF file in batches from end side, respectively each source SWF file is encrypted, and the source SWF file compression of encrypting is sent to the local directory of terminal.This device can adopt the form of software and/or hardware to realize, this method comprises:
Encrypting module 12 is used for then according to described file header information, navigating to DoABC label and SYMBOLCLASS label if the release type of described source SWF file is the AVM2 type, and described DoABC label and described SYMBOLCLASS label are obscured encryption;
The SWF file bulk encryption method that the AS3.0 script that the SWF file bulk encryption device of the AS3.0 script exploitation that the embodiment of the invention provides provides for the execution embodiment of the invention is developed possesses corresponding functional module, does not repeat them here.
In the technical scheme of present embodiment, the user is by uploading the SWF file in batches to the SWF file bulk encryption device of AS3.0 script exploitation, a large amount of SWF files are carried out bulk encryption, thereby improved encryption efficiency greatly, and do not take the hard disk resource of client.
Fig. 3 is the structural representation of SWF file bulk encryption device second embodiment of AS3.0 script exploitation of the present invention, and present embodiment is based on further refinement embodiment illustrated in fig. 2, and as shown in Figure 3, this device also comprises:
Second judge module 14 is used for judging according to described file header information whether described source SWF file is compressed file, if the described source of decompress(ion) SWF file then.
First positioning unit 131, be used for according to described file header information, the length value that obtains the length value of file header in the SWF file of described source and be positioned at described DoABC label each label before, and carry out read group total, obtain the positional value of described DoABC label, directly navigate to described DoABC label according to the positional value of described DoABC label;
Second positioning unit 132, be used for according to described file header information, the length value that obtains the length value of file header in the SWF file of described source and be positioned at described SYMBOLCLASS label each label before, and carry out read group total, obtain the positional value of described SYMBOLCLASS label, directly navigate to described SYMBOLCLASS label according to the positional value of described SYMBOLCLASS label;
Obscure unit 133, be used for resolving described DoABC label and described SYMBOLCLASS label, obtain class name, variable name and function name in the SWF file of described source, class name, variable name and function name in the SWF file of described source are obscured encryption.
The SWF file bulk encryption method that the AS3.0 script that the SWF file bulk encryption device of the AS3.0 script exploitation that the embodiment of the invention provides provides for the execution embodiment of the invention is developed possesses corresponding functional module, does not repeat them here.
In the technical scheme of present embodiment, the user is by uploading the SWF file in batches to the SWF file bulk encryption device of AS3.0 script exploitation, a large amount of SWF files are carried out bulk encryption, thereby improved encryption efficiency greatly, and do not take the hard disk resource of client.
It should be noted that: above embodiment is only unrestricted in order to the present invention to be described, the present invention also is not limited in above-mentioned giving an example, and all do not break away from technical scheme and the improvement thereof of the spirit and scope of the present invention, and it all should be encompassed in the claim scope of the present invention.
Claims (6)
1. the SWF file bulk encryption method of an AS3.0 script exploitation is characterized in that, comprising:
Obtain the source SWF file that the user uploads;
Resolve described source SWF file and obtain file header information, judge according to described file header information whether the release type of described source SWF file belongs to the AVM2 type;
If the release type of described source SWF file is the AVM2 type, then according to described file header information, navigate to DoABC label and SYMBOLCLASS label, described DoABC label and described SYMBOLCLASS label are obscured encryption;
All labels after reorganization is encrypted generate and encrypt the SWF file.
2. the SWF file bulk encryption method of AS3.0 script according to claim 1 exploitation is characterized in that, describedly judges that according to described file header information whether the release type of described source SWF file belongs to before the AVM2 type, also comprises:
Judge according to described file header information whether described source SWF file is compressed file, if the described source of decompress(ion) SWF file then.
3. the SWF file bulk encryption method of AS3.0 script according to claim 1 exploitation, it is characterized in that, it is described if the release type of described source SWF file is the AVM2 type, then according to described file header information, navigate to DoABC label and SYMBOLCLASS label, described DoABC label and described SYMBOLCLASS label are obscured encryption, comprising:
According to described file header information, the length value that obtains the length value of file header in the SWF file of described source and be positioned at described DoABC label each label before, and carry out read group total, obtain the positional value of described DoABC label, directly navigate to described DoABC label according to the positional value of described DoABC label;
According to described file header information, the length value that obtains the length value of file header in the SWF file of described source and be positioned at described SYMBOLCLASS label each label before, and carry out read group total, obtain the positional value of described SYMBOLCLASS label, directly navigate to described SYMBOLCLASS label according to the positional value of described SYMBOLCLASS label;
Resolve described DoABC label and described SYMBOLCLASS label, obtain class name, variable name and function name in the SWF file of described source, class name, variable name and function name in the SWF file of described source are obscured encryption.
4. the SWF file bulk encryption device of an AS3.0 script exploitation is characterized in that, comprising:
Receiver module is used for obtaining the source SWF file that the user uploads;
First judge module is resolved described source SWF file and is obtained file header information, judges according to described file header information whether the release type of described source SWF file belongs to the AVM2 type;
Encrypting module is used for then according to described file header information, navigating to DoABC label and SYMBOLCLASS label if the release type of described source SWF file is the AVM2 type, and described DoABC label and described SYMBOLCLAS S label are obscured encryption;
Recombination module is used for all labels after reorganization is encrypted, and generates and encrypts the SWF file.
5. the SWF file bulk encryption device of AS3.0 script according to claim 5 exploitation is characterized in that described device also comprises:
Second judge module is used for judging according to described file header information whether described source SWF file is compressed file, if the described source of decompress(ion) SWF file then.
6. the SWF file bulk encryption device of AS3.0 script according to claim 5 exploitation is characterized in that described encrypting module comprises:
First positioning unit, be used for according to described file header information, the length value that obtains the length value of file header in the SWF file of described source and be positioned at described DoABC label each label before, and carry out read group total, obtain the positional value of described DoABC label, directly navigate to described DoABC label according to the positional value of described DoABC label;
Second positioning unit, be used for according to described file header information, the length value that obtains the length value of file header in the SWF file of described source and be positioned at described SYMBOLCLASS label each label before, and carry out read group total, obtain the positional value of described SYMBOLCLASS label, directly navigate to described SYMBOLCLASS label according to the positional value of described SYMBOLCLASS label;
Obscure the unit, be used for resolving described DoABC label and described SYMBOLCLASS label, obtain class name, variable name and function name in the SWF file of described source, class name, variable name and function name in the SWF file of described source are obscured encryption.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310120596.4A CN103207958B (en) | 2013-04-09 | 2013-04-09 | The SWF files in batch encryption method of AS3.0 script exploitation and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310120596.4A CN103207958B (en) | 2013-04-09 | 2013-04-09 | The SWF files in batch encryption method of AS3.0 script exploitation and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103207958A true CN103207958A (en) | 2013-07-17 |
CN103207958B CN103207958B (en) | 2015-11-18 |
Family
ID=48755175
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310120596.4A Active CN103207958B (en) | 2013-04-09 | 2013-04-09 | The SWF files in batch encryption method of AS3.0 script exploitation and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103207958B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109740314A (en) * | 2018-12-27 | 2019-05-10 | 杭州当虹科技股份有限公司 | A kind of method that SWF obscures encryption |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3898739B1 (en) * | 2006-11-17 | 2007-03-28 | 株式会社東芝 | Information storage medium, information recording method and apparatus, and information reproducing apparatus |
CN101222624A (en) * | 2007-12-07 | 2008-07-16 | 四川长虹电器股份有限公司 | Multimedia data encryption method based on AVI format |
CN101626293A (en) * | 2008-07-09 | 2010-01-13 | 上海格尔软件股份有限公司 | Method for encryption protection and decryption of data |
CN101980238A (en) * | 2010-11-12 | 2011-02-23 | 四川长虹电器股份有限公司 | Method for encrypting RM/RMVB file |
-
2013
- 2013-04-09 CN CN201310120596.4A patent/CN103207958B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3898739B1 (en) * | 2006-11-17 | 2007-03-28 | 株式会社東芝 | Information storage medium, information recording method and apparatus, and information reproducing apparatus |
CN101222624A (en) * | 2007-12-07 | 2008-07-16 | 四川长虹电器股份有限公司 | Multimedia data encryption method based on AVI format |
CN101626293A (en) * | 2008-07-09 | 2010-01-13 | 上海格尔软件股份有限公司 | Method for encryption protection and decryption of data |
CN101980238A (en) * | 2010-11-12 | 2011-02-23 | 四川长虹电器股份有限公司 | Method for encrypting RM/RMVB file |
Non-Patent Citations (2)
Title |
---|
倪应华等: "SWF矢量动画解析框架设计", 《计算机系统应用》, vol. 19, no. 3, 15 March 2010 (2010-03-15), pages 202 - 205 * |
王明瑞: "对SWF文件实现加密保护", 《福建电脑》, no. 3, 25 March 2012 (2012-03-25), pages 140 - 158 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109740314A (en) * | 2018-12-27 | 2019-05-10 | 杭州当虹科技股份有限公司 | A kind of method that SWF obscures encryption |
Also Published As
Publication number | Publication date |
---|---|
CN103207958B (en) | 2015-11-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9195844B2 (en) | System and method for securing sensitive data | |
CN106406846B (en) | Display interface creating method and device | |
CN104503780A (en) | Method and device for providing application channel packet | |
CN107908632B (en) | Website file processing method and device, website file processing platform and storage medium | |
CN104602238A (en) | Wireless network connecting method, device and system | |
CN104284238A (en) | Video playing method and device based on two-dimensional code | |
CN104462522A (en) | File on-line previewing method, terminal and server | |
CN105141567A (en) | Interactive data processing method and system of terminal application and service end and interaction method | |
KR20120048525A (en) | Method and apparatus for controlling remote device via short messaging service | |
CN110225510A (en) | Method and apparatus for burning embedded SIM card | |
CN113448817A (en) | Page screen recording method and device and storage medium | |
CN112506878A (en) | File processing method and device, storage medium and electronic equipment | |
CN103401931B (en) | A kind of method and system for downloading file | |
KR20170069337A (en) | Method and apparatus for protecting application and program made by the method | |
CN107463536A (en) | A kind of method and system for realizing document in online preview server in Android device | |
JP2009252153A (en) | Information processing device and information processing method, and computer program | |
JP2009252153A5 (en) | ||
CN107644168B (en) | Information extraction method, terminal and computer readable storage medium | |
CN105677730A (en) | Method and device for reading webpage resources and electronic equipment | |
CN105224870A (en) | Suspected virus applies the method and apparatus uploaded | |
CN110662089A (en) | Bullet screen receiving and processing method, storage medium, electronic equipment and system | |
CN104598782A (en) | Data packaging and analysis method and device | |
CN104821982A (en) | Data recovery method | |
CN105760202A (en) | Server, computing equipment, software compression pack processing device and method | |
CN112118564A (en) | Method, system and computer program product for generating a personalized profile package |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |