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 c38ddcb commit 6586c10
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
43 changes: 43 additions & 0 deletions ronin-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,56 @@ function auto_install_zip()
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 || \
warn "Failed to install nmap. Proceeding anyways ..."
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 || \
warn "Failed to install masscan. Proceeding anyways ..."
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 || \
warn "Failed to install GraphViz. Proceeding anyways ..."
fi
}

#
# Install runtime dependencies for ronin.
#
function install_runtime_dependencies()
{
auto_install_git
auto_install_zip

# 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
}

#
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 6586c10

Please sign in to comment.