Closed Thread Icon

Preserved Topic: EVEN MORE PERL HELP! LAST ONE! =) (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=17733" title="Pages that link to Preserved Topic: EVEN MORE PERL HELP! LAST ONE! =) (Page 1 of 1)" rel="nofollow" >Preserved Topic: EVEN MORE PERL HELP! LAST ONE! =) <span class="small">(Page 1 of 1)</span>\

 
foam
Bipolar (III) Inmate

From: Fontana, Ca, USA
Insane since: Jun 2000

posted posted 06-20-2000 21:17

Hello all, I wrote this script so it will check a users username and password before posting to a forum. Can anyone go through it and find errors or what not? Please =)

thanks alot!

#!/usr/bin/perl


&get_form_input;
$message = $FORM{'message'};
$username = $FORM{'username'};
$password = $FORM{'password'};
#############################
#
# This Forum copyright Scott Hedstrom
# No unauthorized Use.
#
#############################
#
# Start of Development: June 15, 2000
# End of Development: TBA
#

#Define These Variables

$forumname="foamFORUM";
#The name of the forum here

$outputfile="foruminput.txt";
#This file is where the script will write to. Use it for an SSI

$sendsite="http://foam.ms/forum/index.shtml";
#The location you want them to be sent after message submition.

# End of Variable Info

#Opens the Output file for input.

open(outfile, ">$outputfile") &#0124; &#0124; die;

# End of File copying

#Start of file writting.

&check_password

close(outfile); #Closes the file.

# Creates the webpage
print "Content-type: text/html\n\n";
print "<HTML><HEAD><TITLE>$forumname</TITLE></HEAD>
<BODY>Message Submitted by $username :\n $message</BODY></HTML>";

sub get_form_input
{
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<([^>]

« BackwardsOnwards »

Show Forum Drop Down Menu