Endpoint Protection

 View Only

How to read / parse what the current definitions are on Symantec Endpoint Protection Part2 

Jul 10, 2017 05:51 PM

Dear All,

I'd tried to get information about how to read current definitions on Symantec via Python on your site but unfortunately I could not. After that I tried to get it by myself and created on Python the code below.

import os
import platform
import winreg

def get_registry_value(key, subkey, value):
    key = getattr(winreg, key)
    handle = winreg.OpenKey(key, subkey)
    (value, type) = winreg.QueryValueEx(handle, value)
    return value

if windowsbit.find("64") == -1:
    strWinX = "32Bit"
else:
    strWinX = "64bit"

if strWinX == "64bit":
    SEPstatus = get_registry_value(
        "HKEY_LOCAL_MACHINE",
        "SOFTWARE\\WOW6432Node\\Symantec\\Symantec Endpoint Protection\\AV",
        "UsingPattern")
else:
    SEPstatus = get_registry_value(
        "HKEY_LOCAL_MACHINE",
        "SOFTWARE\\Symantec\\Symantec Endpoint Protection\\AV",
        "UsingPattern")

SEPyear = str ((SEPstatus >> 18) + 1998)
SEPmonth = (SEPstatus >> 14)
SEPmontha = str ((SEPmonth & 0x0f))
SEPday = (SEPstatus >> 9)
SEPdaya = str ((SEPday & 0x1f))

strSEPdate = SEPdaya + "/" + SEPmontha + "/" + SEPyear # day/month/year format
print(strSEPdate)

Thanks in advance.

Regards.

Statistics
1 Favorited
2 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.