emonti-buby 1.1.4 → 1.1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/buby.gemspec +1 -1
- data/lib/buby.rb +9 -3
- metadata +1 -1
data/History.txt
CHANGED
data/buby.gemspec
CHANGED
data/lib/buby.rb
CHANGED
@@ -644,12 +644,18 @@ class Buby
|
|
644
644
|
# urlrx = optional: regular expression to match urls against
|
645
645
|
# statefile = optional: filename for a burp session file to temporarily load
|
646
646
|
# and harvest from.
|
647
|
+
#
|
648
|
+
# Takes an optional block as additional 'select' criteria for cookies.
|
649
|
+
# The block return value of true/false will determine whether a cookie is
|
650
|
+
# string is selected.
|
647
651
|
def harvest_cookies_from_history(cookie=nil, urlrx=nil, statefile=nil)
|
648
652
|
ret = []
|
649
653
|
search_proxy_history(statefile, urlrx) do |hrr|
|
650
|
-
|
651
|
-
|
652
|
-
|
654
|
+
if heads=hrr.rsp_headers
|
655
|
+
ret += heads.select do |h|
|
656
|
+
h[0].downcase == 'set-cookie' and (not block_given? or yield(h[1]))
|
657
|
+
end.map{|h| h[1]}
|
658
|
+
end
|
653
659
|
end
|
654
660
|
return ret
|
655
661
|
end
|