Muts says "Try harder!" or "Excellent" for the sounds plugin

With the sounds plugin, muts will say "excellent!" when a session
is received. If a session is terminated (either exited or lost),
muts will say "try harder!"
bug/bundler_fix
wchen-r7 2015-11-25 18:06:58 -06:00
parent 8fd2522a59
commit fa32f43ee4
22 changed files with 7 additions and 11 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -14,6 +14,10 @@ module Msf
class Plugin::EventSounds < Msf::Plugin class Plugin::EventSounds < Msf::Plugin
SESSION_CLOSE = 'try_harder'
SESSION_OPEN = 'excellent'
attr_accessor :theme, :base, :queue, :queue_thread attr_accessor :theme, :base, :queue, :queue_thread
include Msf::SessionEvent include Msf::SessionEvent
@ -23,25 +27,17 @@ class Plugin::EventSounds < Msf::Plugin
end end
def on_session_open(session) def on_session_open(session)
event = 'session_open_' + session.type play_sound(SESSION_OPEN)
play_sound(event)
end end
def on_session_close(session, reason='') def on_session_close(session, reason='')
sid = session.sid.to_s play_sound(SESSION_CLOSE)
play_sound('session')
sid.unpack("C*").each do |c|
play_sound("num" + [c].pack("C"))
end
play_sound('closed')
end end
def on_plugin_load def on_plugin_load
play_sound('plugin_load')
end end
def on_plugin_unload def on_plugin_unload
play_sound('plugin_unload')
end end
def start_sound_queue def start_sound_queue
@ -49,7 +45,7 @@ class Plugin::EventSounds < Msf::Plugin
begin begin
while(true) while(true)
while(event = self.queue.shift) while(event = self.queue.shift)
path = ::File.join(self.base, self.theme, "#{event}.wav") path = ::File.join(self.base, self.theme, "#{event}.mp3")
if(::File.exists?(path)) if(::File.exists?(path))
Rex::Compat.play_sound(path) Rex::Compat.play_sound(path)
else else