lib/msf/core/payload/windows/reverse_http.rb
def generate_uri

    uri_req_len = datastore['HTTPStagerURILength'].to_i

    # Choose a random URI length between 30 and 255 bytes
    if uri_req_len == 0
      uri_req_len = 30 + rand(256-30)
    end

    if uri_req_len < 5
      raise ArgumentError, "Minimum HTTPStagerURILength is 5"
    end

    "/" + generate_uri_checksum(Msf::Handler::ReverseHttp::URI_CHECKSUM_INITW, uri_req_len)
  end
#
# Generate the URI for the initial stager
#
Generate the URI for the initial stager
Generate the URI for the initial stager
def generate_uri
    uri_req_len = datastore['HTTPStagerURILength'].to_i
    if uri_req_len == 0
      uri_req_len = 30 + rand(256-30)
    end
    if uri_req_len < 5
      raise ArgumentError, "Minimum HTTPStagerURILength is 5"
    end
    "/" + generate_uri_checksum(Msf::Handler::ReverseHttp::URI_CHECKSUM_INITW, uri_req_len)
  end
def generate_uri uri_req_len = datastore [ 'HTTPStagerURILength' ] . to_i if uri_req_len == 0 uri_req_len = 30 + rand ( 256 - 30 ) end if uri_req_len < 5 raise ArgumentError , "Minimum HTTPStagerURILength is 5" end "/" + generate_uri_checksum ( Msf :: Handler :: ReverseHttp :: URI_CHECKSUM_INITW , uri_req_len ) end
Generate the URI for the initial stager
Generate the URI for the initial stager
# Choose a random URI length between 30 and 255 bytes