Well, in some cases, you do need cookies, or at least some request headers to actually login. Didn't manage to login with just the username and the password on this forum by using either CURL or the PowerShell script recommended by SilverAzide above, but once I did login in the browser, I could use the Developer Tools > Network Tab in Chrome to identify most of the request headers to use with a CURL command like this in CMD and save the result to a file:Note: Using "Remember me" at login is not my target - this saves a cookie and then I don't need to enter my login credentials for a few weeks, but my multiple attempts to pass the extracted cookie to curl/wget have failed, so now I'm hoping to go the "simple way" with the above idea.
Code:
curl --ssl-no-revoke -u "UserName":"Password" -o "Partition:/Path/File.html" "https://forum.rainmeter.net/viewforum.php?f=2" -H "accept: ..." -H "accept-language: ..." -H "cache-control: ..." -H "content-type: application/x-www-form-urlencoded" -H "cookie: ..." -H "origin: ..." -H "priority: ..." -H "referer: ..." -H "sec-ch-ua: ..." -H "sec-ch-ua-mobile: ..." -H "sec-ch-ua-platform: ..." -H "sec-fetch-dest: ..." -H "sec-fetch-mode: ..." -H "sec-fetch-site: ..." -H "sec-fetch-user: ..." -H "upgrade-insecure-requests: ..." -H "user-agent: ..."
Obviously, in the case of your site, some thing might differ from this basic test.
P.S. In the case of inner quotes, change them to apostrophes.
References:
- https://curl.se/docs/manpage.html
- https://curl.se/docs/http-cookies.html
- https://stackoverflow.com/questions/54938026/curl-unknown-error-0x80092012-the-revocation-function-was-unable-to-check-r
- https://stackoverflow.com/questions/2594880/using-curl-with-a-username-and-password
- https://stackoverflow.com/questions/34231334/windows-file-path-in-curl-commands
Statistics: Posted by Yincognito — Yesterday, 6:14 pm