!C99Shell v. 1.0 pre-release build #13!

Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a 

uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 

uid=99(nobody) gid=98(nobody) groups=98(nobody) 

Safe-mode: OFF (not secure)

/usr/doc/expect-5.38/example/   drwxr-xr-x
Free 318.33 GB of 458.09 GB (69.49%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     chesslib.c (1.34 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* chesslib.c - test expectlib */

#include <stdio.h>
#include "expect.h"

timedout()
{
    fprintf(stderr,"timed out\n");
    exit(-1);
}

char move[100];

read_first_move(fd)
int fd;
{
    if (EXP_TIMEOUT == exp_expectl(fd,
            exp_glob,"first\r\n1.*\r\n",0,
            exp_end)) {
        timedout();
    }
    sscanf(exp_match,"%*s 1. %s",move);
}

/* moves and counter-moves are printed out in different formats, sigh... */

read_counter_move(fd)
int fd;
{
    switch (exp_expectl(fd,exp_glob,"*...*\r\n",0,exp_end)) {
    case EXP_TIMEOUT: timedout();
    case EXP_EOF: exit(-1);
    }

    sscanf(exp_match,"%*s %*s %*s %*s ... %s",move);
}

read_move(fd)
int fd;
{
    switch (exp_expectl(fd,exp_glob,"*...*\r\n*.*\r\n",0,exp_end)) {
    case EXP_TIMEOUT: timedout();
    case EXP_EOF: exit(-1);
    }

    sscanf(exp_match,"%*s %*s ... %*s %*s %s",move);
}

send_move(fd)
int fd;
{
    write(fd,move,strlen(move));
}

main(){
    int fd1, fd2;

    exp_loguser = 1;
    exp_timeout = 3600;

    if (-1 == (fd1 = exp_spawnl("chess","chess",(char *)0))) {
      perror("chess");
      exit(-1);
    }

    if (-1 == exp_expectl(fd1,exp_glob,"Chess\r\n",0,exp_end)) exit;

    if (-1 == write(fd1,"first\r",6)) exit;

    read_first_move(fd1);

    fd2 = exp_spawnl("chess","chess",(char *)0);

    if (-1 == exp_expectl(fd2,exp_glob,"Chess\r\n",0,exp_end)) exit;

    for (;;) {
        send_move(fd2);
        read_counter_move(fd2);

        send_move(fd1);
        read_move(fd1);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0208 ]--