From f0673cb1ac9e353c17e58b4c1f938df17d58bb74 Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Sun, 3 Apr 2011 17:40:45 +0000 Subject: [PATCH] Tweak to work with FreeBSD, thx for the patch! git-svn-id: file:///home/svn/framework3/trunk@12224 4d416f70-5f16-0410-b530-b9f4589650da --- modules/exploits/multi/http/jboss_bshdeployer.rb | 4 +++- modules/exploits/multi/http/jboss_deploymentfilerepository.rb | 4 +++- modules/exploits/multi/http/jboss_maindeployer.rb | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/exploits/multi/http/jboss_bshdeployer.rb b/modules/exploits/multi/http/jboss_bshdeployer.rb index 8c42e86ca9..25ef6c544a 100644 --- a/modules/exploits/multi/http/jboss_bshdeployer.rb +++ b/modules/exploits/multi/http/jboss_bshdeployer.rb @@ -239,10 +239,12 @@ EOT return nil end - if (res.body =~ //m) + if (res.body =~ //m) os = $1 if (os =~ /Linux/i) return 'linux' + elsif (os =~ /FreeBSD/i) + return 'linux' elsif (os =~ /Windows/i) return 'win' end diff --git a/modules/exploits/multi/http/jboss_deploymentfilerepository.rb b/modules/exploits/multi/http/jboss_deploymentfilerepository.rb index 1fe43df20b..5b5611d3e0 100644 --- a/modules/exploits/multi/http/jboss_deploymentfilerepository.rb +++ b/modules/exploits/multi/http/jboss_deploymentfilerepository.rb @@ -213,10 +213,12 @@ class Metasploit3 < Msf::Exploit::Remote return nil end - if (res.body =~ //m) + if (res.body =~ //m) os = $1 if (os =~ /Linux/i) return 'linux' + elsif (os =~ /FreeBSD/i) + return 'linux' elsif (os =~ /Windows/i) return 'win' end diff --git a/modules/exploits/multi/http/jboss_maindeployer.rb b/modules/exploits/multi/http/jboss_maindeployer.rb index 4a9baa2d04..ae523dfe33 100644 --- a/modules/exploits/multi/http/jboss_maindeployer.rb +++ b/modules/exploits/multi/http/jboss_maindeployer.rb @@ -350,10 +350,12 @@ class Metasploit3 < Msf::Exploit::Remote return nil end - if (res.body =~ //m) + if (res.body =~ //m) os = $1 if (os =~ /Linux/i) return 'linux' + elsif (os =~ /FreeBSD/i) + return 'linux' elsif (os =~ /Windows/i) return 'win' end