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

example disable profile #457

Merged
merged 3 commits into from
Jan 23, 2023
Merged
Changes from all commits
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
44 changes: 44 additions & 0 deletions scan-profiles/example-disable-module.emba
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# EMBA - EMBEDDED LINUX ANALYZER
#
# Copyright 2020-2023 Siemens Energy AG
#
# EMBA comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
# welcome to redistribute it under the terms of the GNU General Public License.
# See LICENSE file for usage of this software.
#
# EMBA is licensed under GPLv3
#
# Author(s): Michael Messner
#
# Description: This is an example EMBA profile. This module shows a way to disable modules
# with a profile configuration. You can Use it as a template for your own profiles
# or start emba with "-p scan-profiles/example-disable-module.emba" to use it

export FORMAT_LOG=1
export THREADED=1
export SHORT_PATH=1
export HTML=1
export QEMULATION=1
export FULL_EMULATION=1
export MODULE_BLACKLIST=( "S99_grepit" "S110_yara_check" )
local MODULE_

# we output the profile only at the beginning - outside the docker environment
if [[ $IN_DOCKER -ne 1 ]] ; then
print_output "$(indent "$(orange "Adds ANSI color codes to log")")" "no_log"
print_output "$(indent "$(orange "Activate multi threading (destroys regular console output)")")" "no_log"
print_output "$(indent "$(orange "Prints only relative paths")")" "no_log"
print_output "$(indent "$(orange "Activates web report creation in log path")")" "no_log"
print_output "$(indent "$(orange "Activates full-system mode emulation tests")")" "no_log"
if [[ "$USE_DOCKER" -ne 1 ]]; then
print_output "$(indent "$(orange "Enables automated qemu emulation tests (WARNING this module could harm your host!)")")" "no_log"
else
print_output "$(indent "$(orange "Enables automated qemu emulation tests")")" "no_log"
fi
print_output "$(indent "$(orange "Runs EMBA in docker container")")" "no_log"
print_output "$(indent "$(orange "Disable EMBA module via profile")")" "no_log"
for MODULE_ in "${MODULE_BLACKLIST[@]}"; do
print_output "$(indent "$(orange "Blacklisted module: $MODULE_")")" "no_log"
done
export USE_DOCKER=1
fi