1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p curl bundix git libiconv libpcap libxml2 libxslt pkg-config postgresql ruby.devEnv sqlite xmlstarlet nix-update
5 cd "$(dirname "$
(readlink
-f "$0")")"
7 latest
=$
(curl https
://github.com
/rapid
7/metasploit-framework
/tags.atom | xmlstarlet sel
-N atom
="http://www.w3.org/2005/Atom" -t -m /atom
:feed
/atom
:entry
-v atom
:title
-n |
head -n1)
8 echo "Updating metasploit to $latest"
10 sed -i "s#refs/tags/.*#refs/tags/$latest\"#" Gemfile
14 sed -i '/[ ]*dependencies =/d' gemset.nix
17 nix-update metasploit
--version "$latest"