Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avoid/Bypass Dev tools detection in Chrome?

I've been trying to get a video source from a web site but when I open the dev tools to do so, It shows me this message: "Dont open Developer Tools".

So far I have tried:

  • Turn off javascript ->doesn't work, doesn't load the video.

  • Find the function:

olplayer.src({type:"application/x-mpegURL",src:"https://127.0.0.1/no_video.mp4.m3u8"});
document.body.innerHTML="";
document.write(" Dont open Developer Tools. ");
throw new Error(" Dont open Developer Tools. ");
self.location.replace('https:'+window.location.href.substring(window.location.protocol.length));

set a breakpoint and reload, run:

Object.defineProperty(window, "console", {configurable: false});

Any ideas how to bypass this protection?

like image 716
glider Avatar asked Dec 14 '19 19:12

glider


1 Answers

You are probably talking about a video hosted on hqq.tv. Their code uses a check() function which does all the nasty magic to block all hacking attempts, so the easiest way to bypass the protection altogether is to disable this function.

Since recently, Chrome supports local overrides for javascript code (I found out about this from this SO thread). A bit nicer explanation on how this works can be found on Medium.

So I went ahead and located the check() function (in my case it was hqq.tv/js/embed.129.js) and added it to Overrides. In the overridden version I found the check() function and added return true; to its beginning:

function check(){return true; var element=new Image(); ...

However, this only disables the Dev Tool protection, but doesn't make your life much easier in terms of saving the video. My own solution doesn't work on hqq.tv, nor had I any luck with the solution suggested on videohelp forum. However, I was able to capture the stream using Stream Recorder Chrome extension.

like image 148
Vlad Nikiforov Avatar answered Sep 20 '22 03:09

Vlad Nikiforov