Skip to content

Instantly share code, notes, and snippets.

@snyff
Created July 7, 2012 01:03
Show Gist options
  • Save snyff/3063671 to your computer and use it in GitHub Desktop.
Save snyff/3063671 to your computer and use it in GitHub Desktop.
Saturday morning
require 'koriand3r'
@pages = []
def run()
requests.extract(:uri) do |c|
name = c.split("=")[0]
@pages << name unless @pages.include?(name)
end
end
def template(type=:txt)
case type
when :html
temp = <<EOF
The Following pages have been visited:
<ul>
<% @pages.each do |c|%>
<li><%=h c %></li>
<% end %>
</ul>
EOF
else
temp = <<EOF
The Following pages have been visited:
<% @pages.each do |c|%>
- <%= c %>
<% end %>
EOF
end
return ERB.new(temp,0, '>')
end
require 'koriand3r'
@cookies = []
def run()
responses.extract(:cookies) do |c|
name = c.split("=")[0]
@cookies << name unless @cookies.include?(name)
end
end
def template(type=:txt)
case type
when :html
temp = <<EOF
The Following cookies have been received:
<ul>
<% @cookies.each do |c|%>
<li><%=h c %></li>
<% end %>
</ul>
EOF
else
temp = <<EOF
The Following cookies have been received:
<% @cookies.each do |c|%>
- <%= c %>
<% end %>
EOF
end
return ERB.new(temp,0, '>')
end
% ruby example2.rb -i burp:console.pntstr.com -o txt
The Following pages have been visited:
- /login
- /
- /interviewees
- /interviewees/4fa63ab230210d165f000006
- /interviewees/new
- /questions
- /myaccount
- /logout
% ruby example3.rb -i burp:console.pntstr.com -o html
The Following cookies have been received:
<ul>
<li>rack.session</li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment