!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/drivers/scsi/   drwxr-xr-x
Free 318.3 GB of 458.09 GB (69.48%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     cpqioctl.c (1.44 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
// Test program for CPQFCTS ioctl calls
// build with:
// gcc -o cpqioctl cpqioctl.c
// ld -o cpqioctl /lib/crt0.o cpqioctl.o -lc

#include <stdio.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/types.h>
#include "../../include/scsi/scsi.h"
#include "cpqfcTSioctl.h"

typedef struct scsi_fctargaddress {
        unsigned long host_port_id;
        unsigned char host_wwn[8];
} Scsi_FCTargAddress;

int main(int argc, char **argv) {

 int fd, i;
 Scsi_FCTargAddress targ;
 int uselect=0;



  if ( argc < 2 ) {
    printf("usage: cpqioctl <Devfile>\n");
    exit(1);
  }

  if ( (fd = open(argv[1], O_RDONLY)) == -1) {
    perror("open");
    exit(1);
  }

  if ( ioctl(fd, SCSI_IOCTL_FC_TARGET_ADDRESS, &targ) ) {
    perror("ioctl");
    exit(1);
  }


  printf("portid: %08x. wwn: ", targ.host_port_id);

  for (i=0;i<8;i++) printf(" %02x", targ.host_wwn[i]);
  printf("\n");

 while( uselect != 27 ) // not ESC key
  {
    printf("\n IOCTL \n");
    printf( "1. Get PCI info\n");
    printf( "2. Send Passthru\n");
    printf( " ==> ");
    scanf("%c", &uselect);

    switch( uselect  )
    {
      case '1':
      {
        cciss_pci_info_struct pciinfo;
    
      if( ioctl( fd, CCPQFCTS_GETPCIINFO ,&pciinfo ))
          perror("ioctl");
    else
          printf( "\nPCI bus %d, dev_fn %d, board_id %Xh\n",
            pciinfo.bus, pciinfo.dev_fn, pciinfo.board_id);
      }

    }
  }


  close(fd);
  return 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.0042 ]--