mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2025-05-04 15:35:04 -04:00
Many changes
- Add support to scan for malware in certain directories - 15.1: Add new device, griffin - Note deprecation status of various devices - Add a few blobs to the deblobber
This commit is contained in:
parent
966c9c8509
commit
5695712cf4
9 changed files with 146 additions and 10 deletions
|
@ -47,6 +47,28 @@ gitReset() {
|
|||
}
|
||||
export -f gitReset;
|
||||
|
||||
scanForMalware() {
|
||||
if [ -x /usr/bin/clamscan ] && [ -f /var/lib/clamav/main.cvd ]; then
|
||||
echo -e "\e[0;32mStarting a malware scan, this might take a while...\e[0m";
|
||||
scanQueue="$base/build $base/device $base/vendor";
|
||||
#scanQueue=$scanQueue" $base/prebuilts $base/sdk $base/toolchain $base/tools";
|
||||
du -hsc $scanQueue;
|
||||
/usr/bin/clamscan --recursive --detect-pua --infected --exclude-dir=".git" $scanQueue;
|
||||
clamscanExit=$?;
|
||||
if [ "$clamscanExit" -eq "1" ]; then
|
||||
echo -e "\e[0;31m----------------------------------------------------------------\e[0m";
|
||||
echo -e "\e[0;31mWARNING: MALWARE WAS FOUND! PLEASE INVESTIGATE!\e[0m";
|
||||
echo -e "\e[0;31m----------------------------------------------------------------\e[0m";
|
||||
fi;
|
||||
if [ "$clamscanExit" -eq "0" ]; then
|
||||
echo -e "\e[0;32mNo malware found\e[0m";
|
||||
fi;
|
||||
else
|
||||
echo -e "\e[0;33mWARNING: clamscan is unavailable, a malware scan will not be performed!\e[0m";
|
||||
fi;
|
||||
}
|
||||
export -f scanForMalware;
|
||||
|
||||
disableDexPreOpt() {
|
||||
cd $base$1;
|
||||
if [ -f BoardConfig.mk ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue