简体   繁体   中英

Is there anyway to Prefill the form if we can't access the form html file?

I have a database with fields (site, username, password). I want a user to be able to share password to other user via a link (may be via e-mail). When the receiver clicks on the link, he must be redirected to the site with password and username filled into proper text-boxes.

example for site: https://services.gst.gov.in/services/login

NOTE: I don't have access to this form.

I want to mimic a feature which is provided by password sharing services like lastpass . Which has this exact feature built. I want to know how can I fill those text boxes(username, password) once user has clicked on link.

Edit: I have tried web scraping with python Beautiful soup. But few sites like ICICI banks have stricter securities so I couldn't get these field names.

url = https://localhost/form/login.php?username=eliot&pass=123456

login.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>

also do a note: sharing password through GET is not a secured way, ($_GET = url parameter)

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