File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -17,5 +17,9 @@ if [[ -z "$MSF_PATH" ]]; then
17
17
MSF_PATH=$( dirname $( dirname $path ) )
18
18
fi
19
19
20
+ if [[ -n " $MSF_BUILD " ]]; then
21
+ docker-compose -f $MSF_PATH /docker-compose.yml build
22
+ fi
23
+
20
24
cd $MSF_PATH
21
25
docker-compose run --rm --service-ports ms ./msfvenom " $@ "
Original file line number Diff line number Diff line change
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 " $@ "
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ Gem::Specification.new do |spec|
24
24
spec . homepage = 'https://www.metasploit.com'
25
25
spec . license = 'BSD-3-clause'
26
26
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" )
28
30
spec . files = `git ls-files` . split ( $/) . reject { |file |
29
31
file =~ /^documentation|^external/
30
32
}
You can’t perform that action at this time.
0 commit comments