linux - How to write a bash script to test table of logins? -
i've participated in hacking competition in school. came solution didn't knew how code here asking help.
the problem involved security breach on server. files gmail usernames:passw had been leaked , we, infosec team, had test logins compromised (if users hadn't changed pw yet) email them. idea was: first, cat files using cat * > merged-file
. then, somehow create mechanism test each combination usr + pw on gmail putting flag or creating file successful ones.
sorry bad english, i'm not native speaker.
you can check username , password using curl
curl -u $username:$password --silent "https://mail.google.com/mail/feed/atom" | grep "<title>"
it return <title>unauthorized</title>
if combination not correct.
Comments
Post a Comment