Upgrade debian 11 to 12
cat /etc/os-release; read -p enter; apt update; read -p enter; apt upgrade; apt full-upgrade; sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list; grep -ir bull /etc/apt; read -p ok; apt clean; apt update; apt…
cat /etc/os-release; read -p enter; apt update; read -p enter; apt upgrade; apt full-upgrade; sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list; grep -ir bull /etc/apt; read -p ok; apt clean; apt update; apt…
To add a password to your site: apt install apache2-utils htpasswd -c /etc/apache2/.htpasswd user # Config <Directory "/var/www/html"> AuthType Basic AuthName "Restricted Content" AuthUserFile /etc/apache2/.htpasswd Require valid-user </Directory>
To add an existing user to an existing Linux group: usermod -a -G group user # Example usermod -a -G www-data django
Ever found yourself using a for/while loop using SSH in the loop, only to find out your loop only runs once? Your stdin is captured by ssh... This can be…
TMP="$(mktemp -d)" trap 'rm -rf -- "$TMP"' EXIT
My remote hosts are on srvXX.remote.com. I have a jump host jump.remote.com. I want to be able to type ssh srv42.remote.com and connect, without first having to ssh to jump.remote.com.…
On Debian 11: apt install ttf-mscorefonts-installer -ydpkg-reconfigure fontconfig-configcoolconfig update-system-templatesystemctl restart coolwsd.service
Don't follow the original guide ➜ ~ cd Downloads ➜ Downloads fastboot flash vendor_boot vendor_boot.img Sending 'vendor_boot_a' (65536 KB) OKAY [ 0.516s] Writing 'vendor_boot_a' OKAY [ 0.244s] Finished. Total time:…
Note to self:
I got this: Internal Server Error The server encountered an internal error and was unable to complete your request. Please contact the server administrator if this error reappears multiple times,…
Add --rsync-path="ionice -c 3 nice rsync" to your rsync command (on sending side) Friendly for both sender and receiver: ionice -c3 nice rsync --rsync-path="ionice -c 3 nice rsync"
Getting this? bash: pvchange: command not found bash: pvck: command not found bash: pvcreate: command not found bash: pvdisplay: command not found bash: pvmove: command not found bash: pvs: command…
# apt update # apt upgrade # apt full-upgrade # apt --purge autoremove deb http://mirrors.linode.com/debian bullseye main deb-src http://mirrors.linode.com/debian bullseye main deb http://mirrors.linode.com/debian-security bullseye-security/updates main deb-src http://mirrors.linode.com/debian-security bullseye-security/updates main #…
Prerequisites: A linux host within your network SSH enabled on your router FW routes from host to router Howto: 1. Create ssh keys (without passphrase) on the linux host: ssh-keygen…
| todateiso8601
#!/usr/bin/env bash set -o errexit set -o nounset set -o pipefail if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace fi if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then echo…
You probably upgraded go. You need to remove /usr/local/go . Then reinstall go
rpm -qa --qf "%{NAME}\n"
find . -depth -name '* *' \ | while IFS= read -r f ; do mv -i "$f" "$(dirname "$f")/$(basename "$f"|tr ' ' _)" ; done
python -c 'import pty; pty.spawn("/bin/bash")' yay python
sort -t . -k 3,3n -k 4,4n IPs
Add to .bashrc: export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ;} ip=\$( echo \$PWD | grep -oE '{1,3}\.{1,3}\.{1,3}\.{1,3}' ) " Now if you browse to/in a directory which has an ipv4 ip, the IP will…
echo "===SUMMARY===";grep . */report/notes.txt| while read line; do IP=$( echo -ne $line|cut -d'/' -f1| tr -d '\n' ); ] && echo; echo -n $IP ; echo -n $line | cut…
Clone the repo: https://github.com/rofl0r/proxychains-ng ./configure && make && sudo make install cp src/proxychains.conf /etc/proxychains.conf && vi /etc/proxychains.conf echo "alias p='/usr/local/bin/proxychains4'" >> ~/.bashrc && . .bashrc p ssh xx@ip
while read line <&3; do echo "==== $line ===="; yes y | sqlmap -u http://$line/ --crawl=1; read -p press\ enter; done 3< webservers.ip Using input 3 to read your list,…
yum install https://download1.rpmfusion.org/{free/fedora/rpmfusion-free,nonfree/fedora/rpmfusion-nonfree}-release-$(rpm -E %fedora).noarch.rpm yum install install compat-ffmpeg28 ffmpeg-libs
Split to array: while IFS=';' read -ra ADDR; do for i in "${ADDR}"; do # process "$i" done done <<< "$IN" Define: distro=("redhat" "debian" "gentoo") Element: ${ArrayName} Length: echo "${#distro}"…
# Reset Color_Off='\033[0m' # Text Reset # Regular Colors Black='\033[0;30m' # Black Red='\033[0;31m' # Red Green='\033[0;32m' # Green Yellow='\033[0;33m' # Yellow Blue='\033[0;34m' # Blue Purple='\033[0;35m' # Purple Cyan='\033[0;36m' # Cyan…
sed -i '1s/^\(\xef\xbb\xbf\)\?/\xef\xbb\xbf/' foo-*
pip uninstall requests yum reinstall python-requests pip uninstall six yum reinstall python-six pip uninstall urllib3 yum reinstall python-urllib3 ; yum install http://cbs.centos.org/kojifiles/packages/pyOpenSSL/16.2.0/3.el7/noarch/python2-pyOpenSSL-16.2.0-3.el7.noarch.rpm ; yum install certbot certbot-apache