Solution: how to encrypt the image address (50 points)

Source: Internet
Author: User
Solution: This image address encryption method is how to achieve (50 points) to see a website is like this to process the image link, solution: for example, there is a picture, name: p979977364-4.jpg if the input: http://www.anhhuynh.com/cdn/pub/0h3htoeyrb solution: how the image address encryption method is implemented (50 points)
You can see that a website processes Image links in this way:
For example, there is an image named: p979977364-4.jpg
If you enter: http://www.anhhuynh.com/cdn/pub/0h3htoeyrbvs/0/null/mh/7upcxhvl93fgm-0gnob3/s10/v2/p979977364-4.jpg
The page cannot be displayed because an internal server error has occurred.
But if you add :? Ts = 5 & tk = t3FhdyDPD0AQAWV5ExDzijXY1Br6SXguS-4o-5VVVN8 = you can open the picture.
Do you know how this works? (Take this image as an example)


------ Solution --------------------
This is not encryption. it should be a common APACHE urlrewrite technology. Why are there URLs? And &, typical url get. To ensure database security, HACK is not allowed to guess its database structure, and an MD5 conversion is performed. LZ can use FIREBUG to find its real address.

The real image encryption technology should be base64 or the like. For example: data: image/gif; base64, bytes % 3D

------ Solution --------------------
He should use rewritetechnology, such as p979977364-4.jpg may be interpreted as showimage. php? Ts = 5 & tk = t3FhdyDPD0AQAWV5ExDzijXY1Br6SXguS-4o-5VVVN8 = & pid = $1 & type = $2
However, the previous/0h3htoeyrbvs/0/null/mh/7upcxhvl93fgm-0gnob3/s10/v2 may also be part of the parameters used in the rule, such
RewriteRul ^ (. *)/cdn/pub/([a-z0-9A-Z] +)/([0-9] +)/([a-z0-9A-Z] +)/([a-z0-9A-Z] +) /([a-z0-9A-Z \-] +)/([a-z0-9A-Z] +)/([a-z0-9A-Z] +)/([a-z0-9A-Z] +)-([a-z0-9A-Z] + )\. jpg? Ts = ([0-9] +) & tk = ([a-zA-Z0-9 = \-] +) $1/cdn/pub/shoimage. php? P1 = $2 & p2 = $3 & p3 = $4 & p4 = $5 & p5 = $6 & p6 = $7 & p7 = $8 & p8 = $9 & p9 = $10 & ts = $11 & tk = $12

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.