Skip to content

Site detecting use of debugger #25

Description

@Taniniver

Hi

I'm using Anti Anti Debug version 1.0.7 in Google Chrome version 145.0.7632.117

The extension is allowed on all sites.

A page I'm visiting (I won't post the link here in case they find it and adapt their site) has an iframe on it with some content, and the following javascript within the contents of that iframe:

<script>
        (function() {
            const detectDevTools = () => {
                const threshold = 100;
                const check = () => {
                    const start = performance.now();
                    debugger;
                    return performance.now() - start > threshold;
                };

                if (check()) {
                    emitEvent(true);
                }
            };

            const emitEvent = (isOpen) => {
                console.log(`DevTools is ${isOpen ? 'open' : 'closed'}`);
                if (isOpen) {
                    window.location.href = "https://example.com";
                }
            };

            setInterval(detectDevTools, 500);
                                debugger;

        })();
    </script>

If I open then close DevTools (in it's own window) the iframe then redirects to example.com

Hope you can help

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions