Password decryption for a jsp site

Source: Internet
Author: User

Password decryption for a jsp site

On the login page, you can see the following in the source code:
Md5.decrypt (StrPwd)
I realized that this means that the encrypted user password stored in the database can be decrypted, and the name "md5" is just a disguise.

Com. b. s. l. u. MD5, but I did not find this class file in the class subdirectory of the WEB-INF directory, and later realized that it was in jar, So I downloaded a jar file under the lib directory.

Jar xvf that. jar files can be decompressed as needed, but the compiling environment of this server is very unusual. the java files installed on my computer cannot work and cannot be decompressed using the tool, finally, run jar xvf on the server and decompress it. Find the MD5.class

I thought it would be easy to decompile the class to get the java source code and then rewrite it in a handy language based on the algorithm for batch decryption. But the reality is cruel. This class file causes several decompilers to report errors, finally, The Decompilation failed.

Second, I directly wrote a jsp file and uploaded it to the server. The rough content is rough and can be used in short.

<% @ Page import = MD5 %> <% @ page contentType = text/html; charset = UTF-8 %> <% String pwd = request. getParameter (pwd); String strNewPwd =; MD5 md5 = new MD5 (); if (!. Equals (pwd) {strNewPwd = md5.decrypt (pwd, key12345); out. println (strNewPwd. trim ();} %>

 

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.