Sha256: abd43a531c50fd7e8a5f452dd54feb92b79c316d758d743bc9ef31b6da622869

Contents?: true

Size: 521 Bytes

Versions: 3

Compression:

Stored size: 521 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'bundler/setup'
require 'ronin/listener/http'

puts "Listening on 127.0.0.1:8080 ..."
puts "Try sending requests to http://localhost:8080/ to test"

begin
  Ronin::Listener::HTTP.listen(host: '127.0.0.1', port: 8080) do |request|
    puts "#{request.method} #{request.path} #{request.version}"

    request.headers.each do |name,value|
      puts "#{name}: #{value}"
    end

    puts request.body if request.body
    puts
  end
rescue Interrupt
  exit(127)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ronin-listener-http-0.1.0 examples/server.rb
ronin-listener-http-0.1.0.rc2 examples/server.rb
ronin-listener-http-0.1.0.rc1 examples/server.rb