16 July, 2022 - 10:30 AM
Your code is ok but it is for older sites that redirect users to error pages if the credentials are wrong. Modern sites uses Ajax to change inline html without refreshing the whole page(without sending requests from main site). So both valid and invalid credentials will show 200 status code while you can use any of the following techniques to find valid login credentials
1- You can scrape the html for words like login denied or invalid password(according to the site) and if these words are found then the email:pass is wrong, Other wise it is correct
2-you can check for status code of 302 and 301 if website is redirecting to another page after login
3-you can check by response headers that are only allowed after login like Set cookie header and Csrf-protection header
4-after passing credentials you can redirect user to some page like billing page and check if visiting this page returned to the login page(302 redirection) then it will be invalid credentials but if visiting that page shows 200 status code then credentials are valid
As you know python you can code this yourself. If not tell me I’ll help you
1- You can scrape the html for words like login denied or invalid password(according to the site) and if these words are found then the email:pass is wrong, Other wise it is correct
2-you can check for status code of 302 and 301 if website is redirecting to another page after login
3-you can check by response headers that are only allowed after login like Set cookie header and Csrf-protection header
4-after passing credentials you can redirect user to some page like billing page and check if visiting this page returned to the login page(302 redirection) then it will be invalid credentials but if visiting that page shows 200 status code then credentials are valid
As you know python you can code this yourself. If not tell me I’ll help you
HI contact me on telegram @Qitga
Always confirm via pm before doing a deal. I will never reject middleman be aware of imposters
Always confirm via pm before doing a deal. I will never reject middleman be aware of imposters