简体   繁体   中英

How to find the source code for this Javascript function in Chrome?

I'm trying to write a python script to automate logging on to this website and then scraping the contents:

在此处输入图像描述

Before submitting the form, Javascript on the page gets called on the password to MD5 encrypt it. The encryption function is called calcMD5() and as you can see from the image above, calcMD5("MyPassword") == "48503dfd58720bd5ff35c102065a52d7" . I cannot find the Javascript definition for this function calcMD5 . Can someone tell me where I can find it so that I can reverse-engineer it in Python?

Are you interested in this for the exercise of translating the code, or do you just want to be able to get the job done?

If the latter, it seems there's already an MD5 hash function available for Python:

https://docs.python.org/2/library/hashlib.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM