Chandan chandanlog(3C)
or sayings of an hearer
or A Blog of a Security Engineer
or The Official Online Journal of Chief Executive Prankster, Sun Microsystems Inc.,

All (Archive) | General | Solaris | Security | Art | About | |
General Solaris Security Art

« Great Inventions:... | Main | Discovering hidden... »
25 Mar 2006 Parsing Sun Alerts
If you wanted to parse a Sun Alert to get meta data like its synopsis, product, state etc., here is something more than plain old regular expressions. It is a XSLT transform, that reads a Sun Alert html file and just prints the metadata in plain text format.

Use xsltproc(1) to process the Sun Alert this way:
$ /opt/csw/bin/xsltproc --html saplain.xsl 'http://sunsolve.sun.com/search/document.do?assetkey=1-26-102262-1' 2>/dev/null
Sun Alert ID: 102262
Synopsis: Security Vulnerability in sendmail(1M) Versions Prior to 8.13.6
Category: Security
Product: Solaris 9 Operating System, Solaris 10 Operating System, Solaris 8 Operating System
BugIDs: 6397275
Avoidance: Workaround
State: Workaround
Date Released: 22-Mar-2006
Date Closed:
Date Modified: 24-Mar-2006

The intent is to channel this metadata to an RSS feed, so those who prefer a RSS feed for Sun Alerts can get them that way. Watch this space for more to come.

Link | Comments [3]

Comments:

hello, just trying your command on my ultra20 (s10 3/06) and i got only errors: ultra20-henry% /opt/csw/bin/xsltproc --html saplain.xsl 'http://sunsolve.sun.com/search/document.do?assetkey=1-26-102262-1' 2 > /dev/null http://sunsolve.sun.com/search/document.do?assetkey=1-26-102262-1:114: HTML parser error : htmlParseEntityRef: no name seOut="javascript:closefly();"><div><a id="glink1" onclick="if(window.s_account& ^ http://sunsolve.sun.com/search/document.do?assetkey=1-26-102262-1:114: HTML parser error : htmlParseEntityRef: expecting ';' closefly();"><div><a id="glink1" onclick="if(window.s_account&&this.getAttribute

Posted by henry on March 27, 2006 at 11:21 AM PST #

Notice that am ignoring those errors by adding 2>/dev/null

you can also use printer (and bandwidth) friendly url: http://sunsolve.sun.com/search/printfriendly.do?assetkey=1-26-102262-1

Posted by Chandan on March 27, 2006 at 11:27 AM PST #

thanks for your reply. I'm using tcsh instead of bash, so "2>/dev/null" was uneffective.

Posted by henry on March 27, 2006 at 11:43 AM PST #

Post a Comment:

Comments are closed for this entry.

« Great Inventions:... | Main | Discovering hidden... »

Copyright (cc) 2004-2006 by Chandan chandanlog(3C): Parsing Sun Alerts