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/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
@@@@@@@ | |
@ 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 |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
) | |
type Envelope struct { | |
Type string |
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
# mkisofs on linux: | |
mkisofs -T -r -o filename.iso pathname/ | |
# mkisofs on windows: | |
mkisofs -v -dvd-video -V "VOLUME_NAME" -o "c:\my movies\iso\movie.iso" "c:\my movies\dvd" | |
mkisofs -r -R -J -l -L -o image-file.iso c:\project\install |
NewerOlder