milis/talimatname/genel/m/metasploit/talimat

56 lines
1.8 KiB
Plaintext
Raw Normal View History

2018-06-09 00:06:58 +02:00
# Tanım: ileri düzey exploit kullanarak geliştirme ve test etme çatı uygulaması
# URL: http://www.metasploit.com
2018-11-06 05:56:48 +01:00
# Paketçi: milisarge yakar
2018-06-09 00:06:58 +02:00
# Gerekler: ruby libpcap postgresql ruby-bundler sqlite libxslt clang
2018-08-02 13:39:58 +02:00
# Grup: güvenlik
2018-06-09 00:06:58 +02:00
isim=metasploit
2018-11-06 05:56:48 +01:00
surum=4.17.23
2018-06-09 00:06:58 +02:00
devir=1
2018-11-06 05:56:48 +01:00
kaynak=(https://github.com/rapid7/metasploit-framework/archive/$surum.tar.gz::$isim-$surum.tar.gz)
2018-06-09 00:06:58 +02:00
derle() {
cd "${isim}-framework-$surum"
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/${isim}" "${PKG}/usr/bin"
find . -maxdepth 1 -mindepth 1 -not -path './.git*' -exec cp -r '{}' "${PKG}/opt/${isim}" \;
for f in "${PKG}"/opt/${isim}/msf*; do
local _msffile="${PKG}/usr/bin/`basename "${f}"`"
echo -e "#!/bin/sh\nBUNDLE_GEMFILE=/opt/${isim}/Gemfile bundle exec ruby /opt/${isim}/`basename "${f}"` \"\$@\"" > "${_msffile}"
chmod 755 "${_msffile}"
done
(cd "${PKG}/opt/${isim}"
for f in tools/*/*.rb; do
install -Dm 755 "${f}" ".${f}"
echo -e "#!/bin/sh\nBUNDLE_GEMFILE=/opt/${isim}/Gemfile bundle exec ruby /opt/${isim}/."${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/${isim}/documentation" "${PKG}/usr/share/doc/${isim}"
rm "${PKG}/usr/bin/msfupdate"
2018-11-06 05:56:48 +01:00
# desktop
mkdir -p "$PKG/usr/share/applications/"
cat > $PKG/usr/share/applications/$isim.desktop << BASLA
[Desktop Entry]
Name=metasploit
Exec=sh -c "msfconsole;${SHELL:-bash}"
Terminal=true
Icon=msfconsole
Type=Application
Categories=Network;X-Komutan;
Version=1.0
BASLA
2018-06-09 00:06:58 +02:00
}