Skip to content

Commit

Permalink
Merge pull request #2461 from tbeadle/custom-signatures
Browse files Browse the repository at this point in the history
Import all, windows, and linux custom signatures if available.
  • Loading branch information
doomedraven authored Jan 15, 2025
2 parents e33b237 + 9d07ee3 commit 4adc5b6
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions lib/cuckoo/core/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,25 @@

# Private
import custom.signatures

try:
import custom.signatures.all
except ImportError:
HAS_CUSTOM_SIGNATURES_ALL = False
else:
HAS_CUSTOM_SIGNATURES_ALL = True
try:
import custom.signatures.linux
except ImportError:
HAS_CUSTOM_SIGNATURES_LINUX = False
else:
HAS_CUSTOM_SIGNATURES_LINUX = True
try:
import custom.signatures.windows
except ImportError:
HAS_CUSTOM_SIGNATURES_WINDOWS = False
else:
HAS_CUSTOM_SIGNATURES_WINDOWS = True
import modules.auxiliary
import modules.feeds
import modules.processing
Expand Down Expand Up @@ -272,6 +291,12 @@ def init_modules():
import_package(modules.signatures.linux)
# Import all private signatures
import_package(custom.signatures)
if HAS_CUSTOM_SIGNATURES_ALL:
import_package(custom.signatures.all)
if HAS_CUSTOM_SIGNATURES_LINUX:
import_package(custom.signatures.linux)
if HAS_CUSTOM_SIGNATURES_WINDOWS:
import_package(custom.signatures.windows)
if len(os.listdir(os.path.join(CUCKOO_ROOT, "modules", "signatures"))) < 5:
log.warning("Suggestion: looks like you didn't install community, execute: poetry run python utils/community.py -h")
# Import all reporting modules.
Expand Down

0 comments on commit 4adc5b6

Please sign in to comment.