Class: Msf::Auxiliary::Web::HTTP::Response

Inherits:
Rex::Proto::Http::Response show all
Defined in:
lib/msf/core/auxiliary/web/http.rb

Instance Attribute Summary

Attributes inherited from Rex::Proto::Http::Response

#code, #count_100, #message, #proto, #request

Attributes inherited from Rex::Proto::Http::Packet

#auto_cl, #body, #bufq, #chunk_max_size, #chunk_min_size, #compress, #error, #headers, #incomplete, #max_data, #state, #transfer_chunked

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Rex::Proto::Http::Response

#check_100, #cmd_string, #get_cookies, #initialize, #redirect?, #redirection, #update_cmd_parts

Methods inherited from Rex::Proto::Http::Packet

#[], #[]=, #chunk, #cmd_string, #completed?, #from_s, #initialize, #parse, #reset, #reset_except_queue, #to_s

Constructor Details

This class inherits a constructor from Rex::Proto::Http::Response

Class Method Details

.emptyObject


48
49
50
# File 'lib/msf/core/auxiliary/web/http.rb', line 48

def self.empty
  new( 0, '' )
end

.from_rex_response(response) ⇒ Object


38
39
40
41
42
43
44
45
46
# File 'lib/msf/core/auxiliary/web/http.rb', line 38

def self.from_rex_response( response )
  return empty if !response

  r = new( response.code, response.message, response.proto )
  response.instance_variables.each do |iv|
    r.instance_variable_set( iv, response.instance_variable_get( iv ) )
  end
  r
end

.timed_outObject


52
53
54
55
56
# File 'lib/msf/core/auxiliary/web/http.rb', line 52

def self.timed_out
  r = empty
  r.timed_out
  r
end

Instance Method Details

#timed_outObject


62
63
64
# File 'lib/msf/core/auxiliary/web/http.rb', line 62

def timed_out
  @timed_out = true
end

#timed_out?Boolean


58
59
60
# File 'lib/msf/core/auxiliary/web/http.rb', line 58

def timed_out?
  !!@timed_out
end