!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/src/linux-2.4.18-xfs-1.1/arch/ppc/boot/common/   drwxr-xr-x
Free 318.36 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:     ns16550.c (2.32 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
 * BK Id: SCCS/s.ns16550.c 1.12 10/08/01 17:16:50 paulus
 */
/*
 * COM1 NS16550 support
 */

#include <linux/config.h>
#include <linux/serialP.h>
#include <linux/serial_reg.h>
#include <asm/serial.h>

/* Default serial baud rate */
#define SERIAL_BAUD    9600

extern void outb(int port, unsigned char val);
extern unsigned char inb(int port);
extern unsigned long ISA_io;

static struct serial_state rs_table[RS_TABLE_SIZE] = {
    SERIAL_PORT_DFNS    /* Defined in <asm/serial.h> */
};

static int shift;

unsigned long serial_init(int chan) {
    unsigned long com_port;

    /* We need to find out which type io we're expecting.  If it's
     * 'SERIAL_IO_PORT', we get an offset from the isa_io_base.
     * If it's 'SERIAL_IO_MEM', we can the exact location.  -- Tom */
    switch (rs_table[chan].io_type) {
        case SERIAL_IO_PORT:
            com_port = rs_table[chan].port;
            break;
        case SERIAL_IO_MEM:
            com_port = (unsigned long)rs_table[chan].iomem_base;
            break;
        default:
            /* We can't deal with it. */
            return -1;
    }

    /* How far apart the registers are. */
    shift = rs_table[chan].iomem_reg_shift;

    /* See if port is present */
    outb(com_port + (UART_LCR << shift), 0x00);
    outb(com_port + (UART_IER << shift), 0x00);
    /* Access baud rate */
    outb(com_port + (UART_LCR << shift), 0x80);
    /*
     * Test if serial port is unconfigured.
     * We assume that no-one uses less than 110 baud or
     * less than 7 bits per character these days.
     *  -- paulus.
     */
    if (inb(com_port + (UART_DLM << shift)) > 4
        || (inb(com_port + (UART_LCR << shift)) & 2) == 0) {
        /* Input clock. */
        outb(com_port + (UART_DLL << shift),
             (BASE_BAUD / SERIAL_BAUD));
        outb(com_port + (UART_DLM << shift),
             (BASE_BAUD / SERIAL_BAUD) >> 8);
    }
     /* 8 data, 1 stop, no parity */
    outb(com_port + (UART_LCR << shift), 0x03);
    /* RTS/DTR */
    outb(com_port + (UART_MCR << shift), 0x03);
    /* Clear & enable FIFOs */
    outb(com_port + (UART_FCR << shift), 0x07);

    return (com_port);
}

void
serial_putc(unsigned long com_port, unsigned char c)
{
    while ((inb(com_port + (UART_LSR << shift)) & UART_LSR_THRE) == 0)
        ;
    outb(com_port, c);
}

unsigned char
serial_getc(unsigned long com_port)
{
    while ((inb(com_port + (UART_LSR << shift)) & UART_LSR_DR) == 0)
        ;
    return inb(com_port);
}

int
serial_tstc(unsigned long com_port)
{
    return ((inb(com_port + (UART_LSR << shift)) & UART_LSR_DR) != 0);
}

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