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 | |
find $1 -name '*.php' | xargs wc -l | |
#find $1 -name '*.php' | xargs wc -l | sort -nr |
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 | |
read -p 'Desired file name (eg. *safe*, *.bak): ' name | |
sudo find / -name "$name" | |
#sudo find / -name ".DS_Store" -exec rm {} \; |
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/sh | |
read -p 'full domain name: ' domain | |
openssl genrsa -des3 -out $domain.key 2048 | |
openssl req -new -key $domain.key -out $domain.csr | |
#openssl x509 -req -days 365 -in $domain.csr -signkey $domain.key -out $domain.crt | |
openssl req -nodes -new -x509 -keyout $domain.nopassphrase.key -out $domain.nopassphrase.crt |
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 | |
PIN1=`openssl x509 -pubkey < primary.crt | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | base64` | |
PIN2=`openssl x509 -pubkey < backup.crt | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | base64` | |
echo | |
echo ================================== | |
echo == Public_Key_Pinning generator == | |
echo ================================== | |
echo | |
echo -e "\033[5m\033[1m\033[31mapache:\033[0m" | |
echo Header always set Public-Key-Pins "pin-sha256=\"$PIN1\"; pin-sha256=\"$PIN2\"; max-age=5184000; includeSubDomains" |
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
nmap -Pn --script vuln fqdn | |
nmap --script ssl-cert,ssl-enum-ciphers -p 443 fqdn | |
nmap --script "mysql-*" fqdn | |
nmap --script "http-*" fqdn | |
nmap -Pn --script vuln fqdn |
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 | |
bunzip2 < db_filename.sql.bz2 | mysql -u root -p target_db_name |
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 | |
black=`tput setaf 0` | |
red=`tput setaf 1` | |
green=`tput setaf 2` | |
yellow=`tput setaf 3` | |
blue=`tput setaf 4` | |
magenta=`tput setaf 5` | |
cyan=`tput setaf 6` | |
white=`tput setaf 7` | |
reset=`tput sgr0` |
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 | |
# param1 sshport | |
# param2 suffix zend gui password | |
# example execute: ./thisfile.sh 22 localhost | |
echo "Please wait..." | |
sshport=$1 | |
zendgui="590@pp$2" | |
appportsbo="801 802 803 804 805 806 807 808 809 810" |
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
@@@@@@@ | |
@ LFS @ | |
@@@@@@@ | |
apt-get install gawk | |
apt-get install bison | |
apt-get install texinfo | |
# create boot partition 100MB ext2 | |
# create system partition 9900MB ext4 |
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
db.authors.insert([ | |
{ | |
_id: 'a1', | |
name: { first: 'orlando', last: 'becerra' }, | |
age: 27 | |
}, | |
{ | |
_id: 'a2', | |
name: { first: 'mayra', last: 'sanchez' }, | |
age: 21 |
NewerOlder