Ajuda Para Instalar Scripts
#1
Posted 03/08/2004, 05:59
desde ja agradeço
info@chapadao.net
interessados mande MP
#2 Whitesnake
Posted 03/08/2004, 14:04
Até
#3
Posted 04/08/2004, 10:07
eu coloco ele no server do os chomd ai ainda da erro 550 mudo os chomd da erro 500
ai outra coisa eh a parte que roda o script ele em local roda agr em sever pifa....
Stone Rock me manda um email que eu te mando o script pra vc ver blz??
por favor prciso urgente desses scripr
interessados mande MP
#4
Posted 04/08/2004, 10:25
primeiro veja se tem a a linha inicial:
print "Content-type: text/html\n\n";
depois seguimos com as outras duvidas... Estaremos aguardando...
Steven Koch
stvkoch@gmail.com
#5 Whitesnake
Posted 04/08/2004, 15:06
Porém acho que seria legal que você postasse o código aqui no fórum também. Pois ainda mais usuários poderão lhe ajudar.
Abraços
#6
Posted 05/08/2004, 03:04
#!/usr/local/bin/perl require './jcode.pl'; # $set[12] ‚ÌÝ’èƒtƒ@ƒCƒ‹‚ðŽg‚¤ê‡: index.cgi?no=12 $set[0]="./set.cgi"; $set[1]="./set1.cgi"; $set[2]="./set2.cgi"; # Palavras proibidas\ @NW=('xxxxxx','xxxxxx','xxxxxx','xxxxxx'); $j_=0; $i_=0; $a_=0; $e_=0; $Imode=$ENV{'HTTP_USER_AGENT'}; $Jskyw=$ENV{'HTTP_X_JPHONE_MSNAME'}; if($Jskyw ne ""){$j_=1;} if($Imode=~ /DoCoMo/){$i_=1;} elsif($Imode=~ /J-PHONE\/2/){$j_=1;} elsif($Imode=~ /J-PHONE\/[3-9]/){$j_=2;} elsif($Imode=~ /ASTEL/){$a_=1;} elsif(index($Imode,"UP.Browser")==0){$e_=1;} elsif(index($Imode,"UP.Browser") > 0){$e_=2;} if($j_ || $i_ || $a_ || $e_){$PC=0;}else{$PC=1;} $html=""; &d_code_; if($no eq ""){$no=0;} if($set[$no]){unless(-e $set[$no]){&er_('Arquivo nao encontrado');}else{require "$set[$no]";}} else{&er_('Pagina nao encontrada');} $nf="<input type=hidden name=no value=$no>\n"; if($diary){$Form1="Tempo";$Form2="Data";}else{$Form1="Nome";$Form2="E-mail";} if($j_==1){$met="GET";} if($j){$MAX=" maxlength=50";}else{$MAX="";} if($mode eq "edit"){&Edit;} if($mode eq "all"){&all_;} if($mode eq "fom"){&fom_;} if($mode eq "man"){&man_;} if($mode eq "wri"){&wri_;} if($mode eq "del"){&del_;} if($mode eq "s_d"){&s_d_;} if($mode eq "nam"){&hen_;} if($mode eq "h_w"){&h_w_;} if($access){ if($access==1 && $j_==0){&er_("Entrada proibida favor acessar por um celular da vodafone!");} elsif($access==2 && $i_==0){&er_("Entrada proibida favor acessar por um celular da DoCoMo!");} elsif($access==3 && $a_==0){&er_("Entrada proibida favor acessar por um celular!");} elsif($access==5 && $e_==0){&er_("Entrada proibida favor acessar por um celular EZWEB!");} elsif($access==4 && $a_==0 && $i_==0 && $j_==0 && $e_==0){ &er_("Entrada proibida favor acessar por um celular!"); } } &html_; # # [Formulario] # sub fom_ { if($diary && $FORM{'pass'} ne "$pass"){&er_("Apenas os moderadores do site possui essa senha");} &get_; if($diary){$c_email=$date;} $c_max2=$c_max/2; $n_max2=$n_max/2; &hed_; $html.= <<"_FORM_"; <center>[<a href="$cgi_f?no=$no">Voltar</a>]<br> Formulario de envio</center><hr> Esse mural possui um filtro, palavras obcenas nao apareceram<br> <form action="$cgi_f" method="$met">$nf <input type=hidden name=mode value=wri> $Form1„<br><input type=text name=name value="$c_name" size=16 maxlength=$n_max><br> $Form2„<br><input type=text name=email value="$c_email" size=16$MAX><br> Mensagem„<br> <textarea name=comment rows=4 cols=14 wrap=$wrap></textarea><br> Maximo de $c_max2 letras<br> <input type=submit value="Enviar"> <input type=reset value="Refazer"></form> _FORM_ &foot_; } # # [Paginas do topo] # sub html_ { unless(-e $log){&l_m($log);} if($cou){unless(-e $c_f){&l_m($c_f);}} open(LOG,"$log") || &er_("Can't open $log"); @lines = <LOG>; close(LOG); &hed_; $html.= "<center>\n"; $html.= "$title\n"; if($diary){$html.= "<hr>[<a href=\"$back\">Voltar</a>]</center><hr>$com<hr>\n";}else{ $html.= <<"_HTML_"; <hr> [<a href="$cgi_f?mode=man&no=$no">Regras</a>]</center><br>[<a href="$cgi_f?mode=fom&no=$no">Enviar mensagem</a>] $com<hr> _HTML_ } $total=@lines; $page_=int(($total-1)/$a_max); if($FORM{'page'} eq ''){$page=0;}else{$page=$FORM{'page'};} $end_data=@lines - 1; $page_end=$page+($a_max-1); if($page_end >= $end_data){$page_end=$end_data;} foreach ($page .. $page_end) { ($namber,$date,$name,$email,$comment) = split(/<>/,$lines[$_]); if($email ne "" && $diary==0){ $name="<a href=\"mailto:$email\">$name</a>"; } &auto_($comment); if($diary){$html.="$email<br>$name<br>$comment<hr>\n";} else{$html.= "$name<br>$comment<br>$date<hr>\n";} } $next_line=$page_end + 1; $back_line=$page - $a_max; if($back_line >= 0){$html.="\<\;<= <a href=\"$cgi_f?page=$back_line&no=$no\">Anteriores $a_max</a>|\n";} if($page_end ne $end_data){$html.="<a href=\"$cgi_f?page=$next_line&no=$no\">Proximas $a_max</a>=>\>\;\n";} $html.="</center><div align=right><form action=\"$cgi_f\" method=$met>"; if($cou){ &con_; } $html.= <<"_HTML_"; <input type=hidden name=mode value=del>$nf <input type=password name=pass size=6> <input type=submit value="entrar"><br> </form></div> _HTML_ &foot_; } # # [Pre configuracao] # sub wri_ { if($diary==0){ if(length($name) > $n_max){&er_("Nome muito comprido");} if(length($comment) > $c_max){&er_("Mensagem muito longa!");} } if($FORM{'name'} eq ""){&er_("Favor colocar um nome!");} if($FORM{'comment'} eq ""){&er_("Favor escrever uma mensagem!");} if($locks){&lock_;} open(LOG,"$log") || &er_("Can't open $log","1"); @lines = <LOG>; close(LOG); ($knum,$kd,$kname,$kem,$kcom) = split(/<>/,$lines[0]); if ($name eq $kname && $comment eq $kcom) { &er_("Proibido postar duas vezes seguidas!","1"); } &set_; @new=(); for($i=0;$i<$max-1;$i++) {push(@new,$lines[$i]);} $namber=$knum + 1; unshift (@new,"$namber<>$date<>$name<>$email<>$comment<>\n"); open(LOG,">$log") || &er_("Can't write $log","1"); print LOG @new; close(LOG); if(-e $lockf){rmdir($lockf);} if($t_mail && $mymail){&mail_;} elsif($t_mail && $mailad ne "$email" && $mymail==0){&mail_;} } # # [Editar e deletar] # sub s_d_ { if ($FORM{'pass'} ne "$pass") { &er_("Somente os moderadores possuem a senha!"); } open(DB,">$log"); print DB ""; close(DB); } # # [Regras] # sub man_ { &hed_; $html.= <<"_HTML_"; [<a href="$cgi_f?no=$no">Voltar</a>]<br> $title Regras<hr> -Favor respeitar cada mural<br> -Mural de mulheres apenas mulheres deverao postar, mural de homens apenas homens deverao postar e GLS somente GLS deverao postar<br> -Proibidos usar html<br> -Maximo de $max letras na mensagem<br> -Somente os moderadores poderao deletar as mensagens<br> -Nao usar palavras obcenas ou que ofenda algum usuario pois a mensagem sera deletada<br> -Obrigado colocar um nome e uma mensagem<br> _HTML_ &foot_; } # # [cabecalho] # sub hed_ { $html.= <<"_HTML_"; <html><head><title>$title</title> <!--$ver--><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=Shift_JIS"> </head> $body _HTML_ } # # [ƒtƒbƒ^•\Ž¦] # sub foot_ { $html.= <<"_HTML_"; <hr><!--Aldweb Japan--><center> -<a href="http://www.chapadao.net" target=_top>Chapadao.net</a>-</center> </body></html> _HTML_ &htmlp; } # # [Codigos dos formularios] # sub d_code_ { if($ENV{'REQUEST_METHOD'} eq "POST"){ if ($ENV{'CONTENT_LENGTH'} > 10000) { &er_("Mensagem muito longa!"); } read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); }else{ $buffer = $ENV{'QUERY_STRING'}; } @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; &jcode'convert(*value,'sjis'); $value =~ s/&/\&\;/g; $value =~ s/</\<\;/g; $value =~ s/>/\>\;/g; $value =~ s/\"/\"\;/g; $value =~ s/<>/\<\;\>\;/g; $value =~ s/<!--(.|\n)*-->//g; if(@NW){ foreach (0..$#NW){if(index($value,$NW[$_]) >= 0){&er_("$NW[$_]<br> A palavra acima e proibida... tente novamente!");}} } $FORM{$name} = $value; if($name eq 'del'){push(@d_,$value);} if($name ne 'comment'){$value =~ s/\r|\n|\r\n/ /g;} } $name = $FORM{'name'}; $comment=$FORM{'comment'};$comment=~ s/\r\n|\r|\n/<br>/g; $email= $FORM{'email'}; $mode = $FORM{'mode'}; $kiji = $FORM{'kiji'}; $namber=$FORM{'namber'}; $no = $FORM{'no'}; $ENV{'TZ'} = "JST-9"; ($sec,$min,$hour,$mday,$mon,$year,$wday) = localtime(time); $mon++; if ($hour < 10) { $hour = "0$hour"; } if ($min < 10) { $min = "0$min"; } $date = "$mday /$mon $hour\:$min"; if($diary && $email){$date=$email; $email="";} } # # [Confinguracao dos cookies] # sub set_ { ($secg,$ming,$hourg,$mdayg,$mong,$yearg,$wdayg,$ydayg,$isdstg) = gmtime(time + 30*24*60*60); $yearg += 1900; if ($secg < 10) { $secg = "0$secg"; } if ($ming < 10) { $ming = "0$ming"; } if ($hourg < 10) { $hourg = "0$hourg"; } if ($mdayg < 10) { $mdayg = "0$mdayg"; } $month = ('Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez')[$mong]; $youbi = ('Domingo','Segunda-feira','Terca-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sabado')[$wdayg]; $date_gmt = "$youbi, $mdayg $month\$yearg $hourg:$ming:$secg GMT"; $cook="name\:$name\,email\:$email"; print "Set-Cookie: LINEBBS=$cook; expires=$date_gmt\n"; } # # [Pagina administrativa] # sub get_ { $cookies = $ENV{'HTTP_COOKIE'}; @pairs = split(/;/,$cookies); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $name =~ s/ //g; $DUMMY{$name} = $value; } @pairs = split(/,/,$DUMMY{'LINEBBS'}); foreach $pair (@pairs) { ($name, $value) = split(/:/, $pair); $COOKIE{$name} = $value; } $c_name =$COOKIE{'name'}; $c_email=$COOKIE{'email'}; if($FORM{'name'}) {$c_name =$FORM{'name'};} if($FORM{'email'}){$c_email=$FORM{'email'};} } # # [ŠÇ——pƒy[ƒW] # sub del_ { if($FORM{'pass'} ne "$pass"){&er_("Apenas os Moderadores possuem essa senha!");} &hed_; if($diary){$html.="[<a href=\"$cgi_f?mode=fom&pass=$FORM{'pass'}&no=$no\"Entrar</a>]";} $html.= <<"_HTML_"; [<a href="$cgi_f?no=$no">Voltar</a>]<br> -Administracao- _HTML_ open(DB,"$log"); @lines = <DB>; close(DB); if($FORM{'del'}){ open(DB,"$log") || &er_("Can't open $log"); @COMS = <DB>; close(DB); @CAS = (); foreach $COMS (@COMS) { $COMS =~ s/\n//g; ($nam,$da,$na,$em,$com) = split(/<>/,$COMS); foreach $del (@d_) {if ($del eq $nam) {$COMS = "";}} if($COMS eq ""){ $n=""; }else{ $n="\n"; } push (@CAS,"$COMS$n"); } open (DB,">$log"); print DB @CAS; close(DB); @lines=@CAS; } if (-s $log) { $l_size = -s $log; }else{ $l_size = 0; } $html.= <<"_HTML_"; <hr>Tamanho $l_size<br> Clique no quadradinho para deletar<br> Para editar clique na mensagem¸ <form action="$cgi_f" method=$met>$nf <input type=hidden name=mode value="del"> <input type=hidden name=pass value="$FORM{'pass'}"> _HTML_ $total=@lines; $page_=int(($total-1)/$a_max); if($FORM{'page'} eq ''){$page = 0;}else{$page=$FORM{'page'};} $end_data=@lines - 1; $page_end=$page + ($a_max - 1); if($page_end >= $end_data){$page_end=$end_data;} foreach ($page .. $page_end) { ($namber,$date,$name,$email,$comment) = split(/<>/,$lines[$_]); $comment =~ s/<br>/ /g; if(length($comment)>16){$comment=substr($comment,0,14); $comment=$comment . '..'; } if($email ne "" && $diary==0){$name="<a href=\"mailto:$email\">$name</a>";} $html.= <<"_HTML_"; $namber/ <input type=checkbox name="del" value="$namber"><br> $name<br> <a href="$cgi_f?mode=nam&pass=$pass&kiji=$namber&no=$no">$comment</a><br><hr> _HTML_ } $html.= <<"_DEL_"; <br><br><input type=submit value="Deletar"> <input type=reset value="Resetar"></form> <form action="$cgi_f" method=$met>$nf <input type=hidden name=mode value="del"> <input type=hidden name=pass value="$FORM{'pass'}"> Numero a ser deletado<br><input type=text size=4 name=del$MAX> Colocar o numero <br><input type=submit value="Deletar"></form> <center>Paginas<br> _DEL_ $a=0; for($i=0;$i<=$page_;$i++){ $af=$page/$a_max; if($PC){$P=$page_; $M=0;}else{$P=$af+2; $M=$af-2;} if($i eq $af || $i > $P || $i < $M){$html.= "$i\n";} else{$html.= "<a href=\"$cgi_f?mode=del&page=$a&pass=$pass&no=$no\">$i</a>\n";} $a+=$a_max; } $html.= <<"_HTML_"; <hr><form action=$cgi_f method=$met>Entrada do admin <input type=hidden name=pass value="$FORM{'pass'}">$nf <input type=hidden name=mode value="s_d"><input type=submit value="Entrar"> </form> </center> _HTML_ &foot_; } # # [Fomulario de envio] # sub hen_ { if ($FORM{'pass'} ne "$pass") { &er_("Somente os moderadores possuem essa senha!"); } open(DB,"$log"); @lines = <DB>; close(DB); @new = (); $flag = 0; foreach $line (@lines) { ($namber,$date,$name,$email,$comment) = split(/<>/,$line); if ($kiji eq "$namber") { &hed_; $comment =~ s/<br>/\n/g; if($tag){$comment=~ s/</</g; $comment=~ s/>/>/g;} if($diary){$email=$date;} $html.= <<"_HTML_"; [<a href="$cgi_f?mode=del&pass=$pass&no=$no">Voltar</a>]<br> -No.$namber a ser editado- <form action="$cgi_f" method="$met">$nf <input type=hidden name=pass value="$FORM{'pass'}"> <input type=hidden name=mode value=h_w> <input type=hidden name=namber value=$namber> $Form1<br><input type=text name="name" value="$name" size=16$MAX><br> $Form2<br><input type=text name="email" value="$email" size=16$MAX><br> Comentario<br><textarea name="comment" rows=4 cols=16 wrap=$wrap>$comment</textarea><br><br> <input type=submit value="Enviar"> <input type=reset value="Refazer"></form> _HTML_ &foot_; } } } # # [Bloqueio] # sub h_w_ { open(DB,"$log"); @lines = <DB>; close(DB); @new = (); $flag = 0; foreach $line (@lines) { $line =~ s/\n//g; ($knam,$kd,$kn,$kmail,$kcom) = split(/<>/,$line); if ($namber eq "$knam") { $line = "$namber<>$date<>$name<>$email<>$comment<>"; $flag = 1; } push(@new,"$line\n"); } if ($flag == 0) { &er_("Esse numero nao existe"); } if ($flag == 1) { open (DB,">$log"); print DB @new; close(DB); } } # # [Bloquear palavras] # sub lock_ { $lflag = 0; foreach (1 .. 5) {if(mkdir($lockf, 0755)){$lflag=1; last;}else{sleep(1);}} if ($lflag == 0) { if(-e $lockf){rmdir($lockf);} &er_("LOCK is BUSY (Mural bloqueado, nao e possivel colocar mensagem)","1"); } } # # [Links permitidos] # sub auto_ { $_[0]=~ s/([^=^\"]|^)((http|ftp|https)\:[\w\.\~\-\/\?\&\+\=\:\@\%\;\#\,\|]+)/$1<a href=$2 target=_top>$2<\/a>/g; } # # [Editar contador] # sub con_ { if($locks){$lockf=$c_loc; &lock_;} open(NO,"$c_f") || &er_("Can't open $c_f","1"); $cnt = <NO>; close(NO); if($FORM{'mode'} eq "" && $FORM{'page'} eq "" && $ENV{'HTTP_REFERER'} !~ /$cgi_f/){ $cnt++; open(NO,">$c_f") || &er_("Can't write $c_f","1"); print NO $cnt; close(NO); } if(-e $c_loc){rmdir($c_loc);} if($mode eq ""){ while(length($cnt) < $fig){ $cnt = 0 . $cnt; } @cnts = split(//,$cnt); $html.= "$cnt<br>"; } } # # [erros] # sub er_ { if(-e $lockf && $_[1]==1){rmdir($lockf);} &hed_; $html.= "<center>[<a href=\"$cgi_f?no=$no\">Voltar</a>]<br>Desculpe ocorreu o seguinte erro<br>$_[0]</center>\n"; &foot_; } # # [Editando e-mail] # sub mail_{ $subj="$title “Mural de recados"; $Mail=<<"_MAIL_"; $subj ---------------- $name($email) $date $comment -----------END-- _MAIL_ if($email eq ""){ $email = 'info@chapadao.net'; } $Mail=~ s/<br>/\n/g; $Mail=~ s/\<\;/</g; $Mail=~ s/\>\;/>/g; $Mail=~ s/\"\;/\"/g; $Mail=~ s/\&\;/&/g; &jcode'convert(*subj,'jis'); &jcode'convert(*Mail,'jis'); if(open(MAIL,"| $s_mail $mailad")){ print MAIL 'X-Mailer: BBSI MAILER\n'; print MAIL "To: $mailad\n"; print MAIL "From: $email\n"; print MAIL "Subject: $subj \n"; print MAIL "MIME-Version: 1.0\n"; print MAIL "Content-type: text/plain; charset=ISO-2022-JP\n"; print MAIL "Content-Transfer-Encoding: 7bit\n\n"; print MAIL "$Mail"; close(MAIL); } } # # [‘‚«o‚µ] # sub htmlp { $len = length($html); print "Content-type: text/html\n"; if($i_){print "Content-length: $len\n";} print "\n"; print "$html"; exit; } # # [ƒƒO¶¬] # sub l_m { open(DB,">$_[0]") || &er_("Can't write $_[0]","0"); print DB ""; close(DB); chmod(0666,"$_[0]"); } # # [‘SÝ’èƒtƒ@ƒCƒ‹æ•\Ž¦] # sub all_ { &hed_; $T=@set; $html.="$T visitas<br>”\\<hr>"; foreach (0..$#set){ if($set[$_]){ unless(-e $set[$_]){$html.="$_)$set[$_] nao gostei<br>";} else{ require "$set[$_]"; $html.="$_)<a href=\"$cgi_f?no=$_\">$title</a><br>"; if(-e $log){$html.="@Û¸log ›";}else{$html.="@Û¸log ~";} if($cou){if(-e $c_f){$html.="/Contador ›";}else{$html.="/contador ~";}} } } $html.="<br><br>" } &foot_; } # # [Administrador] # sub Edit { &hed_; $html.=<<_EDIT_; <form action="$cgi_f" method=$met> -Master-<br> <input type=hidden name=mode value=del>$nf Pass/<input type=password name=pass size=8><br> <input type=submit value="Entrar"> </form> _EDIT_ &foot_; }
esse ai em cima é um que eu to usando e que esta funcionando normal
Attached Files
Edição feita por: rodrigo_kouti, 05/08/2004, 03:06.
interessados mande MP
#7 Whitesnake
Posted 05/08/2004, 16:24
Por exemplo, na 8º linha do arquivo ychat.cgi possui este código:
require '../ydenied.txt'; #‹‘”Ûƒtƒ@ƒCƒ‹
o correto seria
require './ydenied.txt'; #‹‘”Ûƒtƒ@ƒCƒ‹
por isto o script causa tal erro.
O seu interpretador está instalado em que lugar? #!/usr/local/bin/perl ou #!/usr/bin/perl ? Cheque corretamente a primeira linha dos scripts, pois, cada um indica o interpretador em locais diferentes.
Creio que estes sejam os erros.
Até +
#8
Posted 06/08/2004, 05:38
#!/usr/local/bin/perl
Galerinha espero muito ajuda de todos vocês, obrigado por sempre estar ajudando,,,
interessados mande MP
#9
Posted 07/08/2004, 02:04
interessados mande MP
#10
Posted 08/08/2004, 04:03
interessados mande MP
#11 Whitesnake
Posted 08/08/2004, 14:50
Se você fez as alterações que eu disse no último post e mesmo assim continuar dando erro 500, então o problema é no CHMOD dos arquivos. Além do require, não se esqueça de alterar a primeira linha dos arquivos.
#12
Posted 02/10/2017, 18:37
Cialis 40 Mg Cost viagra Meglio Cialis O Levitra Order Alli Online
Best Place To Buy Cialis Online viagra Order Metformin Without Prescription Remanso De Propecia Buy Diflucan Yeast Infection
Viagra Online Canada Overnight cialis Cheapest Amoxicillin Online Cipro No Prescription O Comprare Kamagra In Francia
#13
Posted 13/10/2017, 23:13
Viagra Per Gli Anziani Generic Propecia Overnight viagra online Cialis Dolor De Cabeza Cosa Costa Il Viagra Prix Levitra 20mg
Propecia Temple Hair Loss viagra Prix Viagra France
Cialis Por Mayoreo Cialis Yeux Levaquin Antibiotic Best Buy viagra Canine Cephalexin 500 Mg
#14
Posted 29/10/2017, 06:27
Buy Doxycycline In Mexico Viagra Blitzversand Generic Cialis Soft Tab viagra Propecia En Ligne Bon Marche Ordina Levitra
#15
Posted 16/11/2017, 19:21
Gel De Kamagra Acheter Du Kamagra Quebec viagra Cephalexin Lawsuit
Pharmacy4you Viagra Online Bestellen Plavix Online Prices generic viagra Pfizer Viagra Without Prescription Progesterone No Doctors Consult Mastercard Accepted Cash Delivery
Dealing With Anger Caused By Cymbalta Levitra 20mg Club viagra Purchase Fluoxetine
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)