Sha256: b1c8ac814e9ae25d2e7b31603d73de47255bb261387e69485b4a59b9cdcc9f35
Contents?: true
Size: 795 Bytes
Versions: 3
Compression:
Stored size: 795 Bytes
Contents
module WWMD class Page # copy and paste from burp request windows # page object gets set with headers and url (not correct) # returns [headers,form] # form = page.from_paste def from_paste self.enable_cookies = false req = %x[pbpaste] return false if not req h,b = req.chomp.split("\r\n\r\n",2) oh = h h = h.split("\r\n") m,u,p = h.shift.split(" ") return nil unless m =~ (/^(POST|GET)/) self.url = self.base_url + u self.headers_from_array(h) self.body_data = b self.set_data form = b.to_form form.action = @urlparse.parse(self.base_url, u).to_s [oh,form] end def resp_paste self.body_data = %x[pbpaste].split("\r\n\r\n",2)[1] self.set_data end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
iZsh-wwmd-0.2.19 | lib/wwmd/page/helpers.rb |
miketracy-wwmd-0.2.17 | lib/wwmd/page/helpers.rb |
miketracy-wwmd-0.2.19 | lib/wwmd/page/helpers.rb |