Skip to content

Instantly share code, notes, and snippets.

@insi2304
Created December 31, 2019 09:12
Show Gist options
  • Save insi2304/987e78441f38b9896e623bbb0589f442 to your computer and use it in GitHub Desktop.
Save insi2304/987e78441f38b9896e623bbb0589f442 to your computer and use it in GitHub Desktop.
check for anonymous ftp access
for i in `cat domain_port_scan | grep -Po '21/tcp.*' | awk -F" " '{print $3}' | sort -u`;
do
echo "checking ftp on host: "$i;
wget --spider --tries=1 --user=anonymous --password=anonymous ftp://$i/
if [ $? -ne 0 ]; then
echo "Failed to connect to ftp host"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment