[prev in list] [next in list] [prev in thread] [next in thread] 

List:       full-disclosure
Subject:    [Full-Disclosure] [ElectronicSouls] - sysinfo.c
From:       es () hush ! com
Date:       2002-11-30 2:20:45
[Download RAW message or body]


-----BEGIN PGP SIGNED MESSAGE-----

Dear List,

Some of you system administrators out there might find this tool to
be useful.  We certainly have.  Since we've had it, our lives have been
so much better.  Girls return our phone calls, and we do a lot of drugs
on our own.

# cat sysinfo.c
/*
 * (C) BrainStorm - ElectronicSouls
 * small application to get some system information
 * yes i know its simple..so ? doesnt make it useless :P
 * might be a nice bin for Blackhat linux :>
 */

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>

int main(int argc, char **argv[])
{
 char *select;

       printf("\n\n +++ ElectronicSouls System Information +++ \n\n");

       if (strstr(argv[1], "-cpu") != NULL)
       {
         printf("\n *** CPU MODEL *** \n\n");
         execl("/bin/cat","/bin/cat","/proc/cpuinfo",0);
       }

       if (strstr(argv[1], "-mem") != NULL)
       {
         printf("\n *** MEMORY INFORMATION: *** \n\n");
         execl("/bin/cat","/bin/cat","/proc/meminfo",0);
       }

       if (strstr(argv[1], "-mod") != NULL)
       {
         printf("\n *** KERNEL MODULES: *** \n\n");
         execl("/bin/cat","/bin/cat","/proc/modules",0);
       }

       if (strstr(argv[1], "-dev") != NULL)
       {
         printf("\n *** DEVICES: *** \n\n");
         execl("/bin/cat","/bin/cat","/proc/devices",0);
       }

       if (strstr(argv[1], "-lod") != NULL)
       {
         printf("\n *** LOAD AVERAGE: *** \n\n");
         execl("/bin/cat","/bin/cat","/proc/loadavg",0);
       }

       if (strstr(argv[1], "-fs") != NULL)
       {
         printf("\n *** FILESYSTEM STATUS: *** \n\n");
         execl("/bin/cat","/bin/cat","/proc/stat",0);
       }

       if (strstr(argv[1], "-mnt") != NULL)
       {
         printf("\n *** MOUNTED: *** \n\n");
         execl("/bin/cat","/bin/cat","/proc/mounts",0);
       }

       if (strstr(argv[1], "-iop") != NULL)
       {
         printf("\n *** IOPORTS: *** \n\n");
         execl("/bin/cat","/bin/cat","/proc/ioports",0);
       }

       if (strstr(argv[1], "-pt") != NULL)
       {
         printf("\n *** PARTITIONS: *** \n\n");
         execl("/bin/cat","/bin/cat","/proc/partitions",0);
       }

       if (strstr(argv[1], "-pt") != NULL)
       {
         printf("\n *** INTERRUPTS: *** \n\n");
         execl("/bin/cat","/bin/cat","/proc/interrupts",0);
       }

       if (argv[1], "-h")
       {
         printf("\n Help: \n\n");
         printf("./sys -cpu : will give you cpu informations \n"); /* no argv[0] this time heh */
         printf("      -mem : shows you memory informations  \n");
         printf("      -mod : lists the kernel modules       \n");
         printf("      -dev : gives you device informations  \n");
         printf("      -lod : shows the load average         \n");
         printf("      -fs  : lists file system informations \n");
         printf("      -mnt : shows the mounted devices      \n");
         printf("      -iop : lists the IO Ports             \n");
         printf("      -pt  : lists the existing partitions  \n");
         printf("      -ir  : shows the interrupts           \n\n");
       }

 exit(0);

}

#

The Electronic Souls Crew
[ElectronicSouls] (c) 2002

"Learned English from Brian Mcwilliams he smart"

-----BEGIN PGP SIGNATURE-----
Version: Hush 2.2 (Java)
Note: This signature can be verified at https://www.hushtools.com/verify

wlMEARECABMFAj3oIJIMHGVzQGh1c2guY29tAAoJEN5nGqhGcjltA+gAni6clwOQvVJv
KSoqTAU1cmJdrbPGAJ4p5/396o4XF6N4Kc+FPXus1OkcaQ==
=Kt+c
-----END PGP SIGNATURE-----




Concerned about your privacy? Follow this link to get
FREE encrypted email: https://www.hushmail.com/?l=2 

Big $$$ to be made with the HushMail Affiliate Program: 
https://www.hushmail.com/about.php?subloc=affiliate&l=427
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.netsys.com/full-disclosure-charter.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic