Quantcast
Channel: Symantec Connect - Articles
Viewing all articles
Browse latest Browse all 1863

Symantec definition automatic download

$
0
0

You can download symantec definition files version wise (v12,v14)32bit,64bit automatically from the website for manual update. Below script which you modify for you own environment.

#Author:

#Gopal D 

clear-host
# Remove older definition files fromt the downloaded folder
get-childitem -path "\\av\virus patch\" -filter 2018* -recurse | where-object {$_.lastwritetime -lt $(get-date).date} | Remove-Item 
#Definition list in an arrray to call each definition exe is filltered out.
$symantechlinks = @("https://www.symantec.com/security_response/definitions/download/detail.jsp?gid=sep","https://www.symantec.com/security_response/definitions/download/detail.jsp?gid=sep14","https://www.symantec.com/security_response/definitions/download/detail.jsp?gid=ips14","https://www.symantec.com/security_response/definitions/download/detail.jsp?gid=ips","https://www.symantec.com/security_response/definitions/download/detail.jsp?gid=sonar")
#foreach loop for isolating desired definition for your current environment
foreach ($links in $symantechlinks) {
$definitionpath = (Invoke-WebRequest $links).Links |Where-Object{$_.InnerText -like "*.exe" -and $_.InnerText -notlike "*core31*" -and  $_.InnerText -notlike "*core15*"} | Select-Object -ExpandProperty href

#After getting file links, to extract the name using split with a keyword "/"

foreach ($def in $definitionpath){
    $list = @('(\d+)-(\d+)-(\w+)(\d)(\w+)(\d)(\w)(32)\.(\w+)','(\d+)-(\d+)-(\w+)(\d)(\w+)(\d)(\w)(64)\.(\w+)','(\d+)-(\d+)-(\w+)\.(\w+)','(\d+)-(\d+)-(\w+)\.(\w+)','(\d+)-(\d+)-(\w\d\w\d+\.\w+)','(\d+)-(\d+)-(\w+)\.(\w+)','(\d+)-(\d+)-(\w+)\.(\w+)')
    
    #split the url links and get the download file name alone
    $filscut = $def -split "/"
    foreach ($lname in $list) {
    $fname = $filscut -match $lname
   
    #$def
    #Compare the name and dowload the file for appropriate folders. to achive this we have to use ifcondition. below
    }
        if ($fname -like "*-v5i32*")
        {
        invoke-webrequest -uri $def -OutFile "\\av\virus patch\SEP12.X\32bit\virus and spyware proctection\$fname" # path to save the definition file
        }
       # if ($fname -like "*-v5i64*")
       # {
       # invoke-webrequest -uri $def -OutFile "\\av\virus patch\64bit\virus and spyware proctection\$fname"
       # }
         if ($fname -like "*-core3sdsv5i32*")
        {
        invoke-webrequest -uri $def -OutFile "\\av\virus patch\32bit\virus and spyware proctection\$fname" # path to save the definition file
       }
       if ($fname -like "*-core3sdsv5i64*")
        {
        invoke-webrequest -uri $def -OutFile "\\av\virus patch\64bit\virus and spyware proctection\$fname" # path to save the definition file
       }

        if ($fname -like "*-IPS_IU_SEP_14*")
        {
        invoke-webrequest -uri $def -OutFile "\\av\virus patch\64bit\NETwork and Host exploit mitigation\$fname" # path to save the definition file
        invoke-webrequest -uri $def -OutFile "\\av\virus patch\32bit\NETwork and Host exploit mitigation\$fname"  # path to save the definition file
       }
       
        if ($fname -like "*-IPS_IU_SEP.EXE*")
        {
        invoke-webrequest -uri $def -OutFile "\\av\virus patch\SEP12.X\32bit\NETwork and Host exploit mitigation\$fname" # path to save the definition file
       }
             if ($fname -like "*SONAR*")
        {
        invoke-webrequest -uri $def -OutFile "\\av\virus patch\32bit\Proactive threat protection\$fname"  # path to save the definition file
        invoke-webrequest -uri $def -OutFile "\\av\virus patch\64bit\Proactive threat protection\$fname"   # path to save the definition file
       invoke-webrequest -uri $def -OutFile  "\\av\virus patch\SEP12.X\32bit\Proactive threat protection\$fname"  # path to save the definition file
       }
    }
 }


Viewing all articles
Browse latest Browse all 1863

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>