updated dockersep config
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/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._]+" )
|
tag=$(docker run -it tabledevil/sep:latest version | grep -Pio "(?<=Dockertag: )[\d._]+" )
|
||||||
echo "NEW TAG : ${tag}"
|
echo "NEW TAG : ${tag}"
|
||||||
docker tag tabledevil/sep tabledevil/sep:${tag}
|
docker tag tabledevil/sep tabledevil/sep:${tag}
|
||||||
|
|||||||
20
dockerfiles/sep/config.sh
Normal file
20
dockerfiles/sep/config.sh
Normal 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
|
||||||
@@ -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
|
|
||||||
@@ -8,4 +8,5 @@ RUN chmod +x /root/start.sh
|
|||||||
ENTRYPOINT ["/root/start.sh"]
|
ENTRYPOINT ["/root/start.sh"]
|
||||||
CMD ["shell"]
|
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 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
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo "stage: ${1}"
|
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
shell )
|
shell )
|
||||||
|
echo "stage: ${1}"
|
||||||
service rtvscand start
|
service rtvscand start
|
||||||
echo "Usage:"
|
echo "Usage:"
|
||||||
echo "sav manualscan -c <file>"
|
echo "sav manualscan -c <file>"
|
||||||
/bin/bash
|
/bin/bash
|
||||||
;;
|
;;
|
||||||
version )
|
version )
|
||||||
|
echo "stage: ${1}"
|
||||||
service rtvscand start
|
service rtvscand start
|
||||||
sleep 5
|
sleep 5
|
||||||
sep_dev=$(sav info -d | tr -d '\r\n')
|
sep_dev=$(sav info -d | tr -d '\r\n')
|
||||||
@@ -25,6 +26,7 @@ case "${1}" in
|
|||||||
|
|
||||||
;;
|
;;
|
||||||
scan )
|
scan )
|
||||||
|
echo "stage: ${1}"
|
||||||
service rtvscand start
|
service rtvscand start
|
||||||
sleep 5
|
sleep 5
|
||||||
sav manualscan -c /data
|
sav manualscan -c /data
|
||||||
@@ -33,6 +35,7 @@ case "${1}" in
|
|||||||
cat /root/tag
|
cat /root/tag
|
||||||
;;
|
;;
|
||||||
debug )
|
debug )
|
||||||
|
echo "stage: ${1}"
|
||||||
/bin/bash
|
/bin/bash
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user