Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 19th, 2000, 10:50 AM
chinnavi
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
hai
i have one problem with my CGI Script !.
I have a Login Form that will ask users the login and password AND clicking on Submit button ...
Now i wrote the validation script that will check for login and password correct and throw other htmls...
The problem is , after clicking the button i can see what is the form contents , there everybody could able to see the the URL like this .... http://192.168.0.10/cgi-bin/cgi2.cgi?code=brilines&passwd=briline&section=a
i wanna erase passwd section to be not viewable ... How can i do this ....?


vijay

Reply With Quote
  #2  
Old July 19th, 2000, 12:11 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>i wanna erase passwd section to be not viewable ... How can i do this ....?

Use POST method instead.

Reply With Quote
  #3  
Old July 19th, 2000, 01:26 PM
ledjon
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Make sure you have your cgi script setup to parse the POST info rather than the GET info (which is what you have right now). Or you could have it parse both.

Reply With Quote
  #4  
Old July 20th, 2000, 02:05 AM
chinnavi
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
hai
thanks all for your valuable suggestion ..

i dont know to parse the GET and POST info
--->
Make sure you have your cgi script setup to parse the POST info rather than the GET info
--->

Can you please tell mer how to parse the POST
or GET info?


vijay

Reply With Quote
  #5  
Old July 20th, 2000, 02:28 AM
ledjon
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
####
&sub parse_data;

sub parse_data {
####Post Data
read(STDIN, $namevalues, $ENV{'CONTENT_LENGTH'});
@namevalues = split(/&/, $namevalues);
foreach $namevalue (@namevalues) {
($name, $value) = split(/=/, $namevalue);
$name =~ tr/+/ /;
$value =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$INPUT{$name} = $value;
}
####Get Data
$temp=$ENV{'QUERY_STRING'};
@pairs=split(/&/,$temp);
foreach $item(@pairs) {
($name,$value)=split (/=/,$item,2);
$value=~tr/+/ /;
$value=~ s/%(..)/pack("c",hex($1))/ge;
$request{$name}=$value;
}
}#End Sub
####
[/code]

let's say you have a for with: <input type="text" name="asdf">

if you use the get method (put 'method="GET"'
in the <form> tag) the $request{asdf} would be that sting. If you use the POST method $INPUT{asdf} would hold the data.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > CGI Password Problem!

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap