Skip to content

Instantly share code, notes, and snippets.

View micahsnyder's full-sized avatar

Micah Snyder micahsnyder

View GitHub Profile
@micahsnyder
micahsnyder / win32-test-with-dlls.cmake
Last active March 25, 2024 12:01
An example using CMake/CTest to collect runtime DLL dependencies prior to testing
lib/lib.h:
lib/lib_private.h:
lib/lib.c:
#
# Assume some C library that makes use of OpenSSL
#
lib/CMakeLists.txt:
#
# Test executables
# Also install shared library (DLL) dependencies
install(CODE [[
file(GET_RUNTIME_DEPENDENCIES
LIBRARIES
$<TARGET_FILE:ClamAV::libclamav>
$<TARGET_FILE:ClamAV::libclamunrar_iface>
EXECUTABLES
# $<TARGET_FILE:clambc>
# $<TARGET_FILE:clamd>
# $<TARGET_FILE:clamdscan>
@micahsnyder
micahsnyder / debian-8-bleve-clamonacc-patch.log
Created August 29, 2020 17:49
debian 8 build log using bleve's patch from fedora to loosen curl requirements
micasnyd@debian:~$ su
Password:
root@debian:/home/micasnyd# apt update
e valgrind check libbz2-dev libcurl4-openssl-dev libjson-c-dev libpcre3-dev libssl-dev libxml2-dev zlib1g-dev
apt install git
git clone https://github.com/Cisco-Talos/clamav-devel.git
cd clamav-devel/
mkdir build && cd build
../autogen.sh
../configure --disable-milter --disable-clamav --disable-silent-rules --enable-llvm --with-system-llvm=no && make dist
@micahsnyder
micahsnyder / 0.102.4-clamonacc-loosen-curl-requirements.patch
Created August 25, 2020 21:42
clamonacc - Loosen curl requirements (0.102.4)
diff --git a/clamonacc/clamonacc.c b/clamonacc/clamonacc.c
index e3eee8df2..43f478f76 100644
--- a/clamonacc/clamonacc.c
+++ b/clamonacc/clamonacc.c
@@ -40,6 +40,8 @@
#include <fcntl.h>
#endif
+#include <curl/curl.h>
+
~\workspace\clamav-devel\win32\Win32\Debug [pr/387 ≡]> .\sigtool.exe --find-sigs=".*[mM]aze.*"
[daily.ldb] Win.Malware.Maze-6998740-0;Engine:51-255,Target:1;0&1;556333326e627370616365633937633938633939633130306331303163313032633130336331303463313035633130366331303763313038633130396331313063;727573717375753d
[daily.ldb] Win.Ransomware.Maze-7449729-0;Engine:51-255,Target:1;(0|1);566A40680030000068E1C505006A00FF15;C1C009C1C90A33C88B8610100000C1C80803C8014CBE38
[daily.ldb] Win.Ransomware.Maze-7473718-0;Engine:51-255,Target:1;(0|1|2|3|4|5);62696e5c6361636f6665762e706462;433a5c64656d6f6e736c61793333355c656d7369736f66745f776f726b5c72616e736f6d776172655c6875746368696e732e706462;633a5c6e6561725c766572795c677265775c50656f706c6542656c696576652e706462;433a5c72616e646f6d5c6675636b696e675c706174685c746f5c6675636b696e675c6964696f7469635c6e6f6e6578697374696e675c66696c655c776974685c7064625c657874656e73696f6e2e706462;433a5c736869745c6761766e6f2e706462;433a5c7a656c6f33355f6669786f6d656b61666579755c62696d75647570616c696a5f73697