Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


curl command with asp authentication

  • Please log in to reply
No replies to this topic

#1 zzyzxgal


  • Members
  • 98 posts
  • Gender:Male
  • Local time:11:04 AM

Posted 28 October 2015 - 05:58 PM

I've been searching high and low for anyone that can help me figure this out.


I need to use Linux to send data to a webpage.


I thought I could use curl, create a cookie, authenticate, then in another command use curl to send authenticate cookie & post the data.


curl -c cookietemp -v --trace-ascii tracetemp --ntlm -u username:password http://site/path/login.asp


But this command is not working at all. It says I'm not authorized.


So, I thought I'd try sending the credentials through a -d or -F format with the names of the fields that the authentication form is using.


curl -c cookietemp -v --trace-ascii tracetemp -d "txtOperator=username&txtPassword=password" http://site/path/login.asp


That didn't work either so I thought it needed the submit button


curl -c cookietemp -v --trace-ascii tracetemp -d "txtOperator=username&txtPassword=password&btnSubmit=Submit" http://site/path/login.asp



I've never had so much trouble with a curl command before.  I've used it for lots of things...


Any help would be greatly appreciated.


BC AdBot (Login to Remove)


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users