javascript - 如果我们无法访问表单 html 文件,是否有预填表单?
问题描述
我有一个包含字段(站点、用户名、密码)的数据库。我希望用户能够通过链接(可能通过电子邮件)与其他用户共享密码。当接收者点击链接时,他必须被重定向到该站点,并在正确的文本框中填写密码和用户名。
网站示例:https ://services.gst.gov.in/services/login
注意:我无权访问此表格。
我想模仿lastpass等密码共享服务提供的功能。它具有这个确切的功能。我想知道用户点击链接后如何填写这些文本框(用户名、密码)。
编辑:我试过用 python Beautiful soup 进行网页抓取。但是像 ICICI 银行这样的网站很少有更严格的证券,所以我无法获得这些字段名称。
解决方案
网址 =https://localhost/form/login.php?username=eliot&pass=123456
登录.php
<html>
<body>
<form>
<input type="text" value="<?php echo $_GET['username'];?>" name="username" placeholder="enter your username">
<input type="password" value="<?php echo $_GET['pass'];?>" name="password" placeholder="enter your password">
<button type="submit">Login<button>
</form>
</body>
</html>
还要注意:通过 GET 共享密码不是一种安全的方式,($_GET = url 参数)
推荐阅读
- r - 用 gt 中的条件信息为单元格着色
- php - 如何使用 phpunit 对 if 语句执行断言
- node.js - 我需要在Angular的每个pdf页面中添加一些设计的页脚
- python - 用于 pySpark 项目的 Azure DevOps CI 管道
- c++ - 在 C++ 中的 3d 数组堆上分配
- android - 如何在android compose中以黑白显示图像
- ios - Not able to create IOS build from Xcode using Flutter code?
- docker - docker run 不能使用 entrypoint.sh 和 exec 形式的命令
- c++ - 使用 C++ 从“-v7.3”mat 文件中读取数据的问题
- ios - 为什么NSObject的实例方法可以作为类方法调用