Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # IPs setup
- VEYON_CLI=veyon-cli
- echo "Escribe aula"
- read AULA
- sudo $VEYON_CLI networkobjects clear 2>/dev/null
- sudo $VEYON_CLI networkobjects add location $AULA 2>/dev/null
- echo "Introduce la primera IP: "
- read IP
- IP_START_BYTES=(${IP//./ })
- echo "Introduce la última IP:"
- read IP
- IP_END_BYTES=(${IP//./ })
- IP_START_NUM=$(( ${IP_START_BYTES[0]} << 24 | ${IP_START_BYTES[1]} << 16 | ${IP_START_BYTES[2]} << 8 | ${IP_START_BYTES[3]} ))
- IP_END_NUM=$(( ${IP_END_BYTES[0]} << 24 | ${IP_END_BYTES[1]} << 16 | ${IP_END_BYTES[2]} << 8 | ${IP_END_BYTES[3]} ))
- for (( i=$IP_START_NUM; i<=$IP_END_NUM; i++ )) do
- IP="$((($i >> 24) & 0xff )).$((($i >> 16) & 0xff )).$((($i >> 8) & 0xff )).$(($i & 0xff ))"
- sudo $VEYON_CLI networkobjects add computer $IP $IP "" $AULA 2>/dev/null
- done
Add Comment
Please, Sign In to add comment