[As3] as3 uses bytearray to encrypt SWF files. For more information, see

Source: Internet
Author: User

[As3] as3 uses bytearray for the SWF file encoding and encryption instance. In short, it reads SWF in binary format, makes some changes to bytearray, and then stores it into a SWF file. This job may also be performed by the server.

Step 1: Create a SWF file to be encrypted. Assume the file name is asset.swf.

Step 2: Create a flash for encryption:

  1. VaR ul: urlloader = new urlloader ();
  2. Ul. dataformat = urlloaderdataformat. Binary;
  3. Ul. addeventlistener (event. Complete, oncomplete );
  4. Ul. Load (New URLRequest ("asset.swf "));
  5. Function oncomplete (E: Event): void {
  6. VaR BA: bytearray = (e.tar get as urlloader). Data;
  7. Ba. Compress (); // cuplayer.com prompt: here we need to replace it with a complicated processing job.
  8. VaR fr: filereference = new filereference ();
  9. Fr. Save (BA, "asset_c.swf ");
  10. }


Simply put, it is to read SwF in binary format, make some changes to bytearray, and then save it as a SWF file. Of course, this job may also be performed by the server, as long as you want to make any material changes to bytearray.

Step 3: You can use the cracking software to check the newly stored asset_c.swf job and find that it has no effect, because it is essentially not swf format.

Step 4: Develop another flash for reading, that is, to dynamically load asset_c.swf into the main.swf for playing in the future:

  1. VaR ul: urlloader = new urlloader ();
  2. Ul. dataformat = urlloaderdataformat. Binary;
  3. Ul. addeventlistener (event. Complete, oncomplete );
  4. Ul. Load (New URLRequest ("asset_c.swf "));
  5. VaR Loader: loader = new loader ();
  6. Addchild (loader );
  7. Function oncomplete (E: Event): void {
  8. VaR BA: bytearray = (e.tar get as urlloader). Data;
  9. Ba. uncompress (); // cuplayer.com prompt: here we want to replace it with a complex processing job.
  10. Loader. loadbytes (BA );
  11. }


For the decryption part, refer to the encryption process and perform reverse encryption.

Sorry, I think you will know that this main.swf is still a clear code and can still be cracked. The above practice is just to make it more difficult to crack, so we have to try to hide the decryption program as complicated as possible to lie to the gentleman!

 

Http://www.cuplayer.com/player/PlayerCodeAs/2013/09271019.html:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.