1
0
This commit is contained in:
Daniel Tartavel 2020-05-07 13:54:04 +02:00
parent e8e06e59ac
commit b33139396e

8
main.c
View File

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