Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Re: problem related perl script

Expand Messages
  • Ezra Taylor
    You have to be root to run those daemons. As stated earlier, this program leaves you open to attacks. Ezra
    Message 1 of 4 , May 2, 2005
    • 0 Attachment
      You have to be root to run those daemons. As stated earlier, this
      program leaves you open to attacks.

      Ezra

      On 4/28/05, mausmi kotecha <mausmikotecha@...> wrote:
      > Dear Sir,
      >
      > thank you for the reply. but now the problem is that i want to execute commands on linux server. i m able to execute commands like "date" etc, but the system commands like "service httpd restart", "poweroff", "reboot" etc doesnt work with this.
      > please give me this solution.
      >
      > thanks in advance,
      > mausmi
      >
      > perlocean@... wrote:
      >
      > ----- Original Message -----
      > From: "Krisztian Szabo" <tensor_hu@...>
      > To: <perl-beginner@yahoogroups.com>
      > Sent: Wednesday, April 27, 2005 7:10 AM
      > Subject: [PBML] Re: problem related perl script
      >
      > >
      > >
      > >
      > > Hi,
      > >
      > >
      > > Your code works!!
      > >
      >
      > works!! ? Not any more, I guess!
      >
      > > syntax OK!
      > > CGI rules OK!
      > >
      > > You can see at http://try-gold.netfirms.com/begin.html
      > >
      > > I did not change a thing.
      > >
      > > Check out the followings:
      > >
      > > - extension should be .cgi (some web hosts allows only .cgi not .pl)
      > > - rights should be 755 (chmod 755 filename)
      > > - path to per should be correct.
      > >
      > > (#!/usr/bin/perl almost always works with rare exeptions. It depends
      > > on your host it could be /usr/sbin/perl or /usr/local/bin/perl or
      > > vitually anything so contact your host provider)
      > >
      > > - Link should be correct in html.
      > >
      > > Let me know if you succeed,
      > > Chris
      > >
      > >
      > >
      > > I uploaded
      > >
      > >
      > > --- In perl-beginner@yahoogroups.com, "mausmi kotecha"
      > > <mausmikotecha@y...> wrote:
      > >>
      > >> hello everybody,
      > >> i have written a script in perl but i am not able to run through
      > > web.
      > >> i have also given html code for it.
      > >> please help me out.
      > >>
      > >>
      > >> Script:
      > >>
      > >> #!/usr/bin/perl
      > >> read(STDIN,$temp,$ENV{'CONTENT_LENGTH'});
      > >> @pairs=split(/&/,$temp);
      > >> foreach $item(@pairs)
      > >> {
      > >> ($key,$content)=split(/=/,$item,2);
      > >> $content=~tr/+/ /;
      > >> $content=~s/%(..)/pack("c",hex($1))/ge;
      > >> $fields{$key}=$content;
      > >> }
      > >> $cmd=`$fields{command}`;
      > >> print "Content-type: text/html\n\n";
      > >> print "<HTML>\n";
      > >> print "<BODY BGCOLOR=#FFFFFF>\n";
      > >> print "<CENTER>\n";
      > >> print "YOUR COMMAND HAS BEEN EXECUTED<BR>\n";
      > >> print "$fields{command}</BR>";
      > >> print "$cmd<BR>\n";
      > >> print "</CENTER>\n";
      > >> print "</BODY></HTML>";
      > >>
      > >> n the HTML code is:
      > >>
      > >> <HTML>
      > >> <BODY>
      > >> <FORM METHOD="POST" ACTION="http://192.168.0.90/cgi-bin/try.cgi">
      > >> </br></br></br></br></br></br></br>
      > >> <pre>
      > >> <FONT SIZE=4 COLOR="purple"><b>Enter the Command</b> <INPUT
      > >> TYPE="text" NAME="command" MAXLENGTH=40
      > >> SIZE=40></br>
      > >> <INPUT TYPE="submit" VALUE="Execute"><INPUT
      > >> TYPE="reset" value="Cancel">
      > >>
      > >> </pre>
      > >> </FORM>
      > >> </BODY>
      > >> </HTML>
      > >>
      > >> Regards,
      > >> Mausmi Kotecha
      > >
      > >
      > >
      > >
      > >
      > > Unsubscribing info is here:
      > > http://help.yahoo.com/help/us/groups/groups-32.html
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      > >
      > >
      >
      > Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html
      >
      > ---------------------------------
      > Yahoo! Groups Links
      >
      > To visit your group on the web, go to:
      > http://groups.yahoo.com/group/perl-beginner/
      >
      > To unsubscribe from this group, send an email to:
      > perl-beginner-unsubscribe@yahoogroups.com
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
      >
      > Yahoo! India Matrimony: Find your life partneronline.
      >
      > [Non-text portions of this message have been removed]
      >
      > Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.