feat: improve install_* methods
Opened this issue · 0 comments
ocervell commented
Summary
-
For source installs (
install_cmd
):- rename
install_cmd
toinstall_source
- install build essential tools (
gcc make
on apk,build-essential
on apt, etc...) - add support for installing
mise
to speed up langs installGitHubInstaller.install('jdx/mise')
fails on Linux- does not work on Windows ..
- deprecate
scripts/install_go.sh
in favor ofmise use go
--> this also removes need forsudo
- deprecate
scripts/install_ruby.sh
in favor ofmise use ruby
--> this also removes need forsudo
- rework
install_cmd
to a dict allowing to install required packages on all distribs:apt
,yum
,brew
,apk
,pacman
,pkg
,choco
, so it works cross-distribs
- rename
-
For github installs (
install_github_handle
):- rename to
install_github
- rework
install_github
to a dict allowing to install required packages on all distribs (apt
,yum
,brew
,apk
,pacman
,pkg
,choco
)
- rename to
wpscan
install_cmd = 'sudo apt install -y build-essential ruby-dev rubygems && sudo gem install wpscan'
apt
will not work on some distribs, like Arch or Alpine, so we need another format for this install_cmd
:
install_source = {
'requires': {
'apt': ['build-essential', 'ruby-dev', 'rubygems'],
'brew|apk|yum|pacman|pkg|others': ['ruby'],
}
'build': 'sudo gem install wpscan'
}
We could maybe also use mise
for this:
install_source = {
'requires': {
'mise': 'ruby@3.3.0'
},
'build': 'sudo gem install wpscan'
}
gf
install_cmd = (
'go install -v github.com/tomnomnom/gf@latest && '
'git clone https://github.com/1ndianl33t/Gf-Patterns $HOME/.gf || true'
)
becomes:
install_source = {
'mise': 'go@1.22'
'requires': ['git'],
'build': 'go install -v github.com/tomnomnom/gf@latest && git clone https://github.com/1ndianl33t/Gf-Patterns $HOME/.gf || true'
}