forked from littlebizzy/slickstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ss-scan.txt
42 lines (32 loc) · 2.25 KB
/
ss-scan.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
####################################################################################################
#### author: SlickStack ############################################################################
#### link: https://slickstack.io ###################################################################
#### mirror: http://mirrors.slickstack.io/ss-scan.txt ##############################################
#### path: /var/www/ss-scan ########################################################################
#### destination: n/a (not a boilerplate) ##########################################################
#### purpose: Scans the entire SlickStack directory tree (only) for malware using ClamAV ###########
#### module version: Ubuntu 20.04 LTS + ClamAV 0.101.x #############################################
####################################################################################################
## SS-SCAN ONLY SCANS AND LOGS COMMON LINUX MALWARE FOUND TO: /var/www/logs/clamav.log ##
## USE SS-CLEAN TO DELETE GENERAL JUNK FILES OR SS-OPTIMIZE TO IMPROVE DATABASE ##
## include SlickStack configuration ##
source /var/www/ss-config
## include SlickStack functions ##
source /var/www/ss-functions
####################################################################################################
#### SS-Scan: Scan SlickStack Directory Tree For Malware (Via ClamAV) ##############################
####################################################################################################
## on average the ClamAV scanning process takes around 5-10 minutes on typical servers ##
## verbose results are printed via CLI (also saved to /var/www/logs/clamav.log) ##
## ensure ClamAV log file exists ##
if [[ ! -f "/var/www/logs/clamav.log" ]]; then
touch "/var/www/logs/clamav.log"
chown clamav:clamav /var/www/logs/clamav.log
fi
## scan SlickStack directory tree (only) for common malware ##
clamscan -ir /var/www -l /var/www/logs/clamav.log
####################################################################################################
#### SlickStack: External References Used To Improve This Script (Thanks, Interwebz) ###############
####################################################################################################
## Ref: