简体   繁体   English

如何在 Chrome 中找到此 Javascript function 的源代码?

[英]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:我正在尝试编写一个 python 脚本来自动登录到该网站,然后抓取内容:

在此处输入图像描述

Before submitting the form, Javascript on the page gets called on the password to MD5 encrypt it.在提交表单之前,页面上的 Javascript 会调用密码进行 MD5 加密。 The encryption function is called calcMD5() and as you can see from the image above, calcMD5("MyPassword") == "48503dfd58720bd5ff35c102065a52d7" .加密 function 称为calcMD5() ,如上图所示, calcMD5("MyPassword") == "48503dfd58720bd5ff35c102065a52d7" I cannot find the Javascript definition for this function calcMD5 .我找不到这个 function calcMD5的 Javascript 定义。 Can someone tell me where I can find it so that I can reverse-engineer it in Python?有人能告诉我在哪里可以找到它,以便我可以在 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:如果是后者,似乎已经有一个 MD5 hash function 可用于 Python:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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