Restructure repository: organize tools by purpose, create what search tool
- Move single-file tools to tools/ organized by category (security, forensics, data, etc.) - Move multi-file projects to projects/ (go-tools, puzzlebox, timesketch, rust-tools) - Move system scripts to scripts/ (proxy, display, setup, windows) - Organize config files in config/ (shell, visidata, applications) - Move experimental tools to archive/experimental - Create 'what' fuzzy search tool with progressive enhancement (ollama->fzf->grep) - Add initial metadata database for intelligent tool discovery - Preserve git history using 'git mv' commands
This commit is contained in:
27
scripts/proxy/update_apt_proxy.sh
Executable file
27
scripts/proxy/update_apt_proxy.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
config_file='/etc/apt/apt.conf.d/80certproxy'
|
||||
#remove proxy settings from docker
|
||||
if [[ "${1}" == "off" ]]; then
|
||||
echo "TURNING OFF PROXY FOR APT"
|
||||
sudo rm -rf "${config_file}"
|
||||
sudo snap unset system proxy.http
|
||||
sudo snap unset system proxy.https
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#populate proxy_ip and proxy_port variables
|
||||
path=$(dirname $(readlink -f "${0}"))
|
||||
. "${path}/get_proxy.sh"
|
||||
|
||||
|
||||
echo -n "Username: "
|
||||
read username
|
||||
echo -n "Password: "
|
||||
read -s password
|
||||
encpassword=$(echo -n ${password} | xxd -p | sed -e 's/\(..\)/%\1/g' )
|
||||
echo 'Acquire::http::Proxy "http://'"${username}:${encpassword}@${proxy_ip}:${proxy_port}/"'";' | sudo tee "${config_file}"
|
||||
echo 'Acquire::http::Timeout "360";' | sudo tee -a "${config_file}"
|
||||
|
||||
echo "SETTING PROXY FOR SNAP ASWELL"
|
||||
sudo snap set system proxy.http=http://${username}:${encpassword}@${proxy_ip}:${proxy_port}/
|
||||
sudo snap set system proxy.https=http://${username}:${encpassword}@${proxy_ip}:${proxy_port}/
|
||||
Reference in New Issue
Block a user