palantir / phishcatch

A browser extension and API server for detecting corporate password use on external websites
https://github.com/palantir/phishcatch/wiki
Apache License 2.0
91 stars 20 forks source link

[enhancement] Adding Parameter in config for better Username Detection. #29

Closed 0xMirasio closed 1 year ago

0xMirasio commented 3 years ago

Add a new parameters in debug configuration which taking as input a string : idusername This string should be the value of the id on the MainPage, to detect the username.

for example, a main login page with the html code : <input class="mdc-text-field__input pwd" type="password" id="pwd_pass" size="25" name="password" value="">

The Parameter isUsername should be pwd_pass, then the extension can automatically take the username when logging and store it for better logging/information.

New code should have for example in content.js

function runUsernameScraper() { const username = <HTMLInputElement>document.getElementById(IdUsername) if (username != null) { return username.value }

carbureted commented 3 years ago

👍 Great feedback. Will add this.