Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to process PNG icons for perceptual hash calculation #1090

Merged
merged 2 commits into from
Jul 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions LICENSE-THIRD-PARTY
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RetDec uses the following third-party libraries or other resources:
11) Eigen: http://eigen.tuxfamily.org/index.php?title=Main_Page
12) cmake-modules: https://github.com/rpavlik/cmake-modules
13) tlsh: https://github.com/trendmicro/tlsh
13) stb: https://github.com/nothings/stb

These third-party libraries or other resources are licensed under the
following licenses:
Expand Down Expand Up @@ -973,3 +974,25 @@ DEALINGS IN THE SOFTWARE.

Jonathan Oliver and Jayson Pryde
http://blog.trendmicro.com/trendlabs-security-intelligence/smart-whitelisting-using-locality-sensitive-hashing/

===============================================================================
12) stb
===============================================================================

MIT License
Copyright (c) 2017 Sean Barrett
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,9 @@ set_if_at_least_one_set(RETDEC_ENABLE_YARAMOD
set_if_at_least_one_set(RETDEC_ENABLE_TLSH
RETDEC_ENABLE_FILEFORMAT)

set_if_at_least_one_set(RETDEC_ENABLE_STB
RETDEC_ENABLE_FILEFORMAT)

# Support

set_if_at_least_one_set(RETDEC_ENABLE_SUPPORT_ORDINALS
Expand Down
1 change: 1 addition & 0 deletions deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ endif()
set(MSVC_GE $<BOOL:${MSVC}>)
set(MSVC_CONFIG $<${MSVC_GE}:$<CONFIG>/>)

cond_add_subdirectory(stb RETDEC_ENABLE_STB)
cond_add_subdirectory(authenticode-parser RETDEC_ENABLE_AUTHENTICODE_PARSER)
cond_add_subdirectory(capstone RETDEC_ENABLE_CAPSTONE)
cond_add_subdirectory(elfio RETDEC_ENABLE_ELFIO)
Expand Down
44 changes: 44 additions & 0 deletions deps/stb/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
cmake_minimum_required(VERSION 3.13)

project(stb VERSION 1.0.0 LANGUAGES C)

add_library(stb STATIC
stb_image.c
)

add_library(retdec::deps::stb ALIAS stb)

target_include_directories(stb
PUBLIC
$<BUILD_INTERFACE:${RETDEC_DEPS_DIR}/stb/include>
$<INSTALL_INTERFACE:${RETDEC_INSTALL_DEPS_INCLUDE_DIR}>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)

install(
DIRECTORY ${RETDEC_DEPS_DIR}/stb/include/
DESTINATION ${RETDEC_INSTALL_DEPS_INCLUDE_DIR}
)

install(TARGETS stb
EXPORT stb-targets
ARCHIVE DESTINATION ${RETDEC_INSTALL_LIB_DIR}
LIBRARY DESTINATION ${RETDEC_INSTALL_LIB_DIR}
)

install(EXPORT stb-targets
FILE "retdec-stb-targets.cmake"
NAMESPACE retdec::deps::
DESTINATION ${RETDEC_INSTALL_CMAKE_DIR}
)

configure_file(
"retdec-stb-config.cmake"
"${CMAKE_CURRENT_LIST_DIR}/retdec-stb-config.cmake"
@ONLY
)
install(
FILES "${CMAKE_CURRENT_LIST_DIR}/retdec-stb-config.cmake"
DESTINATION ${RETDEC_INSTALL_CMAKE_DIR}
)
Loading