By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,852 Members | 1,410 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,852 IT Pros & Developers. It's quick & easy.

How to post username and password to .cgi form

P: 19
Hie,

I am trying to post username and password to a .cgi form from a console based unix terminal.
Is it possible for posting data using Perl script?

Deperately looking out for suggestions/help..

Thanks
Mar 19 '08 #1
Share this Question
Share on Google+
3 Replies


KevinADC
Expert 2.5K+
P: 4,059
Are you running a CGI script? Normally you would use a CGI form to pass data via HTTP to a CGI script. You can pass data to a perl script via the command line, the simplest way:
Expand|Select|Wrap|Line Numbers
  1. perl script.pl var1 var2 var3
but the perl script has to be written to get data from the command line and not from a CGI form. You can use the CGI module in 'debug' mode to run CGI scripts from the command line and pass in data. See the CGI module documentation for details.
Mar 19 '08 #2

P: 19
Actually its .cgi form..and i was to post login data for authentication.
Could we download the cgi form and execute it ???

I have never tried my hands on cgi & perl scripting..
Please advise
Mar 20 '08 #3

KevinADC
Expert 2.5K+
P: 4,059
Actually its .cgi form..and i was to post login data for authentication.
Could we download the cgi form and execute it ???

I have never tried my hands on cgi & perl scripting..
Please advise

You lost me.Forms don't do anything except send data, you need a script on the server to process the data. If you already have a script that does some kind of authentication all you need to do is create a form and send the data to the script. If you do not have a script you will have to write one.
Mar 20 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.