The latest version drops CSV output support in Kismet. I just need some basic information for the scan results. A quick and easy way without having to write a script in Perl or Java was to use xslt transformation.
- Assuming Linux
- Install xsltproc
- Create the a file with the below contents and name it transform.xslt (or whatever):
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="utf-8" />
<xsl:param name="delim" select="','" />
<xsl:param name="quote" select="'"'" />
<xsl:param name="break" select="'
'" />
<xsl:template match="/">
<xsl:apply-templates select="detection-run/wireless-network" />
</xsl:template>
<xsl:template match="wireless-network">
<xsl:apply-templates />
<xsl:if test="following-sibling::*">
<xsl:value-of select="$break" />
</xsl:if>
</xsl:template>
<xsl:template match="*">
<!-- remove normalize-space() if you want keep white-space at it is -->
<xsl:value-of select="concat($quote, normalize-space(), $quote)" />
<xsl:if test="following-sibling::*">
<xsl:value-of select="$delim" />
</xsl:if>
</xsl:template>
<xsl:template match="text()" />
</xsl:stylesheet>
- xsltproc -o MyKismitOutput.csv transform.xslt Kismet-yyyymmdd-hh-MM-ss-1.netxml
|