BASH

#remove multiple spaces into one
awk '{$2=$2};1'

#grep date 2014-10-10
grep -o "[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}"

#grep date 10-10-2014
grep -o "[0-9]\{2\}-[0-9]\{2\}-[0-9]\{4\}"

#grep ceratain we know => 209.190.***.***
grep "209\.190\....\...." list.txt

#Get only ascii from hexdump
hexdump -C hacker.txt | cut -c 62-77

#Convert
#Hex to ascii
echo 6bcf2a4b6e5aca0f | xxd -r -p  > text.txt

#Read Files
< /etc/passwd
tac /etc/passwd
cat "/etc/passwd"
cat /etc/passwd
pg /etc/passwd
cat /e``t``c/pass``wd
rgrep test ..

Converting

#Decimal to Ascii
for i in `seq 32 127`; do printf \\$(printf "%o" $i);done;

Regex

#Get Inside Single Quotes ('')
grep -oP "[^'](?=\'\))"

#Get inside tag <b>someting</b>
grep -oP  '(?<=<b>).*?(?=</b>)'

Unique

#MD5 HASH same

Last updated