![浏览器记住密码](https://img-blog.csdnimg.cn/img_convert/851fc275575ee972ed627ced66b6764d.png)
浏览器记住密码
We've all seen something like this:
我们都看到过这样的事情:
![browser remembers a password](https://img-blog.csdnimg.cn/img_convert/f47330e1f8f63b262c1c2b9d92aa7ba3.png)
But you have no idea what the password is. How to get the human-readable version of *******?
但是您不知道密码是什么。 如何获得人类可读的*******版本?
方法1:使用浏览器的开发人员工具 (Method 1: use the browser's developer tools)
Provided you have a reasonably recent browser, just open the Developer tools by right-clicking the input field with the password and then select "Inspect Element".
如果您使用的浏览器是相当新的,则只需右键单击带有密码的输入字段,然后选择“检查元素”,即可打开开发人员工具。
Then find the Console tab (or hit ESC) and type:
然后找到“控制台”选项卡(或按ESC键)并输入:
$0.value
That's it!
而已!
![now you know the password](https://img-blog.csdnimg.cn/img_convert/43b557e91be0deccdf57d4f48bfa3eee.png)
$0
means "active element" so if the above doesn't work it means you've clicked somewhere else and the password field is no longer the active element being inspected. So right-click and inspect it again.
$0
表示“活动元素”,因此,如果以上操作无效,则表示您单击了其他位置,并且密码字段不再是正在检查的活动元素。 因此,右键单击并再次检查。
方法2:小书签 (Method 2: a bookmarklet)
If you don't want to type every time or your browser (looking at you iOS Safari) doesn't offer an easy web dev console, a bookmarket is to the rescue. Here it is:
如果您不想每次都键入内容,或者您的浏览器(看着您的iOS Safari浏览器)不提供便捷的Web开发控制台,那么可以通过书市来解决。 这里是:
javascript:document.querySelectorAll('[type=password]').forEach(f=>f.type='')
Try it: show password
尝试:显示密码
Now install this bookmarklet by right-clicking and bookmarking this link: show password
现在,通过右键单击并添加以下链接的书签来安装此书签:显示密码
Note that iOS Safari doesn't like to bookmark bookmarklets, so you need to: 1. bookmark anything else, e.g. this page 2. then go edit the bookmark and paste the code above (the one that starts with javascript:
)
请注意,iOS Safari不喜欢为书签添加书签,因此您需要:1.将其他内容添加为书签,例如此页面2.然后编辑书签并粘贴上面的代码(以javascript:
开头的代码)
Tell your friends about this post on Facebook and Twitter
在Facebook和Twitter上告诉您的朋友有关此帖子的信息
翻译自: https://www.phpied.com/browser-remembers-your-password-but-you-dont-take-it-back/
浏览器记住密码