½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > Áú¹®°ú´äº¯ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
PHP
ASP
css
mysql
HTML
jquery
������
image
slide
API
¸Þ´º
°Ô½ÃÆÇ
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ Áú¹®°ú´äº¯ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 23 | Á¶È¸¼ö 585 | µî·ÏÀÏ 2000-03-01 03:27:22

´Ð³×ÀÓ

Anonymous

À̸ÞÀÏ

Á¦¸ñ

¸ÞÀϸµ ¸®½ºÆ® °ü·Ã Áú¹®ÀÔ´Ï´Ù!
³»¿ë

PowerList¶ó´Â °­·ÂÇÑ ¸ÞÀϸµ ¸®½ºÆ®¸¦ ±¸Çؼ­ ¾²°í ÀÖ½À´Ï´Ù.
ÃÖ´ë 10¸¸¸í±îÁö ¸ÞÀÏ ¹ß¼Û¿¡ ÀÌ»óÀÌ ¾ø´Ù°í Çϳ׿ä.
´Ü ÇÑ°¡Áö ¹®Á¦´Â ¸ÞÀÏ ¹ß¼Û½Ã html űװ¡ Áö¿øµÇÁö ¾Ê´Â Á¡ÀÔ´Ï´Ù.
±×·¡¼­ Á» °íÃĺôµ¥¿ä...
´ÙÀ½ ºÎºÐÀ».. (Àüü ¼Ò½º´Â ¾Æ·¡¿¡ ÀÖ½À´Ï´Ù.)
open(MAIL, "&pip;$mail_prog -t") &pip; &pip; &error("Could not send out emails");
print MAIL "To: $line
";
print MAIL "From: $your_name <$your_email>
";
print MAIL "Subject: $INPUT{
subject
}
";
print MAIL "$INPUT{
body
}";
print MAIL "

";
´ÙÀ½°ú °°ÀÌ ¹Ù²Ù¾ú½À´Ï´Ù.
open(MAIL, "&pip;$mail_prog -t") &pip; &pip; &error("Could not send out emails");
print MAIL "To: $line
";
print MAIL "From: $your_name <$your_email>
";
print MAIL "Subject: $INPUT{
subject
}
";
print MAIL "Content-type: text/html

";
print MAIL "$INPUT{
body
}";
print MAIL "

";
ÀÌ·¸°Ô ÇÏ´Ï ¾Æ¿ô·è¿¡¼­ ¸ÞÀÏÀ» ¹Þ¾Æº¼¶§´Â html ű׸¦ ¿Ïº®È÷ Áö¿øÇß½À´Ï´Ù.
orgio mail µî ±âŸ À¥¸ÞÀÏ¿¡¼­µµ ÀÌ»óÀÌ ¾ø´Â °Í °°Àºµ¥...
À¯µ¶ °¡Àå ¸¹Àº ȸ¿øÀ» º¸À¯ÇÑ ÇѸÞÀÏ¿¡¼­¸¸ ÷ºÎ È­ÀÏ·Î ³ªÅ¸³³´Ï´Ù.
¾µµ¥¾øÀÌ ¿Ø ¹ÙÀÌ·¯½º °Ë»çÇϰڳĴ ¸Þ½ÃÁö°¡ ¶ß³×¿ä...
Attached file
File name: unknown / ¹ÙÀÌ·¯½º üũ ÈÄ ´Ù¿î·Îµå
Content-Type: text/html
ÀÌ·± ½ÄÀ¸·Î¿ä...
¹ã»õ º°°É ´Ù ¶â¾î°íÄ¡°í ÇغÁµµ ´äÀ» ¸ø ã¾Ò½À´Ï´Ù.
ÇѸÞÀÏ¿¡¼­ ÷ºÎÈ­ÀÏÀÌ ¾Æ´Ï¶ó ¹Ù·Î html ű׸¦ Áö¿øÇÒ ¼ö ÀÖ´Â ¹æ¹ý
Á¶¾ð ºÎŹ µå¸³´Ï´Ù.
´ÙÀ½Àº PowerList.zip¿¡ Æ÷ÇÔµÈ cgi È­ÀÏÀÇ ÀüüÀÔ´Ï´Ù.
cgi Çϳª·Î ±¸¼ºµÈ ÇÁ·Î±×·¥ÀÔ´Ï´Ù.
Âü°íÇØÁÖ¼¼¿ä.
°ü·Ã »çÀÌÆ® - http://solutionscripts.com/forum/index.cgi

PowerList 1.4
- mail.cgi -

#!/usr/bin/perl
#
#######################################################
# Power List version 1.4
#
# Created by: Solution Scripts
# Email: solutions@solutionscripts.com
# Web: http://solutionscripts.com
#
#######################################################
#
#
# COPYRIGHT NOTICE:
#
# Copyright 1997-1999 Solution Scripts All Rights Reserved.
#
# This program is being distributed as freeware. It may be used and
# modified free of charge, so long as this copyright notice, the header
# above and all the footers in the program that give me credit remain
# intact. Please also send me an email, and let me know
# where you are using this script.
#
# By using this program you agree to indemnify Solution Scripts from any liability.
#
# Selling the code for this program without prior written consent is
# expressly forbidden. Obtain permission before redistributing this
# program over the Internet or in any other medium. In all cases
# copyright and header must remain intact.
#
######################################################

$name_list = "Power List Demo";
# THE NAME OF YOUR MAILING LIST
$your_email = "email@domain.tld";
# YOUR EMAIL ADDRESS
# don
t forget the before @
$your_name = "Power List";
# YOUR NAME
# Will show up in the from field
# of all emails sent
$mail_prog = "/usr/sbin/sendmail";
# PATH TO MAILER PROGRAM:
# This has to point to your sendmail program. If your server does not
# have sendmail, you may need to modify the open(MAIL,"&pip;$mailprog -t");
# lines in all of the scripts to support whatever format your server
# email system requires. If you are not sure, ask your server
# administrator. If you have a virtual domain with your own root
# directory, look in the /usr/sbin , /usr/lib, /usr/bin, and similar
# directories, for a program named sendmail. If it does not exist,
# ask your server admin what is the correct calling method. This is a
# server dependent problem, and we at Solution Scripts cannot help you with
# this. If you have other working scripts that send email, look at
# them for clues.
$remove_link = 1;
# This will put a link at the bottom of all emails sent out, where a user can click on
# to automatically be removed from your mailing list. Set to 1 for on, 0 for off.
##############################################################################
# CHANGE NO MORE
$version = "1.4";
$thisurl = $ENV{
SCRIPT_NAME
};
$mail_url = $ENV{
SERVER_NAME
};

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;
if ($INPUT{$name}) { $INPUT{$name} = $INPUT{$name}.",".$value; }
else { $INPUT{$name} = $value; }
}
unless ($INPUT{
email
}) {
print "Content-type: text/html

";
&Top;
}
$temp=0;
$temp=$ENV{
QUERY_STRING
};
if ($temp) {
$INPUT{
address
} = $temp;
&remove;
}
if ($INPUT{
email
}) { &email; }
elsif ($INPUT{
action
} eq "subscribe") { &subscribe; }
elsif ($INPUT{
action
} eq "remove") { &remove; }
elsif ($INPUT{
newpass
}) { &newpass; }
elsif ($INPUT{
delete_select
}) { &delete_select; }
elsif ($INPUT{
delete_final
}) { &delete_final; }
elsif ($INPUT{
sendemail
}) { &sendemail; }
elsif ($INPUT{
address
}) { &subscribe; }
else { &admin; }
exit;
########### MAIN ADMIN SCREEN ##########
sub admin {
open (PASSWORD, "password.txt");
$password = ;
close (PASSWORD);
chop ($password) if ($password =~ /
$/);
if (!$password) {
print <



Set Admin Password





Before you can do anything else,
you
ll need to set your administrative password.
This will allow you to use the administrative functions,


Please enter your desired password below.
(Enter it twice.)








EOF
&Bottom;
exit;
}

$numemail=0;

open(LIST,"address.txt");
@addresses=;
close(LIST);

$numemail = push(@addresses);

print <





Add or remove an email address








Subscribe &pip; Unsubscribe















Admin Functions




Send out an email to $numemail emails





Delete selected addresses from database





Enter admin password
Needed for both of above




EOF
&Bottom;
exit;
}
########## SET NEW PASSWORD ##########
sub newpass {

unless ($INPUT{
passad
} eq $INPUT{
passad2
}) {
print <



Error!!



Your administrative password was
not set, as the two entries were different!

EOF
&Bottom;
exit;
}
if ($INPUT{
passad
}) {
$newpassword = crypt($INPUT{
passad
}, aa);
}
else {
print <



Error!!




You must enter a password!

EOF
&Bottom;
exit;
}
if (-e "password.txt") {
print <



Error!!




Password already exists


To set a new password manually delete the


password.txt file locted in the same


directory as mail.cgi

EOF
&Bottom;
exit;
}
open (PASSWORD, ">password.txt") &pip;&pip; &error(1);
print PASSWORD "$newpassword";
close (PASSWORD);
print <



Password Set



Your administrative password has been set.



EOF
&admin;
exit;
}
########## SUBSCRIBE NEW EMAILS ##########
sub subscribe {
unless ($INPUT{
address
}=~/@/) {
&error_pretty("You entered an invalid email address, please go back an try again");
}
open(LIST,"address.txt");
@addresses=;
close(LIST);
@add = grep{ /$INPUT{
address
}/i } @addresses;
if (@add) {
&error_pretty("The address you entered, @add is already in our mailing list");
}

open(LIST,">>address.txt") &pip;&pip; &error(2);
print LIST "$INPUT{
address
}
";
close(LIST);
print <



Email successfully added!!





Thank you for you interest

The address $INPUT{
address
}
has been added to our mailing list



EOF
&Bottom;
exit;
}

########## REMOVE ADDRESSES ##########
sub remove{
unless ($INPUT{
address
}) {
&error_pretty("You must enter an address to be removed");
}
if (-e "address.txt") {
open(LIST, " flock LIST, 2;
@addresses = ;
seek (LIST, 0, 0);
truncate (LIST,0);

foreach $add(@addresses) {
chomp($add);
unless ($add =~ /^$INPUT{
address
}$/i) {
print LIST "$add
";
}
else {
$found=1;
}
}
close(LIST);
}
print <



Email successfully removed




We are sorry to see you go

The address $INPUT{
address
}
has been removed from our mailing list



EOF
&Bottom;
exit;
}
########## SEND EMAILS ##########
sub email {
&checkpassword;

####
$pid = fork();
print "Content-type: text/html

fork failed: $!" unless defined $pid;
if ($pid) {
#parent
print "Content-type: text/html

";
&Top;
print <



Email successfully sent!!






Emails sent

EOF
&Bottom;
exit(0);
}
else {
#child
close (STDOUT);
open(LIST,"address.txt");
@addresses=;
close(LIST);
$num_email=0;


foreach $line(@addresses) {
chomp($line);
open(MAIL, "&pip;$mail_prog -t") &pip;&pip; &error("Could not send out emails");
print MAIL "To: $line
";
print MAIL "From: $your_name <$your_email>
";
print MAIL "Subject: $INPUT{
subject
}
";
print MAIL "$INPUT{
body
}";
print MAIL "

";
if ($remove_link) {
print MAIL "-------------------------------------------------------------------------
";
print MAIL "To be removed from this mailing list
";
print MAIL "click on the link below
";
print MAIL "http://$mail_url$thisurl?$line
";
}
print MAIL "

";
close (MAIL);
$num_email ;
}
open(MAIL, "&pip;$mail_prog -t") &pip;&pip; &error("Could not send out emails");
print MAIL "To: $your_email
";
print MAIL "From: $your_name <$your_email>
";
print MAIL "Subject: $INPUT{
subject
}
";
print MAIL "$num_email where sent out with the following message

";
print MAIL"-----------------------------------------------------------------------------------------
";
print MAIL "$INPUT{
body
}";
print MAIL "

";
print MAIL "

";
close (MAIL);
exit(0);
}


}
########## DELETE SELECTED EMAILS ##########
sub delete_select {

&checkpassword;
open(LIST,"address.txt");
@addresses=;
close(LIST);
@addresses = sort(@addresses);
print <




EOF

$num_email=0;
foreach $line(@addresses) {
chomp($line);
if ($num_email == 3) {
print "";
$num_email=0;
}
print "";
$num_email ;
}
print <

Select email to delete

";
print " -- $line

Enter your admin password








EOF
&Bottom;
exit;

}
########## DELETE MULTIPLE ##########
sub delete_final {

&checkpassword;
open(LIST,"address.txt");
@addresses=;
close(LIST);
@deleting = split(/,/,$INPUT{
delete
});
foreach $line(@deleting) {
@addresses = grep{ !(/$line/i) } @addresses;
}
open(LIST,">address.txt") &pip;&pip; &error(2);
print LIST @addresses;
close(LIST);
print <



Emails Removed

The following emails have been deleted from the database



$INPUT{
delete
}



EOF
&Bottom;
exit;
}
########## WRITE THE EMAIL ##########
sub sendemail {

&checkpassword;
print <





Create email to send to all users



Subject




Body of Message




Admin Password:




EOF
&Bottom;
exit;
}
########## CHECK PASSWORD ##########
sub checkpassword {
open (PASSWORD, "password.txt");
$password = ;
close (PASSWORD);
if ($INPUT{
password
}) {
$newpassword = crypt($INPUT{
password
}, aa);
unless ($newpassword eq $password) {
&error_pretty("Wrong Password");
}
}
else {
&error_pretty("You must enter a password");
}
}

sub Top {
print <$name_list




       
$name_list
       





EOF
}
sub Bottom {
print <



http://solutionscripts.com/index.shtml">Power List v $version
Free from http://solutionscripts.com/index.shtml">Solution Scripts





EOF
}
sub error{
$errors = $_[0] ;
if ($errors == 1) {
$error_msg = "Unable to write to password.txt";
}
else {
$error_msg = "Unable to write to address.txt";
}
print <



Fatal Error!!





$error_msg -
$!


If the above error states "Permission Denied than either the dir this cgi file is in or the text file mentioned need
to be chmoded to 777.


Do not worry if you do not have the file mentioned, once the permissions are set correctly it will be created for you.



If you are having trouble with this script
please post a message to the
http://solutionscripts.com/forum/index.cgi">CGI Forum


EOF
&Bottom;
exit;
}
sub error_pretty {
$errors = $_[0];
print <



Error!!





$errors



EOF
&Bottom;
exit;
}
Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
ÀÌÀü°Ô½Ã±Û °è½ÃÆÇÀ» ¹Ù²Ù¸é ÀÌÀü¿¡ ÀÚ·á´Â??? 2000-03-01 02:27:20
´ÙÀ½°Ô½Ã±Û ¼îÇθô Ä«µå¼Ò½º ¾ø¾î¿ä ¼³Ä¡¼³¸í ÀÚ¼¼ÇÏ°Ô ÀߵȰſä 2000-03-01 03:44:58