Skip to content

Commit d24e294

Browse files
committed
update docker stuff
1 parent 75c571d commit d24e294

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

docker/bin/msfvenom

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,9 @@ if [[ -z "$MSF_PATH" ]]; then
1717
MSF_PATH=$(dirname $(dirname $path))
1818
fi
1919

20+
if [[ -n "$MSF_BUILD" ]]; then
21+
docker-compose -f $MSF_PATH/docker-compose.yml build
22+
fi
23+
2024
cd $MSF_PATH
2125
docker-compose run --rm --service-ports ms ./msfvenom "$@"

docker/bin/msfvenom-dev

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#! /bin/bash
2+
3+
if [[ -z "$MSF_PATH" ]]; then
4+
path=`dirname $0`
5+
6+
# check for ./docker/msfconsole.rc
7+
if [[ ! -f $path/../msfconsole.rc ]] ; then
8+
9+
# we are not inside the project
10+
realpath --version > /dev/null 2>&1 || { echo >&2 "I couldn't find where metasploit is. Set \$MSF_PATH or execute this from the project root"; exit 1 ;}
11+
12+
# determine script path
13+
pushd $(dirname $(realpath $0)) > /dev/null
14+
path=$(pwd)
15+
popd > /dev/null
16+
fi
17+
MSF_PATH=$(dirname $(dirname $path))
18+
fi
19+
20+
cd $MSF_PATH
21+
22+
if [[ -n "$MSF_BUILD" ]]; then
23+
docker-compose -f $MSF_PATH/docker-compose.yml -f $MSF_PATH/docker/docker-compose.development.override.yml build
24+
fi
25+
26+
docker-compose -f $MSF_PATH/docker-compose.yml -f $MSF_PATH/docker/docker-compose.development.override.yml run --rm --service-ports ms ./msfvenom "$@"

metasploit-framework.gemspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ Gem::Specification.new do |spec|
2424
spec.homepage = 'https://www.metasploit.com'
2525
spec.license = 'BSD-3-clause'
2626

27-
if File.directory?(File.join(File.dirname(__FILE__), ".git"))
27+
# only do a git ls-files if the .git folder exists and we have a git binary in PATH
28+
if File.directory?(File.join(File.dirname(__FILE__), ".git")) &&
29+
ENV['PATH'].split(':').collect {|d| Dir.entries d if Dir.exists? d}.flatten.include?("git")
2830
spec.files = `git ls-files`.split($/).reject { |file|
2931
file =~ /^documentation|^external/
3032
}

0 commit comments

Comments
 (0)