2017-10-27 20:46:27 +02:00
|
|
|
|
# Tanım: ileri düzey exploit kullanarak geliştirme ve test etme çatı uygulaması
|
2017-06-09 06:32:32 +02:00
|
|
|
|
# URL: http://www.metasploit.com
|
2017-10-27 20:46:27 +02:00
|
|
|
|
# Paketçi: milisarge
|
|
|
|
|
# Gerekler: ruby libpcap postgresql ruby-bundler sqlite libxslt clang
|
2017-06-09 06:32:32 +02:00
|
|
|
|
|
|
|
|
|
name=metasploit
|
|
|
|
|
version=4.14.24
|
|
|
|
|
release=1
|
|
|
|
|
source=(https://github.com/rapid7/metasploit-framework/archive/$version.tar.gz)
|
|
|
|
|
|
2017-10-27 23:59:41 +02:00
|
|
|
|
derle() {
|
2017-06-09 06:32:32 +02:00
|
|
|
|
cd "${name}-framework-$version"
|
|
|
|
|
bundle config build.nokogiri --use-system-libraries
|
|
|
|
|
sed 's|git ls-files|find -type f|' -i metasploit-framework.gemspec
|
|
|
|
|
export CC=clang
|
|
|
|
|
export CXX=clang++
|
|
|
|
|
bundle install -j"$(nproc)" --no-cache --deployment
|
|
|
|
|
find vendor/bundle/ruby -exec chmod o+r '{}' \;
|
|
|
|
|
|
|
|
|
|
install -d "${PKG}/opt/${name}" "${PKG}/usr/bin"
|
|
|
|
|
find . -maxdepth 1 -mindepth 1 -not -path './.git*' -exec cp -r '{}' "${PKG}/opt/${name}" \;
|
|
|
|
|
|
|
|
|
|
for f in "${PKG}"/opt/${name}/msf*; do
|
|
|
|
|
local _msffile="${PKG}/usr/bin/`basename "${f}"`"
|
|
|
|
|
echo -e "#!/bin/sh\nBUNDLE_GEMFILE=/opt/${name}/Gemfile bundle exec ruby /opt/${name}/`basename "${f}"` \"\$@\"" > "${_msffile}"
|
|
|
|
|
chmod 755 "${_msffile}"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
(cd "${PKG}/opt/${name}"
|
|
|
|
|
for f in tools/*/*.rb; do
|
|
|
|
|
install -Dm 755 "${f}" ".${f}"
|
|
|
|
|
echo -e "#!/bin/sh\nBUNDLE_GEMFILE=/opt/${name}/Gemfile bundle exec ruby /opt/${name}/."${f}" \"\$@\"" > "${f}"
|
|
|
|
|
chmod 755 "${f}"
|
|
|
|
|
done
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
install -Dm 644 external/zsh/_* -t "${PKG}/usr/share/zsh/site-functions"
|
|
|
|
|
install -d "${PKG}/usr/share/doc"
|
|
|
|
|
mv "${PKG}/opt/${name}/documentation" "${PKG}/usr/share/doc/${name}"
|
|
|
|
|
rm "${PKG}/usr/bin/msfupdate"
|
|
|
|
|
}
|