A
A
AleMik2019-05-01 11:31:42
Drupal
AleMik, 2019-05-01 11:31:42

How to generate encrypted password hash for Drupal 7 using js?

Greetings.
It is necessary to exchange data with the Drupal site from the chrome extension. For the exchange, it is supposed to use the login and password from the account on the site. When requesting a site, a login and an encrypted password are transmitted, and if there is a user with such data, the necessary data is returned to him.
There was a glitch with the generation of an encrypted js password in an extension for Drupal 7. I spent several hours in search engines, and did not find the answer. If someone can share such a function, I will be grateful. You do not want to send the password in open form.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
profesor08, 2019-05-01
@profesor08

Well, since the password is encrypted on the client in the browser, then some js code is responsible for this. You look at the page code, find the form you need and see what id, classes and attributes are there for the password field. Next, you search for them in js files that are loaded on the page. If you are an experienced user, then in devtools you will look at what events are hung on the form, on the password field, on the button, you will find the necessary code area by them.
And you can forget about it and encrypt the password in your own way, and decrypt it on the site.

A
AleMik, 2019-05-01
@AleMik

Made unique generated keys tied to each user. By analogy with various captcha solving services. The extension will send it instead of a login-password pair.
But if, nevertheless, someone has a password encryption function in js similar to drupal 7, it would be interesting to look at the future.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question