Shell Script to retrieve text from website
Is there a way to extract a specific part of a website and display it in a terminal? There is a couple of sections on this site that displays a Username and Password for people to access their VPN (VPNBook). However they change the passwords, so I was wondering if a shell script could be made to access the website, extract the username and password fields, and displays it.
Right now the username and password fields are:
Username: vpnbook
Password: he2qv5h
If anyone could point me in the right direction to start this project, that would be great.
curl http://www.example.com/vastly-insecure-VPN-credential-exposure
| grep -E '(username|password)'`? – DopeGhoti Aug 24 '17 at 20:23-E
replaced with-Ei
so that the search for username and password is case insensitive. – John1024 Aug 24 '17 at 20:41