updated dockersep config

This commit is contained in:
Tobias Kessels
2019-05-06 00:29:50 +02:00
parent 4b9bf0285b
commit c3a1b8b338
5 changed files with 27 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
#!/bin/bash
docker build -t tabledevil/sep:latest -f sep_dev.dockerfile .
docker build --no-cache -t tabledevil/sep:latest -f sep_dev.dockerfile .
tag=$(docker run -it tabledevil/sep:latest version | grep -Pio "(?<=Dockertag: )[\d._]+" )
echo "NEW TAG : ${tag}"
docker tag tabledevil/sep tabledevil/sep:${tag}

20
dockerfiles/sep/config.sh Normal file
View File

@@ -0,0 +1,20 @@
service rtvscand start
echo "Starting Liveupdate"
sav liveupdate -u
echo "Done with Liveupdate"
echo "Changing Config for Manualscan"
key='\Symantec Endpoint Protection\AV\LocalScans\ManualScan'
cmd='/opt/Symantec/symantec_antivirus/symcfg'
#Setting AntivirusAction to just
${cmd} add -k "${key}" -v FirstAction -d 0 -t 'REG_DWORD'
${cmd} add -k "${key}" -v FirstMacroAction -d 0 -t 'REG_DWORD'
${cmd} add -k "${key}" -v Checksum -d 1 -t 'REG_DWORD'
while ! (sav info -d | grep -Pq '^\d') ; do
sleep 1
done
#writing DefinitionVersion to file in TAGFORMAT
sav info -d | tr -d '\r\n' | sed -e 's/rev./_/' -e 's/ //g' -e 's|/|.|g' -e 's/\([0-9]\{2\}\).\([0-9]\{2\}\).\([0-9]\{2\}\)/\2.\1.\3/g' | tee /root/tag
service rtvscand stop
sleep 5

View File

@@ -1,12 +0,0 @@
FROM ubuntu:16.04
LABEL maintainer="tabledevil"
LABEL docker.cmd="docker run -it --rm -v /mnt/sdc1:/data sep"
RUN apt-get update && apt-get install -y wget default-jre lib32ncurses5 lib32z1 sharutils ; rm -rf /var/lib/apt/lists/*
ADD sep.tar.gz /root/
WORKDIR /root
RUN chmod +x /root/sep/install.sh
RUN /root/sep/install.sh -i && rm -rf /root/sep
RUN ln -s /opt/Symantec/symantec_antivirus/sav /usr/local/bin/sav
WORKDIR /data

View File

@@ -8,4 +8,5 @@ RUN chmod +x /root/start.sh
ENTRYPOINT ["/root/start.sh"]
CMD ["shell"]
#RUN wget ftp://ftp.symantec.com/AVDEFS/symantec_antivirus_corp/static/symcdefs-core15unix.sh && chmod +x symcdefs-core15unix.sh && ./symcdefs-core15unix.sh && rm ./symcdefs-core15unix.sh
RUN service rtvscand start ; sleep 10 ; sav liveupdate -u ; sleep 10 ; while ! (sav info -d | grep -Pq '^\d') ; do sleep 1 ; done ; sav info -d | tee /root/tag ; service rtvscand stop ; sleep 10
ADD config.sh /root/config.sh
RUN chmod +x /root/config.sh ; /root/config.sh

View File

@@ -1,13 +1,14 @@
#!/bin/bash
echo "stage: ${1}"
case "${1}" in
shell )
echo "stage: ${1}"
service rtvscand start
echo "Usage:"
echo "sav manualscan -c <file>"
/bin/bash
;;
version )
echo "stage: ${1}"
service rtvscand start
sleep 5
sep_dev=$(sav info -d | tr -d '\r\n')
@@ -25,6 +26,7 @@ case "${1}" in
;;
scan )
echo "stage: ${1}"
service rtvscand start
sleep 5
sav manualscan -c /data
@@ -33,6 +35,7 @@ case "${1}" in
cat /root/tag
;;
debug )
echo "stage: ${1}"
/bin/bash
;;
esac