plugins/cookie_collector.rb in arachni-0.3 vs plugins/cookie_collector.rb in arachni-0.4
- old
+ new
@@ -1,8 +1,8 @@
=begin
Arachni
- Copyright (c) 2010-2011 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
+ Copyright (c) 2010-2012 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
This is free software; you can copy and distribute and modify
this program under the term of the GPL v2.0 License
(See LICENSE file for details)
@@ -15,27 +15,19 @@
# Simple cookie collector
#
# @author: Tasos "Zapotek" Laskos
# <tasos.laskos@gmail.com>
# <zapotek@segfault.gr>
-# @version: 0.1.2
+# @version: 0.1.3
#
class CookieCollector < Arachni::Plugin::Base
- #
- # @param [Arachni::Framework] framework
- # @param [Hash] options options passed to the plugin
- #
- def initialize( framework, options )
- super( framework, options )
- end
-
def prepare
@cookies = []
end
- def run( )
+ def run
@framework.http.add_on_new_cookies {
|cookies, res|
update( cookies, res )
}
end
@@ -70,20 +62,28 @@
end
register_results( @cookies )
end
+ def self.distributable?
+ true
+ end
+ def self.merge( results )
+ results.flatten
+ end
+
+
def self.info
{
:name => 'Cookie collector',
:description => %q{Monitors and collects cookies while establishing a timeline of changes.
WARNING: Highly discouraged when the audit includes cookies.
It will log thousands of results leading to a huge report,
highly increased memory and CPU usage.},
:author => 'Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>',
- :version => '0.1',
+ :version => '0.1.3',
}
end
end