Created
May 23, 2013 03:14
-
-
Save aptavout/5632553 to your computer and use it in GitHub Desktop.
cURL GET session ID followed by a login POST
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set url=http://www.target-url.org | |
set agent=Mozilla/2.02Gold (Win95; I) | |
curl -c cookies.txt -A "%agent%" %url% > get.txt | |
set login=jsmith | |
set pass=intheclear | |
set query=%login%^&%pass% | |
echo %query% > query-string.txt | |
curl -b cookies.txt -A "%agent%" -d @query-string.txt %url% > post.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment