debug
This commit is contained in:
parent
e8e06e59ac
commit
b33139396e
8
main.c
8
main.c
@ -3,6 +3,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
|
||||||
#define HOSTNAME "lalis"
|
#define HOSTNAME "lalis"
|
||||||
|
|
||||||
@ -80,11 +82,11 @@ int getprocinfo( int ppid, char cmdline[], char cmd[], char user[] )
|
|||||||
FILE *fh1;
|
FILE *fh1;
|
||||||
char child_path[128];
|
char child_path[128];
|
||||||
char str[1024];
|
char str[1024];
|
||||||
char * pch;
|
// char * pch;
|
||||||
int child_pid[10];
|
int child_pid[10];
|
||||||
int flag = 0;
|
int flag = 0;
|
||||||
int r;
|
int r;
|
||||||
int x = 0;
|
// int x = 0;
|
||||||
int pid = ppid;
|
int pid = ppid;
|
||||||
int level = 0;
|
int level = 0;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
@ -159,6 +161,7 @@ int main()
|
|||||||
int pids[n_ssh];
|
int pids[n_ssh];
|
||||||
int flag[n_ssh];
|
int flag[n_ssh];
|
||||||
int rinfo;
|
int rinfo;
|
||||||
|
int status;
|
||||||
// char path[1024];
|
// char path[1024];
|
||||||
char commande[] = "/usr/local/bin/send_sms";
|
char commande[] = "/usr/local/bin/send_sms";
|
||||||
char logfile[] = "/var/log/sshdetect.log";
|
char logfile[] = "/var/log/sshdetect.log";
|
||||||
@ -288,6 +291,7 @@ int main()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sleep(2);
|
sleep(2);
|
||||||
|
waitpid(-1, &status ,WNOHANG)
|
||||||
}
|
}
|
||||||
start = 0;
|
start = 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user