From 27c1e757e1dd5d74825294ab568f8eeaca18652f Mon Sep 17 00:00:00 2001 From: James Lee Date: Wed, 4 May 2011 08:50:38 +0000 Subject: [PATCH] add post count to the banner git-svn-id: file:///home/svn/framework3/trunk@12537 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/base/simple/statistics.rb | 9 ++++++++- lib/msf/ui/console/command_dispatcher/core.rb | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/msf/base/simple/statistics.rb b/lib/msf/base/simple/statistics.rb index 05dec352a1..9d2d2974d6 100644 --- a/lib/msf/base/simple/statistics.rb +++ b/lib/msf/base/simple/statistics.rb @@ -52,6 +52,13 @@ class Statistics framework.auxiliary.length end + # + # Returns the number of post modules in the framework. + # + def num_post + framework.post.length + end + # # Returns the number of stages in the framework. # @@ -75,4 +82,4 @@ class Statistics end end -end \ No newline at end of file +end diff --git a/lib/msf/ui/console/command_dispatcher/core.rb b/lib/msf/ui/console/command_dispatcher/core.rb index 14a69e4941..5b8c257751 100644 --- a/lib/msf/ui/console/command_dispatcher/core.rb +++ b/lib/msf/ui/console/command_dispatcher/core.rb @@ -242,7 +242,7 @@ class Core banner = "%cya" + Banner.to_s + "%clr\n\n" banner << " =[ %yelmetasploit v#{Msf::Framework::Version} [core:#{Msf::Framework::VersionCore} api:#{Msf::Framework::VersionAPI}]%clr\n" banner << "+ -- --=[ " - banner << "#{framework.stats.num_exploits} exploits - #{framework.stats.num_auxiliary} auxiliary\n" + banner << "#{framework.stats.num_exploits} exploits - #{framework.stats.num_auxiliary} auxiliary - #{framework.stats.num_post} post\n" banner << "+ -- --=[ " oldwarn = nil