DEV Community

Discussion on: A simple way to detect devtools.

Collapse
 
jrsofty profile image
Jason Reed

Why is it important to recognize that the dev tools are open?

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
jrsofty profile image
Jason Reed

It's very naive to think that detecting dev tools will prevent someone from copying your code. So long as your code is delivered to a browser it can be copied. Never think that anything you send to a browser is secure.

Collapse
 
taufik_nurrohman profile image
Taufik Nurrohman

Maybe to prevent XSS, or…

Back then, there were people using JavaScript to disable selection and right-click event to prevent them copying the article contents. This must be something like that.

Collapse
 
joshcheek profile image
Josh Cheek

It would be nice if banks would detect this, b/c a common scam is for the scammer to get access to the target's computer, have them log into their bank, and then use the dev tools to edit the DOM to make it look like there was an unintentionally large deposit. Then they ask the target to send them a refund for the excess money that appears to be deposited into their account, but never was. The bank could realize that they had the devtools open shortly before trying to purchase thousands of dollars worth of gift cards, and then decline the transaction under the assumption that the person is being scammed.