about how PHP decrypts. NET encrypted content and files inside the database

Source: Internet
Author: User
The company's original website uses. NET, now let me use the PHP revision, now need to export the original database, the discovery is 2 binary data, known that they use the Httppostedfile.inputstream to save the entire file and content stored as 2 streams, but also read bytes (I do not understand), What should I do, please? Ask for advice


Reply to discussion (solution)

What kind of data? At least a picture should be cut

After converting things too long, so no
This is a piece of data I picked (forum character limit, only a small part)
0x424d465c0c0000000000360000002800000058020000c20100000100180000000000105c0c00000000000000000000000000000000004132ab4132a B4132ab4132ab4132ab4132ab4132ab4132ab4132ab4334ad4334ad4132ab3e2fa83d2ea73f30a93e31b13d32c43b31cb3d33cd3e34ce3f34d03e33cf 3e33d03d32cf3d32cf3d32cf3d31d13d31d13d30d23d30d23d30d23d31d13f30d13f32ce3f32ca3f33c94031c84031c8412fc84131c54431c34232bb4 133b13f32ac4132ac4231b04530b54331ba3f31b83c33b93d33bb3f35bd4134c04134c04033bf4033bf4334be4234bc4333bc4234b84032b63f31b441 32b24030b33d2db64131be4434c74337cd4035d23d32d43e33d74034da4231d84231d84 ...

0x424d465c0c0 ...
This is a string that represents a hexadecimal number.

You can use the pack function to restore the original content after you remove the previous 0x after reading
$s = pack (' h* ', substr ($s, 2));

You are example of a BMP picture data

This I have tried to see before, but the use of C, now I use H or C are the same garbled problem, always can not solve, on-line information is a coding problem, my main code has tried, or not, do not know what to do

Thank you for not solving the problem.

Although you have only posted the data fragment, but still can see your data when a BMP picture

 $s = ' 424d465c0c0000000000360000002800000058020000c20100000100180000000000105c0c00000000000000000000000000000000004132ab4132ab4 132ab4132ab4132ab4132ab4132ab4132ab4132ab4334ad4334ad4132ab3e2fa83d2ea73f30a93e31b13d32c43b31cb3d33cd3e34ce3f34d03e33cf3e 33d03d32cf3d32cf3d32cf3d31d13d31d13d30d23d30d23d30d23d31d13f30d13f32ce3f32ca3f33c94031c84031c8412fc84131c54431c34232bb413 3b13f32ac4132ac4231b04530b54331ba3f31b83c33b93d33bb3f35bd4134c04134c04033bf4033bf4334be4234bc4333bc4234b84032b63f31b44132 B24030b33d2db64131be4434c74337cd4035d23d32d43e33d74034da4231d84231d84 '; $s = pack (' h* ', $s); $FILE = Unpack ("Vfile_ Type/vfile_size/vreserved/vbitmap_offset ", substr ($s, 0,));p Rint_r ($FILE); $BMP = Unpack (' vheader_size/vwidth/ Vheight/vplanes/vbits_per_pixel '. '/vcompression/vsize_bitmap/vhoriz_resolution '. '/vvert_resolution/vcolors_used/vcolors_important ', substr ($s, 14, 40)); Print_r ($BMP); 
Array (    [File_type] = 19778    [file_size] = 810054    [reserved] = 0    [Bitmap_offset] + 54) Array (    [header_size] = [    width] = [    height] = [    planes] = 1    [bits_per_ Pixel]    [compression] = 0    [Size_bitmap] = 810000    [horiz_resolution] = 0    [vert_ Resolution] = 0    [colors_used] = 0    [colors_important] + 0)
  • 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.