Skip to content

Commit

Permalink
Install new external dependencies for ronin 2.1.0.rc1 (issue #23).
Browse files Browse the repository at this point in the history
* ronin-nmap-0.1.0.rc1 now requires `nmap`.
* ronin-masscan-0.1.0.rc1 now requires `masscan`.
* ronin-recon-0.1.0.rc1 now requires `nmap` and GraphViz (`dot`).
* ronin-app-0.1.0.rc1 now requires `nmap` and `masscan`.
  • Loading branch information
postmodern committed Jun 25, 2024
1 parent 913fa4e commit 8aff881
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
40 changes: 40 additions & 0 deletions ronin-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,39 @@ function install_dependencies()
fi
}

#
# Install nmap if it's not already installed.
#
function auto_install_nmap()
{
if ! command -v nmap >/dev/null; then
log "Installing nmap ..."
install_packages nmap || fail "Failed to install nmap!"
fi
}

#
# Install masscan if it's not already installed.
#
function auto_install_masscan()
{
if ! command -v masscan >/dev/null; then
log "Installing masscan ..."
install_packages masscan || fail "Failed to install masscan!"
fi
}

#
# Install GraphViz if it's not already installed.
#
function auto_install_graphviz()
{
if ! command -v dot >/dev/null; then
log "Installing GraphViz ..."
install_packages graphviz || fail "Failed to install graphviz!"
fi
}

#
# Print the --help usage.
#
Expand Down Expand Up @@ -447,6 +480,13 @@ auto_install_pkg_config
auto_install_ruby
install_dependencies

# TODO: remove prerelease check once ronin-2.1.0 is finally released
if [[ "$prerelease" == "true" ]]; then
auto_install_nmap
auto_install_masscan
auto_install_graphviz
fi

if ! command -v ronin >/dev/null; then
if [[ "$prerelease" == "true" ]]; then
log "Installing ronin pre-release. This may take a while ..."
Expand Down
17 changes: 17 additions & 0 deletions test/ronin_install_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,23 @@ function test_git_install()
assertCommandInstalled "did not successfully install git" 'git'
}

# TODO: uncomment when ronin-2.1.0 is finally released.
#
# function test_nmap_install()
# {
# assertCommandInstalled "did not successfully install nmap" 'nmap'
# }
#
# function test_masscan_install()
# {
# assertCommandInstalled "did not successfully install masscan" 'masscan'
# }
#
# function test_graphviz_install()
# {
# assertCommandInstalled "did not successfully install GraphViz" 'dot'
# }

function test_ronin_install()
{
assertCommandInstalled "did not successfully install ronin" 'ronin'
Expand Down

0 comments on commit 8aff881

Please sign in to comment.