From ee86bce695ef07c2356746385e1fc73f87a837d0 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Sat, 26 Feb 2022 07:03:33 -0500 Subject: Commit notes from Metasploit CTF 2021 Signed-off-by: Malfurious --- docs/lang/ruby/rack_session_cookie.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/lang/ruby/rack_session_cookie.rb (limited to 'docs/lang') diff --git a/docs/lang/ruby/rack_session_cookie.rb b/docs/lang/ruby/rack_session_cookie.rb new file mode 100644 index 0000000..5b0a62a --- /dev/null +++ b/docs/lang/ruby/rack_session_cookie.rb @@ -0,0 +1,12 @@ +require 'base64' +require 'cgi' + +# 'SessionId' class possibly not provided by import. +# A dummy definition is needed for the Marshal.load() +#require 'rack' +class Rack::Session::SessionId +end + +cookie = "....." + +obj = Marshal.load(Base64.decode64(CGI.unescape(cookie.split("\n").join).split('--').first)) -- cgit v1.2.3