This file contains hidden or 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
| wget https://github.com/tlhackque/BlockCountries/archive/master.zip | |
| unzip master.zip | |
| chmod 0755 BlockCountries-master/BlockCountries | |
| cp BlockCountries-master/BlockCountries /etc/init.d/ | |
| /etc/init.d/BlockCountries version | |
| /etc/init.d/BlockCountries start -update | |
| rm -r -v BlockCountries-master/ | |
| rm -v master.zip* |
This file contains hidden or 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 "Login detected at $(hostname) / $(date +%d.%m.%Y) $(date +%H:%M:%S)" | |
| #FROM=`echo $SSH_CONNECTION | awk '{ print $1 }'` | |
| #echo "Benutzer: $USER@$FROM" | |
| #echo | |
| #echo -n "Uptime: " | |
| #uptime | |
| #echo | |
| #echo "Last Login Activity: " | |
| #last |
This file contains hidden or 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
| mysql -uadmin -p`cat /etc/psa/.psa.shadow ` -D psa -e "delete from sessions where login like 'admin';" |
This file contains hidden or 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/sh | |
| ( /usr/local/bin/rkhunter --versioncheck | |
| /usr/local/bin/rkhunter --update | |
| /usr/local/bin/rkhunter --cronjob --report-warnings-only | |
| ) | |
| #| /usr/bin/mail -s "rkhunter output" root@localhost |
This file contains hidden or 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
| mkdir ~/.vim | |
| mkdir ~/.vim/colors | |
| wget https://raw.githubusercontent.com/nanotech/jellybeans.vim/master/colors/jellybeans.vim | |
| mv jellybeans.vim ~/.vim/colors/ | |
| touch ~/.vimrc | |
| echo syntax on > ~/.vimrc | |
| echo colorscheme jellybeans >> ~/.vimrc |
This file contains hidden or 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
| # function to multiple change directory at once or jump back to an existing directory in the path | |
| # using: cd.. n or cd.. dir or cd.. *part_of_directory* | |
| function mcd() { | |
| case $1 in | |
| *[!0-9]*) # check if it is a number | |
| cd $( pwd | sed -r "s|(.*/$1[^/]*/).*|\1|" ) # loopup for name or part of name of directory | |
| ;; # if not a number and not an existing directory of path do nothing | |
| *) | |
| cd $(printf "%0.0s../" $(seq 1 $1)); # change back directory n times | |
| ;; |
This file contains hidden or 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 | |
| # Script for creating Vhosts with nginx conf and Letsencrypt Cert directly. | |
| read -p "Gib die komplette URL der Domain ein: " domain | |
| # mit www-data Berechtigung das HTML ROOT anlegen | |
| sudo -u www-data mkdir /var/www/vhosts/$domain | |
| # die standard Index files rein kopieren. | |
| sudo cp /var/www/html/index.nginx-debian.html /var/www/vhosts/$domain/index.html | |
| # ein nginx conf file erstellen | |
| sudo cp /etc/nginx/templates/template.conf /etc/nginx/templates/tmp/$domain'.conf' | |
| # in dem erstellten conf file die defuialt werte mit den domain werten überschreiben |
This file contains hidden or 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 | |
| file=`kdialog --getopenfilename /home '*.pdf'` | |
| pdf2ps $file tmp.ps && ps2pdf tmp.ps $file-small.pdf && rm tmp.ps |
This file contains hidden or 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 | |
| read -e -p "Please insert file: " file | |
| if test -e $file | |
| then pdf2ps $file tmp.ps && ps2pdf tmp.ps $file-small.pdf && rm tmp.ps | |
| else echo "File not found!" | |
| fi |
This file contains hidden or 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 | |
| # check if password was insert | |
| if [ $# -eq 0 ] | |
| then | |
| echo "no password was insert, syntax is ./check-password.sh password" | |
| else | |
| #create sha1sum of password for transfering to online check | |
| sha1pass=`echo -n "$1" | sha1sum | cut -d ' ' -f1` | |
| #run test and get a result from api | |
| result=`curl -s https://api.pwnedpasswords.com/pwnedpassword/$sha1pass` |
OlderNewer