CoinUrl Bot for Mac and Linux


SUBMITTED BY: Guest

DATE: Feb. 25, 2014, 5:25 p.m.

FORMAT: Bash

SIZE: 1.5 kB

HITS: 1218

  1. #!/bin/bash
  2. function help_ {
  3. echo " -h - show help message and exit"
  4. echo " -u <uuid> - specify unique user id"
  5. echo " -l <number of times> - limit the number of times the script will loop (default: 10000)"
  6. echo " -b <browser> - browser to open the links in (default: default browser)"
  7. }
  8. function launch_ {
  9. if [[ -n $* ]]; then
  10. while [[ -n $* ]]; do
  11. if [[ $1 = -u ]]; then
  12. uuid=$2
  13. shift 2
  14. elif [[ $1 = -h ]]; then
  15. help_
  16. exit
  17. elif [[ $1 = -b ]]; then
  18. browser=$2".app"
  19. browser_proc=$2
  20. shift 2
  21. elif [[ $1 = -l ]]; then
  22. limit=$2
  23. shift 2
  24. fi
  25. done
  26. else
  27. help_
  28. exit
  29. fi
  30. if [[ -z $limit ]]; then
  31. limit=10000
  32. fi
  33. num=0
  34. randid=$RANDOM
  35. }
  36. function pull_ {
  37. while true; do
  38. killall $browser_proc
  39. url=$(curl -s -S "https://coinurl.com/api.php?uuid="$uuid"&url=https://www.google.com/$randid/$num")
  40. echo -en "\rNumber of urls generated: $num | Current URL: $url"
  41. ((num++))
  42. open -g -a $browser "$url"
  43. sleep 4
  44. if [[ $num -gt $limit ]]; then
  45. break
  46. fi
  47. done
  48. }
  49. launch_ $* && pull_

comments powered by Disqus