This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get update ; apt-get install -y dirmngr | |
grep -q -F 'deb http://http.kali.org/kali kali-rolling main contrib non-free' /etc/apt/sources.list || echo 'deb http://http.kali.org/kali kali-rolling main contrib non-free' >> /etc/apt/sources.list | |
apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF6 | |
apt-get update | |
apt-get install -y -t kali-rolling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Put me in /lib/systemd/system/ | |
[Unit] | |
Description=My Miscellaneous Service | |
After=network.target | |
[Service] | |
Type=simple | |
User=nanodano | |
WorkingDirectory=/home/nanodano | |
ExecStart=/home/nanodano/my_daemon --option=123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get purge -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#du -a / | sort -n -r | head -n 5 | |
du -Sh / | sort -rh | head -5 | |
find -type f -exec du -Sh {} + | sort -rh | head -n 5 | |
apt-get install -y ncdu | |
ncdu / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -regextype posix-egrep -regex ".*\.(html|scan)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Generate key and certificate | |
openssl genrsa -out privkey.pem 4096 | |
openssl req -new -x509 -key privkey.pem -out cert.pem -days 1826 | |
# Generate full self-signed certificate chain | |
# Create root key | |
openssl genrsa -des3 -out rootCA.key 4096 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Echo three passwords | |
cat /dev/urandom| tr -dc 'a-zA-Z0-9-_!@#$%+'|fold -w 28| head -n 3 | |
# Echo one password and put it in clipboard | |
# Requirements: apt-get install -y xclip | |
cat /dev/urandom| tr -dc 'a-zA-Z0-9-_!@#$%+'|fold -w 28| head -n 1|xclip" | |
openssl rand 60 | openssl base64 -A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl https://icanhazip.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
add-apt-repository -y ppa:webupd8team/java | |
apt-get update | |
apt-get -y install gpg2 | |
apt-get -y install oracle-java8-installer | |
apt-get install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev vncviewer libyaml-dev curl zlib1g-dev | |
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - | |
curl -L https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -e "\nEnter your var :" | |
VAR=$1 | |
if [ -z $VAR ] | |
then | |
clear | |
echo -e "\nvar is empty, try again ..." | |
else | |
echo -e "\nvar is okay, lets do this ..." | |
fi |
OlderNewer