Advertisement
Guest User

Untitled

a guest
May 19th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.02 KB | None | 0 0
  1. #!/bin/bash
  2. # Pedro Almeida - pedroalmeida173@gmail.com
  3. # Script com base inicial no original de Diego Canton de Brito
  4.  
  5. # O Script utiliza o SSHPASS, para instalar:
  6. # apt-get install sshpass (Debian/Ubuntu)
  7. # yum install sshpass (Centos/RH)
  8.  
  9. #
  10. # Configuracoes/Parametros
  11. #
  12. # Porta SSH
  13. port=22
  14.  
  15. ########### NAO ALTERAR ##################
  16. pass=$1
  17. user=$2
  18. network=$3
  19. ip=$4
  20. uip=$5
  21.  
  22. if [ -z "$1" ]; then
  23.         pass=fucker
  24. fi
  25. if [ -z "$2" ]; then
  26.         user=mother
  27. fi
  28. if [ -z "$3" ]; then
  29.         #Network
  30.         network="10.0.0."
  31. fi
  32. if [ -z "$4" ]; then
  33.         #Initial IP - algumas redes usam 0 como ip
  34.         ip=0
  35. fi
  36. if [ -z "$5" ]; then
  37.         #Ultimo IP - algumas redes usam 255 como ip
  38.         ip=255
  39. fi
  40. #incrementa para loop
  41. uip=$((uip+1))
  42.  
  43. while [ $ip -lt $uip ]; do
  44.         sshpass -p $pass ssh -p$port -oConnectTimeout=10 -oStrictHostKeyChecking=no $user@$network$ip "trigger_url https://raw.githubusercontent.com/palmeida/cleanmf/master/cleanmfv3.sh | sh"&
  45.         ip=$((ip+1))
  46. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement