automating login to a server using c++

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2008
Posts: 2
Reputation: leowdeo is an unknown quantity at this point 
Solved Threads: 0
leowdeo leowdeo is offline Offline
Newbie Poster

automating login to a server using c++

 
0
  #1
Nov 22nd, 2008
  1. am trying to login to a server, say my gmail account by sending it my username and password in a typical POST request. to make my life simpler
  2. i tested this code on www.campuser.net
  3. i was able to see the pages http requests using a firefox addon called tamper data to analyse their requests
  4. source code is attached
  5.  
  6. steps taken
  7. ----------------
  8. 1. connect to the server on port 80
  9. 2.send a simple GET request to see if stuff works well
  10. 3.attempt a login by sending password and username
  11.  
  12. the good news
  13. -------------------
  14. 1. connection was successful
  15. 2. GET / HTTP/1.1 request worked well
  16.  
  17. the bad news
  18. -------------------
  19. 1. the post was not sucessful and i have totally failed to see why
Attached Files
File Type: txt source code.txt (4.3 KB, 8 views)
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 181
Reputation: Paul.Esson is an unknown quantity at this point 
Solved Threads: 10
Paul.Esson's Avatar
Paul.Esson Paul.Esson is offline Offline
Junior Poster

Re: automating login to a server using c++

 
0
  #2
Nov 22nd, 2008
I don't know if this is the problem, but on the post request you have the terminating empty line after you have the post data.

  1. Strcat(szSendBuffer,"/r/n);//the terminating empty line
  2.  
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC