BVB Source Codes

goreplay Show echo.rb Source code

Return Download goreplay: download echo.rb Source code - Download goreplay Source code - Type:.rb
  1. #!/usr/bin/env ruby
  2. # encoding: utf-8
  3. while data = STDIN.gets # continiously read line from STDIN
  4.   next unless data
  5.   data = data.chomp # remove end of line symbol
  6.  
  7.   decoded = [data].pack("H*") # decode base64 encoded request
  8.  
  9.   # dedoded value is raw HTTP payload, example:
  10.   #  
  11.   #   POST /post HTTP/1.1
  12.   #   Content-Length: 7
  13.   #   Host: www.w3.org
  14.   #
  15.   #   a=1&b=2"
  16.  
  17.   encoded = decoded.unpack("H*").first # encoding back to base64
  18.  
  19.   # Emit request back
  20.   # You can skip this if want to filter out request
  21.   STDOUT.puts encoded
  22. end
  23.  
downloadecho.rb Source code - Download goreplay Source code
Related Source Codes/Software:
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10
django-rest-framework - Web APIs for Django. http:/... 2017-06-10
lectures - Oxford Deep NLP 2017 course 2017-06-10
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
postal - 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10

 Back to top