[<prev] [next>] [day] [month] [year] [list]
Message-ID: <200211300220.gAU2Kkes022051@mailserver2.hushmail.com>
From: es at hush.com (es@...h.com)
Subject: [ElectronicSouls] - sysinfo.c
-----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
Powered by blists - more mailing lists