How does Facebook disable the browser's integrated Developer Tools?

后端 未结 12 1075
予麋鹿
予麋鹿 2020-11-22 06:12

So apparently because of the recent scams, the developer tools is exploited by people to post spam and even used to \"hack\" accounts. Facebook has blocked the developer too

12条回答
  •  时光取名叫无心
    2020-11-22 06:53

    This is actually possible since Facebook was able to do it. Well, not the actual web developer tools but the execution of Javascript in console.

    See this: How does Facebook disable the browser's integrated Developer Tools?

    This really wont do much though since there are other ways to bypass this type of client-side security.

    When you say it is client-side, it happens outside the control of the server, so there is not much you can do about it. If you are asking why Facebook still does this, this is not really for security but to protect normal users that do not know javascript from running code (that they don't know how to read) into the console. This is common for sites that promise auto-liker service or other Facebook functionality bots after you do what they ask you to do, where in most cases, they give you a snip of javascript to run in console.

    If you don't have as much users as Facebook, then I don't think there's any need to do what Facebook is doing.

    Even if you disable Javascript in console, running javascript via address bar is still possible.

    and if the browser disables javascript at address bar, (When you paste code to the address bar in Google Chrome, it deletes the phrase 'javascript:') pasting javascript into one of the links via inspect element is still possible.

    Inspect the anchor:

    Paste code in href:

    Bottom line is server-side validation and security should be first, then do client-side after.

提交回复
热议问题