mirror of
https://github.com/thelittlerocket/pve.git
synced 2024-11-15 19:44:38 +08:00
21 lines
651 B
Bash
21 lines
651 B
Bash
#!/bin/bash
|
|
# from https://github.com/spiritLHLS/pve
|
|
|
|
divert_install_script() {
|
|
local package_name=$1
|
|
local divert_script="/usr/local/sbin/${package_name}-install"
|
|
local install_script="/var/lib/dpkg/info/${package_name}.postinst"
|
|
ln -sf "${divert_script}" "${install_script}"
|
|
sh -c "echo '#!/bin/bash' > ${divert_script}"
|
|
sh -c "echo 'exit 1' >> ${divert_script}"
|
|
chmod +x "${divert_script}"
|
|
}
|
|
|
|
echo "Package: zmap nmap masscan medusa
|
|
Pin: release *
|
|
Pin-Priority: -1" | sudo tee -a /etc/apt/preferences
|
|
divert_install_script "zmap"
|
|
divert_install_script "nmap"
|
|
divert_install_script "masscan"
|
|
divert_install_script "medusa"
|
|
rm -rf "$0"
|