diff options
| author | yangwei <[email protected]> | 2024-08-21 16:36:45 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-08-21 16:36:45 +0800 |
| commit | 03beeda8fc775ae43c6c375f026dd216dbafaa04 (patch) | |
| tree | 93e249caf5eefd2e34ee8b190dee52ed1e44bf5b | |
| parent | e52a604edbc2f9b3bfbcbd991b5d191b1631ad85 (diff) | |
🐞 fix(detain entry in ssl_defer): register as a bussiness pluginv3.1.6
| -rw-r--r-- | bin/ssl.inf | 4 | ||||
| -rw-r--r-- | bin/ssl_defer.inf | 9 | ||||
| -rw-r--r-- | cmake/preInstall.sh | 6 | ||||
| -rw-r--r-- | cmake/preUninstall.sh | 1 | ||||
| -rw-r--r-- | src/SSL_Analyze.c | 4 |
5 files changed, 19 insertions, 5 deletions
diff --git a/bin/ssl.inf b/bin/ssl.inf index 3471805..f73af40 100644 --- a/bin/ssl.inf +++ b/bin/ssl.inf @@ -10,7 +10,3 @@ GETPLUGID_FUNC=SSL_GETPLUGID [TCP] FUNC_FLAG=ALL FUNC_NAME=SSL_ENTRY - -[TCP_ALL] -FUNC_FLAG=ALL -FUNC_NAME=SSL_DETAIN_ENTRY
\ No newline at end of file diff --git a/bin/ssl_defer.inf b/bin/ssl_defer.inf new file mode 100644 index 0000000..5ee9088 --- /dev/null +++ b/bin/ssl_defer.inf @@ -0,0 +1,9 @@ +[PLUGINFO] +PLUGNAME=SSL_DEFER +SO_PATH=./plug/protocol/ssl/ssl.so +INIT_FUNC=SSL_DEFER_INIT +DESTROY_FUNC=SSL_DEFER_DESTROY + +[TCP_ALL] +FUNC_FLAG=ALL +FUNC_NAME=SSL_DETAIN_ENTRY diff --git a/cmake/preInstall.sh b/cmake/preInstall.sh index ccce914..59b9476 100644 --- a/cmake/preInstall.sh +++ b/cmake/preInstall.sh @@ -14,4 +14,8 @@ if [[ -z `grep -rn 'SSL' ${DST}/etc/entrylist.conf` ]];then fi if [[ -z `grep -rn 'JA3_FINGERPRINT_LABEL' ${DST}/etc/project_list.conf` ]];then echo "JA3_FINGERPRINT_LABEL struct" >> ${DST}/etc/project_list.conf -fi
\ No newline at end of file +fi + +if [[ -z `grep -rn 'ssl_defer.inf' ${DST}/plug/conflist.inf` ]];then + sed -i '$a ./plug/protocol/ssl/ssl_defer.inf' ${DST}/plug/conflist.inf +fi diff --git a/cmake/preUninstall.sh b/cmake/preUninstall.sh index e01923e..2b439ac 100644 --- a/cmake/preUninstall.sh +++ b/cmake/preUninstall.sh @@ -10,4 +10,5 @@ if [ $1 == 0 ]; then sed -i '/ssl.inf/d' ${DST}/plug/conflist.inf sed -i '/SSL/d' ${DST}/etc/entrylist.conf + sed -i '/ssl_defer.inf/d' ${DST}/plug/conflist.inf fi diff --git a/src/SSL_Analyze.c b/src/SSL_Analyze.c index 9e71221..3f320dd 100644 --- a/src/SSL_Analyze.c +++ b/src/SSL_Analyze.c @@ -273,6 +273,10 @@ static void ssl_retain_packet_bridge_free(const struct streaminfo *stream, int b return; } +extern "C" int SSL_DEFER_INIT(void){return 0;}; +extern "C" void SSL_DEFER_DESTROY(void){}; + + extern "C" int SSL_INIT(void) { memset(&g_ssl_runtime_para, 0, sizeof(struct ssl_runtime_para)); |
