summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2022-02-26 07:03:33 -0500
committerMalfurious <m@lfurio.us>2022-02-26 07:03:33 -0500
commitee86bce695ef07c2356746385e1fc73f87a837d0 (patch)
tree2ecb446e788009487aa790e437b4f30eee6b00df /docs
parent7bf3df5ca773cb6141afcec2fe1c830c0cbed4a6 (diff)
downloadlib-des-gnux-ee86bce695ef07c2356746385e1fc73f87a837d0.tar.gz
lib-des-gnux-ee86bce695ef07c2356746385e1fc73f87a837d0.zip
Commit notes from Metasploit CTF 2021
Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'docs')
-rw-r--r--docs/lang/ruby/rack_session_cookie.rb12
1 files changed, 12 insertions, 0 deletions
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))