diff --git a/clamscan/libclamav/.libs/libclamav.la b/clamscan/libclamav/.libs/libclamav.la new file mode 120000 index 0000000..caae0ec --- /dev/null +++ b/clamscan/libclamav/.libs/libclamav.la @@ -0,0 +1 @@ +../libclamav.la \ No newline at end of file diff --git a/clamscan/libclamav/.libs/libclamav.lai b/clamscan/libclamav/.libs/libclamav.lai new file mode 100644 index 0000000..fe55568 --- /dev/null +++ b/clamscan/libclamav/.libs/libclamav.lai @@ -0,0 +1,41 @@ +# libclamav.la - a libtool library file +# Generated by libtool (GNU libtool) 2.4.7 Debian-2.4.7-4 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libclamav.so.9' + +# Names of this library. +library_names='libclamav.so.9.0.5 libclamav.so.9 libclamav.so' + +# The name of the static archive. +old_library='' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags='' + +# Libraries that this one depends upon. +dependency_libs=' -ljson-c -lbz2 -lltdl -lxml2 -lmspack -lssl -lcrypto -lz -lpthread -lm -ltfm -lpcre2-8' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libclamav. +current=9 +age=0 +revision=5 + +# Is this an already installed library? +installed=yes + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/usr/lib/' diff --git a/clamscan/libclamav/.libs/libclamav.so b/clamscan/libclamav/.libs/libclamav.so new file mode 120000 index 0000000..3e9d194 --- /dev/null +++ b/clamscan/libclamav/.libs/libclamav.so @@ -0,0 +1 @@ +libclamav.so.9.0.5 \ No newline at end of file diff --git a/clamscan/libclamav/.libs/libclamav.so.9 b/clamscan/libclamav/.libs/libclamav.so.9 new file mode 120000 index 0000000..3e9d194 --- /dev/null +++ b/clamscan/libclamav/.libs/libclamav.so.9 @@ -0,0 +1 @@ +libclamav.so.9.0.5 \ No newline at end of file diff --git a/clamscan/libclamav/.libs/libclamav.so.9.0.5 b/clamscan/libclamav/.libs/libclamav.so.9.0.5 new file mode 100644 index 0000000..eb5f405 Binary files /dev/null and b/clamscan/libclamav/.libs/libclamav.so.9.0.5 differ diff --git a/clamscan/libclamav/.libs/libclamav_internal_utils.a b/clamscan/libclamav/.libs/libclamav_internal_utils.a new file mode 100644 index 0000000..5966a82 Binary files /dev/null and b/clamscan/libclamav/.libs/libclamav_internal_utils.a differ diff --git a/clamscan/libclamav/.libs/libclamav_internal_utils.la b/clamscan/libclamav/.libs/libclamav_internal_utils.la new file mode 120000 index 0000000..7afcdbc --- /dev/null +++ b/clamscan/libclamav/.libs/libclamav_internal_utils.la @@ -0,0 +1 @@ +../libclamav_internal_utils.la \ No newline at end of file diff --git a/clamscan/libclamav/.libs/libclamav_nocxx.a b/clamscan/libclamav/.libs/libclamav_nocxx.a new file mode 100644 index 0000000..6c98e1c Binary files /dev/null and b/clamscan/libclamav/.libs/libclamav_nocxx.a differ diff --git a/clamscan/libclamav/.libs/libclamav_nocxx.la b/clamscan/libclamav/.libs/libclamav_nocxx.la new file mode 120000 index 0000000..3aabbc6 --- /dev/null +++ b/clamscan/libclamav/.libs/libclamav_nocxx.la @@ -0,0 +1 @@ +../libclamav_nocxx.la \ No newline at end of file diff --git a/clamscan/libclamav/libclamav.la b/clamscan/libclamav/libclamav.la index a0a5a50..9f622b8 100644 --- a/clamscan/libclamav/libclamav.la +++ b/clamscan/libclamav/libclamav.la @@ -38,4 +38,4 @@ dlopen='' dlpreopen='' # Directory that this library needs to be installed in: -libdir='/usr/lib/x86_64-linux-gnu' +libdir='/usr/lib/' diff --git a/clamscan/shared/linux/cert_util_linux.o b/clamscan/shared/linux/cert_util_linux.o index 65da7fb..31e1f02 100644 Binary files a/clamscan/shared/linux/cert_util_linux.o and b/clamscan/shared/linux/cert_util_linux.o differ diff --git a/rhost.c b/rhost.c index c1b618a..81bbe8e 100644 --- a/rhost.c +++ b/rhost.c @@ -55,12 +55,15 @@ static char *GET_PUBLIC_IP(char *URL) /* 指定要获取的URL */ curl_easy_setopt(curl_handle, CURLOPT_URL, URL); + /* 将所有数据发送到此函数 */ //对于同一次阻塞的curl_easy_perform而言,在写完获取的数据之前,会多次调用 WriteMemoryCallback curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); + /* 将"chunk"结构传递给回调函数 */ curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk); curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0"); + //对于同一次阻塞的curl_easy_perform而言,在写完获取的数据之前,会多次调用 WriteMemoryCallback res = curl_easy_perform(curl_handle); @@ -988,6 +991,10 @@ goto_daemon: free(public_ip); exit(0); } + + + if (-1 == (nice(-20))) // 进程优先级 + perror("nice"); while (1) diff --git a/rhost.conf b/rhost.conf index 8a1a581..42dae18 100644 --- a/rhost.conf +++ b/rhost.conf @@ -13,8 +13,8 @@ global { REFUSE_NUMBER = 3; // 拒绝攻击次数 CLAMAV = 1; // clamav 是否扫描病毒(测试阶段)(1开启,非1关闭) - CLAMAV_ARG = "-r / --exclude-dir=^/sys|^/dev|^/proc|^/opt/infected|^/root|^/home|^/mnt --move=/opt/infected --max-filesize 1024M -l clamscan.log"; - CLAMAV_TIME = "* 55 14 * * *"; // clamav 扫描时间(Cron格式, 秒 分 时 天 月 周) + CLAMAV_ARG = "-r / --exclude-dir=^/sys|^/dev|^/proc|^/opt/infected|^/root|^/home|^/mnt|^/usr|^/var --move=/opt/infected --max-filesize 1024M -l clamscan.log"; + CLAMAV_TIME = "* 35 16 * * *"; // clamav 扫描时间(Cron格式, 秒 分 时 天 月 周) IPV4_RESTRICTION = 1; // 是否启用IP白名单(1开启,非1关闭)