About web script decryption

Source: Internet
Author: User

A netizen gave me an encrypted webpage named "Taiyi Qianyi", with the script being added using Microsoft tools. encode], said that the decryption software can not be decrypted, I found that the page code is UTF-8, changed to ANSI, the use of scrdec smooth decryption, it seems that the encoding problem sometimes full of useful, if the decryption fails, you can try to check the encoding format, because the current decoding tool seems to be for ANSI encoding!

Appendix scrdec1.3 source code [c code]:

/*************************************** *******************************/
/* Scrdec. c-Decoder for Microsoft Script Encoder */
/* Version 1.3 */
/**/
/* COPYRIGHT :*/
/* (C) 2000/2001 MrBrownstone, mrbrownstone@virtualconspiracy.com */
/* Some changes by Joe Steele to correct minor stuff */
/**/
/* DISCLAIMER :*/
/* This program is for demonstrative and educational purposes only .*/
/* Use of this program is at your own risk. The author cannot be held */
/* Responsible if any laws are broken by use of this program .*/
/**/
/* If you use or distribute this code, this message shocould be held */
/* Intact. Also, any program based upon this code shocould display */
/* Copyright message and the disclaimer .*/
/*************************************** *******************************/

# Include
# Include
# Include

# Define LEN_OUTBUF 64
# Define LEN_INBUF 1024

# Define STATE_INIT_COPY 100
# Define STATE_COPY_INPUT 101
# Define STATE_SKIP_ML 102
# Define STATE_CHECKSUM 103
# Define STATE_READLEN 104
# Define STATE_DECODE 105
# Define STATE_UNESCAPE 106
# Define STATE_FLUSHING 107
# Define STATE_DBCS 108
# Define STATE_INIT_READLEN 109

Unsigned char rawData [292] = {
0x64, 0x37, 0x69, 0x50, 0x7E, 0x2C, 0x22, 0x5A, 0x65, 0x4A, 0x45, 0x72,
0x61, 0x3A, 0x5B, 0x5E, 0x79,0x66, 0x5D, 0x59,0x75, 0x5B, 0x27, 0x4C,
0x45, 0x60, 0x76, 0x62, 0x2A, 0x65, 0x4D, 0x43,
0x5F, 0x51,0x33, 0x7E, 0x53,0x42, 0x4F, 0x52,0x20, 0x52,0x20, 0x63,
0x7A, 0x26, 0x4A, 0x21,0x54, 0x5A, 0x46,0x71,0x38, 0x20, 0x2B, 0x79,
0x26,0x66,0x32, 0x63, 0x2A, 0x57, 0x2A, 0x58, 0x6C, 0x76, 0x7F, 0x2B,
0x47, 0x7B, 0x46, 0x25, 0x30,0x52, 0x2C, 0x31, 0x4F, 0x29, 0x6C, 0x3D,
0x69,0x49,0x70, 0x3F, 0x3F, 0x3F, 0x27,0x78, 0x7B, 0x3F, 0x3F, 0x3F,
0x67, 0x5F, 0x51, 0x3F, 0x3F, 0x3F, 0x62,0x29, 0x7A, 0x41,0x24, 0x7E,
0x5A, 0x2F, 0x3B, 0x66,0x39,0x47, 0x32, 0x33,0x41, 0x73, 0x6F, 0x77,
0x4D, 0x56, 0x75, 0x5F, 0x26, 0x39,0x78,
0x7C, 0x46, 0x6E, 0x53, 0x4A, 0x64, 0x48, 0x5C, 0x74, 0x31,0x48, 0x67,
0x72,0x36, 0x7D, 0x6E, 0x4B, 0x68, 0x70, 0x7D, 0x35, 0x49, 0x5D, 0x22,
0x3F, 0x6A, 0x55, 0x4B, 0x50, 0x3A, 0x6A, 0x69,0x60, 0x2E, 0x23, 0x6A,
0x7F, 0x09,0x71, 0x28,0x70, 0x6F, 0x35,0x65,0x49, 0x7D, 0x74, 0x5C,
0x24, 0x2C, 0x5D, 0x2D, 0x77,0x27, 0x54,0x44,0x59, 0x37, 0x3F, 0x25,
0x7B, 0x6D, 0x7C, 0x3D, 0x7C, 0x23, 0x6C, 0x43, 0x6D, 0x34,0x38,0x28,
0x6D, 0x5E, 0x31, 0x4E, 0x5B, 0x39, 0x2B, 0x6E, 0x7F, 0x30,0x57,0x36,
0x6F, 0x4C, 0x54, 0x34,0x34, 0x6B, 0x62, 0x4C, 0x25, 0x4E,
0x33,0x56,0x30, 0x56,0x73, 0x5E, 0x3A, 0x68,0x73, 0x78,0x55,0x09,
0x57,0x47, 0x4B, 0x77,0x32, 0x61, 0x3B, 0x35, 0x24, 0x44, 0x2E, 0x4D,
0x2F, 0x64, 0x6B, 0x59, 0x4F, 0x44, 0x45, 0x3B, 0x21, 0x5C, 0x2D, 0x37,
0 x, 0 x, 0x53, 0 x, 0 x, 0x58, 0x58, 0x7A, 0x48, 0x79,0x22, 0x2E,
0x09,0x60,0x50, 0x75, 0x6B, 0x2D, 0x38, 0x4E, 0x29, 0x55, 0x3D, 0x3F,
0x51,0x67, 0x2f
};

Const unsigned char pick_encoding [64] = {
1, 2, 0, 1, 2, 0, 2, 0, 0, 2, 0, 2, 1, 0, 2, 0,
1, 0, 2, 0, 1, 1, 2, 0, 0, 2, 1, 0, 2, 0, 0, 2,
1, 1, 0, 2, 0, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 2,
1, 0, 2, 0, 1, 1, 2, 0, 0, 1, 1, 2, 0, 1, 0, 2
};

Unsigned char transformed [3] [128];
Int digits [0x7b];

Unsigned char unescape (unsigned char c)
{
Static unsigned char escapes [] = "#&! * $ ";
Static unsigned char escaped [] = "<> @";
Int I = 0;

If (c> 127)
Return c;
While (escapes [I])
{
If (escapes [I] = c)
Return escaped [I];
I ++;
}
Return ?;
}

Void maketrans (void)
{
Int I, j;

For (I = 31; I <= 127; I ++)
For (j = 0

Related Article

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.