GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 05-May-2009, 12:58
Hossein309 Hossein309 is offline
New Member
 
Join Date: May 2009
Posts: 1
Hossein309 is on a distinguished road

Write a program that automatically fill a Internet (web) form


hi guys
I need to write a program that automatically fill a internet (web) form.
Someone can help me ?
Tanks.
  #2  
Old 05-May-2009, 20:48
Mexican Bob's Avatar
Mexican Bob Mexican Bob is offline
Member
 
Join Date: Mar 2008
Location: Chicxulub, Yucatán
Posts: 226
Mexican Bob is a jewel in the roughMexican Bob is a jewel in the roughMexican Bob is a jewel in the rough

Re: help: network programing


Quote:
Originally Posted by Hossein309
hi guys
I need to write a program that automatically fill a internet (web) form.
Someone can help me ?
Tanks.

Many HTML forms use the HTTP REQUEST POST method. The data format and structure of this kind of "request" is extremely well-documented. Search the RFCs starting with 1945, which is probably enough for most forms that will actually accept a post method and 2616 for those that might otherwise have "issues." (not that I'd know what they are, I'm not a "web" programmer)

A very simple test would be to set up your own web site that echos back the contents of a form submission using the post method. You could also use the get method, but I'd probably start with post. Then I'd write a stupid-simple C++ (or even C) program that opens a socket, connects to the respective server on the assigned port (probably 80) and sends the HTTP REQUEST using the POST method.

It ain't very tough and I haven't done it since about 1995 or 1996, so it may have changed somewhat.

Experiment with your GET method, too. This will be the <form action="...get or post..."> part of the form. If you have some kind of working basis from which you're starting, use the HTTP REQUEST [method] specified in the form code.

Basically, you'll be creating a query string with the variable name and the value and sending them to the server.

telnet [host] [port]

...is your friend. So is creating a listener socket on the localhost that listens on the port that you would submit your request to so that you can see how your browser forms requests to various forms online that you would potentially use as guidelines for creating your own. The code is absolutely trivial (once you understand it!), so have some fun with it. There are literally dozens of websites that provide these kinds of fundamental services without fee. If you have a server that has a PHP processor, then you can very easily use "phpinfo" as an "echo server" for your requests with very little effort.

The key to all of this is understanding the HTTP. See RFC 1945. There really isn't much too it and it is about as common as stars in the skies at night in the middle of nowhere.


MxB
  #3  
Old 25-May-2009, 00:29
Peter_APIIT Peter_APIIT is offline
Regular Member
 
Join Date: May 2007
Location: Malaysia
Posts: 545
Peter_APIIT can only hope to improve

Re: Write a program that automatically fill a Internet (web) form


Do you want to write malicious code ?
 
 

Recent GIDBlogProgramming ebook direct download available by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Old Computer Linux Network Planning 6795 Computer Software Forum - Linux 1 09-Dec-2007 22:56
network card problem - cannot connect to Internet newbie06 Computer Software Forum - Linux 4 01-Feb-2007 07:16
Now You Can Network Play Red Alert Winxp antoinefinch Computer Software Forum - Games 3 04-Aug-2006 09:48
Working with Network !! kaiser3519 MS Visual C++ / MFC Forum 1 08-Jun-2006 02:11
Network etiquette article crystalattice Open Discussion Forum 0 01-Oct-2004 15:38

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 22:32.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.