RSS Forums RSS

automating login to a server using c++

Please support our C++ advertiser: Programming Forums
Reply
Posts: 1
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++

  #1  
Nov 22nd, 2008
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
i tested this code on www.campuser.net
i was able to see the pages http requests using a firefox addon called tamper data to analyse their requests
source code is attached

steps taken
----------------
1. connect to the server on port 80
2.send a simple GET request to see if stuff works well 
3.attempt a login by sending password and username

the good news
-------------------
1. connection was successful
2. GET / HTTP/1.1  request worked well

the bad news
-------------------
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, 7 views)
AddThis Social Bookmark Button
Reply With Quote  
Posts: 175
Reputation: Paul.Esson is an unknown quantity at this point 
Solved Threads: 8
Paul.Esson's Avatar
Paul.Esson Paul.Esson is offline Offline
Junior Poster

Re: automating login to a server using c++

  #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.

Strcat(szSendBuffer,"/r/n);//the terminating empty line
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the C++ Forum
Views: 509 | Replies: 1 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:32 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC