You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR the path to the binary has moved from /usr/bin to /usr/local/bin, and the results from polling the sweep binary for the definition update did not properly handle the comma and did not return the proper results. This works for version 9.7.8:
<?xml version="1.0" encoding="UTF-8"?> <extensionAttribute> <displayName>Sophos Antivirus - Latest Installed Definition Date</displayName> <description>This attribute returns the Virus Definitions Date for Sophos. This attribute template applies to Sophos version 9.x and was last tested on Sophos 9.7.8</description> <dataType>date</dataType> <scriptContentsMac>#!/bin/sh #This script has been verified to work on Sophos (v 9.7.8). #Check to see if Sophos is installed if [ -f "/usr/local/bin/sweep" ]; then result=/bin/date -j -f "%b %d %Y %T" "$(/usr/local/bin/sweep -v | grep "Data file date" |tail -1| awk '{print $6, $5, substr($7, 1, length($7)-1), $8}')" "+%Y-%m-%d %T"; echo "<result>$result</result>"; else echo "<result>Not installed</result>"; fi </scriptContentsMac> <scriptContentsWindows/> </extensionAttribute>
The text was updated successfully, but these errors were encountered:
TL;DR the path to the binary has moved from /usr/bin to /usr/local/bin, and the results from polling the sweep binary for the definition update did not properly handle the comma and did not return the proper results. This works for version 9.7.8:
<?xml version="1.0" encoding="UTF-8"?> <extensionAttribute> <displayName>Sophos Antivirus - Latest Installed Definition Date</displayName> <description>This attribute returns the Virus Definitions Date for Sophos. This attribute template applies to Sophos version 9.x and was last tested on Sophos 9.7.8</description> <dataType>date</dataType> <scriptContentsMac>#!/bin/sh #This script has been verified to work on Sophos (v 9.7.8). #Check to see if Sophos is installed if [ -f "/usr/local/bin/sweep" ]; then result=
/bin/date -j -f "%b %d %Y %T" "$(/usr/local/bin/sweep -v | grep "Data file date" |tail -1| awk '{print $6, $5, substr($7, 1, length($7)-1), $8}')" "+%Y-%m-%d %T"; echo "<result>$result</result>"; else echo "<result>Not installed</result>"; fi </scriptContentsMac> <scriptContentsWindows/> </extensionAttribute>
The text was updated successfully, but these errors were encountered: