GoodWords


SUBMITTED BY: Guest

DATE: Dec. 6, 2013, 9:09 a.m.

FORMAT: Bash

SIZE: 3.1 kB

HITS: 699

  1. #!/bin/bash
  2. #-------------------------------
  3. # GOOWORDS (c) narfu 2008 |
  4. # Version: 0.0.1beta |
  5. # contact: narfu@gmx.de |
  6. # ------------------------------
  7. # first install the script with 'sudo ln -s /pfad/to/script /usr/bin/goowords' otherwise it will not work! (because of screen)
  8. # after installation, you can start it independent from current workingdirectory by typing 'goowords <parameter>'
  9. if [ ! -n "$1" ]
  10. then
  11. echo "err: missing parameter"
  12. echo "usage: goowords <any word>"
  13. exit
  14. fi
  15. if [ "$1" = "help" -o "$1" = "--help" -o "$1" = "-h" ]
  16. then
  17. echo "usage: goowords <any word>"
  18. exit
  19. fi
  20. if [ "$2" = "screen_start" ]
  21. then
  22. word=$1
  23. url0="http://www.google.de/search?hl=de&q=test&btnG=Suche&meta="
  24. url1=`echo $url0 | sed -e "s/test/${word}/g"`
  25. count_lines=1
  26. while [ ! -f stop ]
  27. do
  28. wget --save-cookies google.de -U 'mowl' -O trash.html "http://www.google.de"
  29. rm trash.html
  30. wget --load-cookies google.de --referer "http://www.google.de" -U 'mowl' -O content.html $url1
  31. rm google.de
  32. cat content.html | \
  33. sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | \
  34. sed -e 's/ /\n/g' | tail --lines=+137 | \
  35. sed -e 's/[ -,:;()+&]/ /g' -e 's/&nbsp//g'| cut -d. -f2 | \
  36. sed -e 's/ /\n/g' | \
  37. tr [:upper:] [:lower:] | sort | uniq |tail --lines=+17 \
  38. >> wordlist
  39. word=$(cat wordlist | tail -n $count_lines | head -n 1)
  40. url1=`echo $url0 | sed -e "s/test/${word}/g"`
  41. echo $url1
  42. sleep 3
  43. count_lines=`expr $count_lines + 1`
  44. done
  45. exit
  46. else
  47. screen -dmS getwords goowords $1 "screen_start"
  48. echo " -------------------------------"
  49. echo " | GOOWORDS (c) narfu 2008 |"
  50. echo " | Version: 0.0.1beta |"
  51. echo " | contact: narfu@gmx.de |"
  52. echo " -------------------------------"
  53. echo ""
  54. echo "[+] the script is working for now ..."
  55. echo "[i] type 'screen -rx getwords' in a new terminal, will show you the activity"
  56. while [ ! -f stop ]
  57. do
  58. echo "[!] to stop the script, type 'stop' in this prompt"
  59. echo "[!] to check the size of the wordfile, type 'size' in this prompt"
  60. read -p "[>] : " user
  61. if [ "$user" = "size" -o "$user" = "Size" -o "$user" = "SIZE" ]
  62. then
  63. ls -hl | grep wordlist | cut -d' ' -f5
  64. fi
  65. if [ "$user" = "stop" -o "$user" = "Stop" -o "$user" = "STOP" ]
  66. then
  67. touch stop
  68. echo "[!] if the wordfile is big, to exit may take several seconds/minutes"
  69. while [ ! "$(screen -ls | grep getwords)" = "" ]
  70. do
  71. echo " ..."
  72. sleep 2
  73. done
  74. fi
  75. done
  76. count_words=0
  77. while read line
  78. do
  79. count_words=`expr $count_words + 1`
  80. done < 'wordlist'
  81. echo ""
  82. echo "[+] $count_words word's written!"
  83. rm stop
  84. rm content.html
  85. echo "[+] done."
  86. exit
  87. fi

comments powered by Disqus