Hey,

Its been a long time since i have used Kali and wanted to get back into the swing of things and practice a bit.
I was looking for some sort of innocent things that are still fun to mess with... So i wanted to scan IP ranges for "open" VNC servers that dont use authentication.
I looked around and found some tools and made the following script:

Code:
#!/bin/sh
rm -f paused.conf
rm -f Scan.txt
clear
echo "What is the IP range? (x.x.x.x or x.x.x.x/xx or x.x.x.x-y.y.y.y)"
read IP1
echo "What port(s) to look for? (x or x-y)"
read PORT
sudo masscan "$IP1" -p"$PORT" --rate 1000 > Scan.txt
awk '{print $6":"$4-4+4}' < Scan.txt | while read IP; do
	echo "Running: "$IP
	timeout 5s vncsnapshot "$IP" "$IP.jpg"
done
I'm trying to fiend a good --rate for masscan and the lower seems to genuinely give more results, I started out on 60.000 but it missed like half the open ports so i use between 1.000 and 8.000 so that is why its so low.
Also i was hoping to fiend some other tool then vncscreenshot as its about 10 years old and discontinued as far as i can tell. The point of this was to mess around and learn on the way.

Anyway, If someone can help me out with another tool that can be automated like this and can save screenshots of the VNC server and continue to the next one.
I do have a VM running with kalli so i have options to use a gui tool or tools that relay on gui to work but it would be nice if its just commandline.

Thanks for your time