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, #peerinfo, #proto, #request

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

#auto_cl, #body, #body_bytes_left, #bufq, #chunk_max_size, #chunk_min_size, #compress, #error, #headers, #incomplete, #inside_chunk, #keepalive, #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, #get_cookies_parsed, #get_hidden_inputs, #get_html_document, #get_html_meta_elements, #get_html_scripts, #get_json_document, #get_xml_document, #initialize, #redirect?, #redirection, #update_cmd_parts

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

#[], #[]=, #check_100, #chunk, #cmd_string, #completed?, #from_s, #initialize, #output_packet, #parse, #parse_body, #parse_header, #reset, #reset_except_queue, #to_s, #to_terminal_output, #update_cmd_parts

Constructor Details

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

Class Method Details

.emptyObject


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

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

.from_rex_response(response) ⇒ Object


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

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


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

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

Instance Method Details

#timed_outObject


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

def timed_out
  @timed_out = true
end

#timed_out?Boolean

Returns:

  • (Boolean)

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

def timed_out?
  !!@timed_out
end