!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.39 GB of 458.09 GB (69.5%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

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

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

char move[100];

read_first_move(fp)
FILE *fp;
{
    if (EXP_TIMEOUT == exp_fexpectl(fp,
                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(fp)
FILE *fp;
{
    switch (exp_fexpectl(fp,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(fp)
FILE *fp;
{
    switch (exp_fexpectl(fp,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(fp)
FILE *fp;
{
    fprintf(fp,move);
}

main(){
    FILE *fp1, *fp2;
    int ec;

/*    exp_is_debugging = 1;*/
    exp_loguser = 1;
    exp_timeout = 3600;

    if (0 == (fp1 = exp_popen("chess"))) {
      perror("chess");
      exit(-1);
    }

    if (0 > exp_fexpectl(fp1,exp_glob,"Chess\r\n",0,exp_end)) exit(-1);
    fprintf(fp1,"first\r");

    read_first_move(fp1);

    fp2 = exp_popen("chess");

    exp_fexpectl(fp2,exp_glob,"Chess\r\n",0,exp_end);

    for (;;) {
        send_move(fp2);
        read_counter_move(fp2);

        send_move(fp1);
        read_move(fp1);
    }
}

:: 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.0247 ]--