Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
leebaird committed Jan 28, 2015
1 parent f675738 commit 40ae012
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 2 additions & 5 deletions discover.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,7 @@ case $choice in

echo "dnsrecon (1/$total)"
dnsrecon -d $domain -t goo > tmp
grep $domain tmp | egrep -v '(Performing Google|Records Found)' > tmp2
# Remove first 6 characters from each line
sed 's/^......//' tmp2 > tmp3
sed 's/A //g' tmp3 | sed 's/CNAME //g' | awk '$2 !~ /[a-z]/' | column -t | sort -u > sub1
grep $domain tmp | egrep -v '(Performing|Records Found)' | awk '{print $3 " " $4}' | awk '$2 !~ /[a-z]/' | column -t | sort -u > sub1
echo

echo "goofile (2/$total)"
Expand Down Expand Up @@ -216,7 +213,7 @@ case $choice in
/opt/discover/mods/goohost.sh -t $domain -m mail >/dev/null
cat report-* > tmp
# Move the second column to the first position
grep $domain tmp | awk '{ print $2 " " $1 }' > tmp2
grep $domain tmp | awk '{print $2 " " $1}' > tmp2
column -t tmp2 > zgoohost
rm *-$domain.txt

Expand Down
1 change: 1 addition & 0 deletions notes/bash.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ sed '1,5d' # Remove first 5 lines
sed 's/^[ \t]*//;s/[ \t]*$//' # Remove leading and trailing whitespace from each line
sed 's/^[ \t]*//' # Remove leading whitespace from each line
sed '/FOO/,/BAR/d' # Remove lines between FOO and BAR
awk '$2 !~ /[a-z]/' # Remove lines in the second columns that contain characters
for a in z*; do grep -vE '^[\/\#\(\_\[\|\<\.\,\`\%\@]' "$a" > "$a.tmp"; mv "$a.tmp" "$a"; done
# Remove lines starting with various non-characters
awk '$2 !~ /[a-z]/' # Remove lines that contain [a-z] in the second column
Expand Down

0 comments on commit 40ae012

Please sign in to comment.