728x90
반응형
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <sstream>
#include <iostream>
#define PORT 5500
using namespace std;
int main()
{
char license_plate[100];
char li_test[200] = "curl -s http://tomket.j2.co.kr/dashboard/set/license/confirm.php?key=";
FILE *license;
char li_result[10];
FILE *mk;
mk=popen("sleep 1 ; if [ ! -d /etc/j2_monitoring_client ] ; then mkdir -p /etc/j2_monitoring_client ; fi","r");
pclose(mk);
FILE *lp = fopen("/etc/j2_monitoring_client/license.txt","r");
if (!lp)
{
cout << "INPUT YOUR LICENSE" << endl;
cin.getline(license_plate, 100);
strcat(li_test,license_plate);
license=popen(li_test,"r");
fgets(li_result, sizeof(li_result),license);
if(strlen(li_result) == 7)
{
//FILE *llp = fopen(license_check,"w");
FILE *llp = fopen("/etc/j2_monitoring_client/license.txt","w");
fputs(license_plate,llp);
printf("YOUR LICENSE ACTIVATE\n");
fclose(llp);
pclose(license);
}
else
{
printf("NOT AVAILABLE LICENSE. PLEASE CHECK YOUR LICENSE\n");
pclose(license);
exit(0);
}
}
else
{
cout << "CHECKED YOUR LICENSE" << endl;
fclose(lp);
}
pid_t pid = -1;
int state;
pid = fork();
switch(pid)
{
memset(toServer, 0x00, sizeof(toServer));
id=popen("sleep 1 ; dmidecode -t system | grep UUID | sed 's/\tUUID: //'","r"); // bios-uuid
sleep(1);
fgets(id_plate, sizeof(id_plate),id);
char uuid[60] = "/etc/j2_monitoring_client/";
strcat(uuid,id_plate);
// pclose(id);
FILE *fp = fopen(uuid,"r");
if (!fp)
{
FILE *ffp = fopen(uuid,"w");
FILE *lplp = fopen("/etc/j2_monitoring_client/license.txt","r");
while(fgets(license_plate,sizeof(license_plate),lplp));
ip=popen("sleep 1 ; ifconfig | head -8 | grep 'inet addr' | grep -v 127.0.0.1 | awk {'print $2'} | sed 's/addr://'","r"); // ip address
os=popen("sleep 1 ; cat /etc/issue | head -1","r"); // os
cpu_model=popen("sleep 1 ; cat /proc/cpuinfo|grep 'model name' | sed 's/model name//' | sed 's/':' //' | sed 's/\t//' | uniq","r"); // cpu model
cpu_core=popen("sleep 1 ; cat /proc/cpuinfo|grep 'model name'| wc -l","r"); // cpu core
mem_total=popen("sleep 1 ; free -m | grep Mem | awk '{print $2}'", "r"); // mem total
disk_total=popen("sleep 1 ; fdisk -l | grep sda: | awk {'print $5'}","r"); // disk total
sleep(1);
fgets(ip_plate, sizeof(ip_plate),ip);
fgets(os_plate, sizeof(os_plate),os);
fgets(cpu_model_plate, sizeof(cpu_model_plate),cpu_model);
fgets(cpu_core_plate, sizeof(cpu_core_plate),cpu_core);
fgets(mem_total_plate, sizeof(mem_total_plate),mem_total);
fgets(disk_total_plate, sizeof(disk_total_plate),disk_total);
strcat(toServer,id_plate);
strcat(toServer,ip_plate); // buf에 cpu_model 추가
strcat(toServer,os_plate);
strcat(toServer,cpu_model_plate);
strcat(toServer,cpu_core_plate);
strcat(toServer,mem_total_plate);
strcat(toServer,disk_total_plate);
strcat(toServer,license_plate);
//printf("%s\n",toServer);
write(clientSocket, toServer,sizeof(toServer));
fclose(ffp);
fclose(lplp);
pclose(id); // popen 함수 종료
pclose(ip);
pclose(os);
pclose(cpu_model);
pclose(cpu_core);
pclose(mem_total);
pclose(disk_total);
}
else
{
FILE *lplp = fopen("/etc/j2_monitoring_client/license.txt","r");
while(fgets(license_plate,sizeof(license_plate),lplp));
cpu_load=popen("sleep 1 ; mpstat | tail -1 | awk '{print 100-$NF}'","r"); // cpu load (centos 5.x $10)
mem_used=popen("sleep 1 ; free -m | grep Mem | awk '{print $3}'", "r"); // mem usage
mem_avail=popen("sleep 1 ; free -m | grep Mem | awk '{print $4}'", "r"); // mem avail
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <sstream>
#include <iostream>
#define PORT 5500
using namespace std;
int main()
{
char license_plate[100];
char li_test[200] = "curl -s http://tomket.j2.co.kr/dashboard/set/license/confirm.php?key=";
FILE *license;
char li_result[10];
FILE *mk;
mk=popen("sleep 1 ; if [ ! -d /etc/j2_monitoring_client ] ; then mkdir -p /etc/j2_monitoring_client ; fi","r");
pclose(mk);
FILE *lp = fopen("/etc/j2_monitoring_client/license.txt","r");
if (!lp)
{
cout << "INPUT YOUR LICENSE" << endl;
cin.getline(license_plate, 100);
strcat(li_test,license_plate);
license=popen(li_test,"r");
fgets(li_result, sizeof(li_result),license);
if(strlen(li_result) == 7)
{
//FILE *llp = fopen(license_check,"w");
FILE *llp = fopen("/etc/j2_monitoring_client/license.txt","w");
fputs(license_plate,llp);
printf("YOUR LICENSE ACTIVATE\n");
fclose(llp);
pclose(license);
}
else
{
printf("NOT AVAILABLE LICENSE. PLEASE CHECK YOUR LICENSE\n");
pclose(license);
exit(0);
}
}
else
{
cout << "CHECKED YOUR LICENSE" << endl;
fclose(lp);
}
pid_t pid = -1;
int state;
pid = fork();
switch(pid)
{
case -1 :
printf("FAULT CREATE CHILD PROCESS\n");
return -1;
case 0 :
printf("STARTING J2 MONITORING AGENT\n");
while(!waitpid(-1, &state, WNOHANG))
{
sleep(3);
}
break;
default :
exit(0);
}
int clientSocket;
struct sockaddr_in server_address;
char toServer[500];
FILE *id;
FILE *ip;
FILE *os;
FILE *cpu_load;
FILE *cpu_model;
FILE *cpu_core;
FILE *mem_total;
FILE *mem_used;
FILE *mem_avail;
FILE *disk_total;
FILE *disk_used;
FILE *disk_avail;
FILE *rx;
FILE *rx_cur;
FILE *tx;
FILE *tx_cur;
FILE *hostname;
FILE *f_log;
FILE *i_log;
FILE *t_log;
FILE *d_log;
FILE *log;
FILE *check_bin_ip = NULL;
FILE *check_bin_dm = NULL;
FILE *check_bin_mp = NULL;
char id_plate[45];
char ip_plate[17];
char os_plate[50];
char cpu_model_plate[50];
char cpu_load_plate[10];
char cpu_core_plate[10];
char mem_total_plate[20];
char mem_used_plate[20];
char mem_avail_plate[20];
char disk_total_plate[20];
char disk_used_plate[20];
char disk_avail_plate[20];
char rx_plate[30];
char rx_cur_plate[30];
char tx_plate[30];
char tx_cur_plate[30];
char hostname_plate[30];
printf("FAULT CREATE CHILD PROCESS\n");
return -1;
case 0 :
printf("STARTING J2 MONITORING AGENT\n");
while(!waitpid(-1, &state, WNOHANG))
{
sleep(3);
}
break;
default :
exit(0);
}
int clientSocket;
struct sockaddr_in server_address;
char toServer[500];
FILE *id;
FILE *ip;
FILE *os;
FILE *cpu_load;
FILE *cpu_model;
FILE *cpu_core;
FILE *mem_total;
FILE *mem_used;
FILE *mem_avail;
FILE *disk_total;
FILE *disk_used;
FILE *disk_avail;
FILE *rx;
FILE *rx_cur;
FILE *tx;
FILE *tx_cur;
FILE *hostname;
FILE *f_log;
FILE *i_log;
FILE *t_log;
FILE *d_log;
FILE *log;
FILE *check_bin_ip = NULL;
FILE *check_bin_dm = NULL;
FILE *check_bin_mp = NULL;
char id_plate[45];
char ip_plate[17];
char os_plate[50];
char cpu_model_plate[50];
char cpu_load_plate[10];
char cpu_core_plate[10];
char mem_total_plate[20];
char mem_used_plate[20];
char mem_avail_plate[20];
char disk_total_plate[20];
char disk_used_plate[20];
char disk_avail_plate[20];
char rx_plate[30];
char rx_cur_plate[30];
char tx_plate[30];
char tx_cur_plate[30];
char hostname_plate[30];
char tx_cur_plate[30];
char hostname_plate[30];
clientSocket = socket(PF_INET, SOCK_STREAM, 0);
memset(&server_address, 0, sizeof(server_address));
server_address.sin_family=AF_INET;
server_address.sin_addr.s_addr=inet_addr("192.168.0.149");
server_address.sin_port=htons(PORT);
connect(clientSocket, (struct sockaddr*) &server_address, sizeof(server_address));
f_log = fopen("/var/log/j2_monitoring.log","a");
fclose(f_log);
check_bin_dm=popen("sleep 1 ; dmidecode 1>/dev/null ; if [ $? != 0 ] ; then echo '' > /etc/j2_monitoring_client/dm.txt ; else rm -rf /etc/j2_monitoring_client/dm.txt ; fi","r");
check_bin_ip=popen("sleep 1 ; ifconfig 1>/dev/null ; if [ $? != 0 ] ; then echo '' > /etc/j2_monitoring_client/ip.txt ; else rm -rf /etc/j2_monitoring_client/ip.txt ; fi","r");
check_bin_mp=popen("sleep 1 ; mpstat 1>/dev/null ; if [ $? != 0 ] ; then echo '' > /etc/j2_monitoring_client/mp.txt ; else rm -rf /etc/j2_monitoring_client/mp.txt ; fi","r");
sleep(2);
if((d_log=fopen("/etc/j2_monitoring_client/dm.txt","r")) != NULL)
{
printf("error : check binary 'dimidecode'. please install 'dimidecode'.\n");
log = fopen("/var/log/j2_monitoring.log","a");
fputs("error : check binary 'dmidecode'. please install 'dimidecode'.\n",log);
fclose(d_log);
fclose(log);
pclose(check_bin_dm);
pclose(check_bin_ip);
pclose(check_bin_mp);
exit(0);
}
else if((i_log=fopen("/etc/j2_monitoring_client/ip.txt","r")) != NULL)
{
printf("error : check binary 'ifconfig'. please install 'ifconfig'.\n");
log = fopen("/var/log/j2_monitoring.log","a");
fputs("error : check binary 'ifconfig'. please install 'ifconfig'.\n",log);
fclose(i_log);
fclose(log);
pclose(check_bin_dm);
pclose(check_bin_ip);
pclose(check_bin_mp);
exit(0);
}
else if((t_log=fopen("/etc/j2_monitoring_client/mp.txt","r")) != NULL)
{
printf("error : check binary 'mpstat'. please install 'mpstat'.\n");
log = fopen("/var/log/j2_monitoring.log","a");
fputs("error : check binary 'mpstat'. please install 'mpstat'.\n",log);
fclose(t_log);
fclose(log);
pclose(check_bin_dm);
pclose(check_bin_ip);
pclose(check_bin_mp);
exit(0);
}
else
{
pclose(check_bin_dm);
pclose(check_bin_ip);
pclose(check_bin_mp);
while(1){
char hostname_plate[30];
clientSocket = socket(PF_INET, SOCK_STREAM, 0);
memset(&server_address, 0, sizeof(server_address));
server_address.sin_family=AF_INET;
server_address.sin_addr.s_addr=inet_addr("192.168.0.149");
server_address.sin_port=htons(PORT);
connect(clientSocket, (struct sockaddr*) &server_address, sizeof(server_address));
f_log = fopen("/var/log/j2_monitoring.log","a");
fclose(f_log);
check_bin_dm=popen("sleep 1 ; dmidecode 1>/dev/null ; if [ $? != 0 ] ; then echo '' > /etc/j2_monitoring_client/dm.txt ; else rm -rf /etc/j2_monitoring_client/dm.txt ; fi","r");
check_bin_ip=popen("sleep 1 ; ifconfig 1>/dev/null ; if [ $? != 0 ] ; then echo '' > /etc/j2_monitoring_client/ip.txt ; else rm -rf /etc/j2_monitoring_client/ip.txt ; fi","r");
check_bin_mp=popen("sleep 1 ; mpstat 1>/dev/null ; if [ $? != 0 ] ; then echo '' > /etc/j2_monitoring_client/mp.txt ; else rm -rf /etc/j2_monitoring_client/mp.txt ; fi","r");
sleep(2);
if((d_log=fopen("/etc/j2_monitoring_client/dm.txt","r")) != NULL)
{
printf("error : check binary 'dimidecode'. please install 'dimidecode'.\n");
log = fopen("/var/log/j2_monitoring.log","a");
fputs("error : check binary 'dmidecode'. please install 'dimidecode'.\n",log);
fclose(d_log);
fclose(log);
pclose(check_bin_dm);
pclose(check_bin_ip);
pclose(check_bin_mp);
exit(0);
}
else if((i_log=fopen("/etc/j2_monitoring_client/ip.txt","r")) != NULL)
{
printf("error : check binary 'ifconfig'. please install 'ifconfig'.\n");
log = fopen("/var/log/j2_monitoring.log","a");
fputs("error : check binary 'ifconfig'. please install 'ifconfig'.\n",log);
fclose(i_log);
fclose(log);
pclose(check_bin_dm);
pclose(check_bin_ip);
pclose(check_bin_mp);
exit(0);
}
else if((t_log=fopen("/etc/j2_monitoring_client/mp.txt","r")) != NULL)
{
printf("error : check binary 'mpstat'. please install 'mpstat'.\n");
log = fopen("/var/log/j2_monitoring.log","a");
fputs("error : check binary 'mpstat'. please install 'mpstat'.\n",log);
fclose(t_log);
fclose(log);
pclose(check_bin_dm);
pclose(check_bin_ip);
pclose(check_bin_mp);
exit(0);
}
else
{
pclose(check_bin_dm);
pclose(check_bin_ip);
pclose(check_bin_mp);
while(1){
memset(toServer, 0x00, sizeof(toServer));
id=popen("sleep 1 ; dmidecode -t system | grep UUID | sed 's/\tUUID: //'","r"); // bios-uuid
sleep(1);
fgets(id_plate, sizeof(id_plate),id);
char uuid[60] = "/etc/j2_monitoring_client/";
strcat(uuid,id_plate);
// pclose(id);
FILE *fp = fopen(uuid,"r");
if (!fp)
{
FILE *ffp = fopen(uuid,"w");
FILE *lplp = fopen("/etc/j2_monitoring_client/license.txt","r");
while(fgets(license_plate,sizeof(license_plate),lplp));
ip=popen("sleep 1 ; ifconfig | head -8 | grep 'inet addr' | grep -v 127.0.0.1 | awk {'print $2'} | sed 's/addr://'","r"); // ip address
os=popen("sleep 1 ; cat /etc/issue | head -1","r"); // os
cpu_model=popen("sleep 1 ; cat /proc/cpuinfo|grep 'model name' | sed 's/model name//' | sed 's/':' //' | sed 's/\t//' | uniq","r"); // cpu model
cpu_core=popen("sleep 1 ; cat /proc/cpuinfo|grep 'model name'| wc -l","r"); // cpu core
mem_total=popen("sleep 1 ; free -m | grep Mem | awk '{print $2}'", "r"); // mem total
disk_total=popen("sleep 1 ; fdisk -l | grep sda: | awk {'print $5'}","r"); // disk total
sleep(1);
fgets(ip_plate, sizeof(ip_plate),ip);
fgets(os_plate, sizeof(os_plate),os);
fgets(cpu_model_plate, sizeof(cpu_model_plate),cpu_model);
fgets(cpu_core_plate, sizeof(cpu_core_plate),cpu_core);
fgets(mem_total_plate, sizeof(mem_total_plate),mem_total);
fgets(disk_total_plate, sizeof(disk_total_plate),disk_total);
strcat(toServer,id_plate);
strcat(toServer,ip_plate); // buf에 cpu_model 추가
strcat(toServer,os_plate);
strcat(toServer,cpu_model_plate);
strcat(toServer,cpu_core_plate);
strcat(toServer,mem_total_plate);
strcat(toServer,disk_total_plate);
strcat(toServer,license_plate);
//printf("%s\n",toServer);
write(clientSocket, toServer,sizeof(toServer));
fclose(ffp);
fclose(lplp);
pclose(id); // popen 함수 종료
pclose(ip);
pclose(os);
pclose(cpu_model);
pclose(cpu_core);
pclose(mem_total);
pclose(disk_total);
}
else
{
FILE *lplp = fopen("/etc/j2_monitoring_client/license.txt","r");
while(fgets(license_plate,sizeof(license_plate),lplp));
cpu_load=popen("sleep 1 ; mpstat | tail -1 | awk '{print 100-$NF}'","r"); // cpu load (centos 5.x $10)
mem_used=popen("sleep 1 ; free -m | grep Mem | awk '{print $3}'", "r"); // mem usage
mem_avail=popen("sleep 1 ; free -m | grep Mem | awk '{print $4}'", "r"); // mem avail
disk_total=popen("sleep 1 ; fdisk -l | grep sda: | awk {'print $5/1024'}","r"); // disk total
disk_avail=popen("sleep 1 ; df -P | grep -v ^Filesystem | awk '{sum += $2} END { print sum; }'","r"); //logic_disk_used
disk_used=popen("sleep 1 ; df -P | grep -v ^Filesystem | awk '{sum += $3} END { print sum; }'","r"); // logic_disk_avail
hostname=popen("sleep 1 ; hostname","r"); //hostname
rx=popen("sleep 1 ; ifconfig | head -8 | grep 'RX bytes:' | awk {'print $2'} | sed 's/bytes://g'","r"); // input
tx=popen("sleep 1 ; ifconfig | head -8 | grep 'RX bytes:' | awk {'print $6'} | sed 's/bytes://g'","r"); // output
sleep(1);
rx_cur=popen("sleep 1 ; ifconfig | head -8 | grep 'RX bytes:' | awk {'print $2'} | sed 's/bytes://g'","r"); //input after 1sec
tx_cur=popen("sleep 1 ; ifconfig | head -8 | grep 'RX bytes:' | awk {'print $6'} | sed 's/bytes://g'","r"); //output after 1sec
sleep(1);
fgets(cpu_load_plate, sizeof(cpu_load_plate),cpu_load); // 임시공간에 각 value 넣기
fgets(mem_used_plate, sizeof(mem_used_plate),mem_used);
fgets(mem_avail_plate, sizeof(mem_avail_plate),mem_avail);
fgets(disk_total_plate, sizeof(disk_total_plate),disk_total);
fgets(disk_used_plate, sizeof(disk_used_plate),disk_used);
fgets(disk_avail_plate, sizeof(disk_avail_plate),disk_avail);
fgets(hostname_plate, sizeof(hostname_plate),hostname);
fgets(rx_plate, sizeof(rx_plate),rx);
fgets(rx_cur_plate, sizeof(rx_cur_plate),rx_cur);
fgets(tx_plate, sizeof(tx_plate),tx);
fgets(tx_cur_plate, sizeof(tx_cur_plate),tx_cur);
int rx_tmp = atoi(rx_plate); //rx , tx 계산
int rx_cur_tmp = atoi(rx_cur_plate);
int tx_tmp = atoi(tx_plate);
int tx_cur_tmp = atoi(tx_cur_plate);
int rxx = rx_cur_tmp - rx_tmp;
int txx = tx_cur_tmp - tx_tmp;
memset(rx_cur_plate, 0x00, sizeof(rx_cur_plate));//rx,tx memset 후 value 넣기
sprintf(rx_cur_plate,"%d\n",rxx);
memset(tx_cur_plate, 0x00, sizeof(tx_cur_plate));
sprintf(tx_cur_plate,"%d\n",txx);
strcat(toServer,id_plate);
strcat(toServer,cpu_load_plate);
strcat(toServer,mem_used_plate);
strcat(toServer,mem_avail_plate);
strcat(toServer,disk_total_plate);
strcat(toServer,disk_used_plate);
strcat(toServer,disk_avail_plate);
strcat(toServer,rx_cur_plate);
strcat(toServer,tx_cur_plate);
strcat(toServer,hostname_plate);
strcat(toServer,license_plate);
// printf("%s\n",toServer);
write(clientSocket, toServer,sizeof(toServer));
fclose(fp);
fclose(lplp);
pclose(id); // popen 함수 종료
pclose(cpu_load);
pclose(mem_used);
pclose(mem_avail);
pclose(disk_total);
pclose(disk_used);
pclose(disk_avail);
pclose(rx);
pclose(rx_cur);
pclose(tx);
pclose(tx_cur);
pclose(hostname);
}
disk_avail=popen("sleep 1 ; df -P | grep -v ^Filesystem | awk '{sum += $2} END { print sum; }'","r"); //logic_disk_used
disk_used=popen("sleep 1 ; df -P | grep -v ^Filesystem | awk '{sum += $3} END { print sum; }'","r"); // logic_disk_avail
hostname=popen("sleep 1 ; hostname","r"); //hostname
rx=popen("sleep 1 ; ifconfig | head -8 | grep 'RX bytes:' | awk {'print $2'} | sed 's/bytes://g'","r"); // input
tx=popen("sleep 1 ; ifconfig | head -8 | grep 'RX bytes:' | awk {'print $6'} | sed 's/bytes://g'","r"); // output
sleep(1);
rx_cur=popen("sleep 1 ; ifconfig | head -8 | grep 'RX bytes:' | awk {'print $2'} | sed 's/bytes://g'","r"); //input after 1sec
tx_cur=popen("sleep 1 ; ifconfig | head -8 | grep 'RX bytes:' | awk {'print $6'} | sed 's/bytes://g'","r"); //output after 1sec
sleep(1);
fgets(cpu_load_plate, sizeof(cpu_load_plate),cpu_load); // 임시공간에 각 value 넣기
fgets(mem_used_plate, sizeof(mem_used_plate),mem_used);
fgets(mem_avail_plate, sizeof(mem_avail_plate),mem_avail);
fgets(disk_total_plate, sizeof(disk_total_plate),disk_total);
fgets(disk_used_plate, sizeof(disk_used_plate),disk_used);
fgets(disk_avail_plate, sizeof(disk_avail_plate),disk_avail);
fgets(hostname_plate, sizeof(hostname_plate),hostname);
fgets(rx_plate, sizeof(rx_plate),rx);
fgets(rx_cur_plate, sizeof(rx_cur_plate),rx_cur);
fgets(tx_plate, sizeof(tx_plate),tx);
fgets(tx_cur_plate, sizeof(tx_cur_plate),tx_cur);
int rx_tmp = atoi(rx_plate); //rx , tx 계산
int rx_cur_tmp = atoi(rx_cur_plate);
int tx_tmp = atoi(tx_plate);
int tx_cur_tmp = atoi(tx_cur_plate);
int rxx = rx_cur_tmp - rx_tmp;
int txx = tx_cur_tmp - tx_tmp;
memset(rx_cur_plate, 0x00, sizeof(rx_cur_plate));//rx,tx memset 후 value 넣기
sprintf(rx_cur_plate,"%d\n",rxx);
memset(tx_cur_plate, 0x00, sizeof(tx_cur_plate));
sprintf(tx_cur_plate,"%d\n",txx);
strcat(toServer,id_plate);
strcat(toServer,cpu_load_plate);
strcat(toServer,mem_used_plate);
strcat(toServer,mem_avail_plate);
strcat(toServer,disk_total_plate);
strcat(toServer,disk_used_plate);
strcat(toServer,disk_avail_plate);
strcat(toServer,rx_cur_plate);
strcat(toServer,tx_cur_plate);
strcat(toServer,hostname_plate);
strcat(toServer,license_plate);
// printf("%s\n",toServer);
write(clientSocket, toServer,sizeof(toServer));
fclose(fp);
fclose(lplp);
pclose(id); // popen 함수 종료
pclose(cpu_load);
pclose(mem_used);
pclose(mem_avail);
pclose(disk_total);
pclose(disk_used);
pclose(disk_avail);
pclose(rx);
pclose(rx_cur);
pclose(tx);
pclose(tx_cur);
pclose(hostname);
}
sleep(27);
}
close(clientSocket);
}
return 0;
}
}
close(clientSocket);
}
return 0;
}
반응형
'엔지니어 > C++' 카테고리의 다른 글
j2-agent(/etc/init.d/) (create by sk) (0) | 2016.05.26 |
---|---|
j2-agent.spec (create by sk) (0) | 2016.05.26 |
rpmbuild sh (create by sk) (0) | 2016.05.26 |
agent client makefile 32bit (create by sk) (0) | 2016.05.26 |
ddos 주노 (0) | 2016.05.26 |