What tools can I use to analyze Internet Explorer's network capture logs?

北战南征 提交于 2019-12-02 21:46:36

Fiddler does support importing HTTP Archive XML (exported from IE9 Developer Tools Network Tab) as per its blog

For those analysing customer logs, who don't have a Windows box to run Fiddler on...

It turns out that the XML that IE produces is just HAR in XML instead of JSON format. I wrote a converter to turn it into a normal HAR file: https://gist.github.com/craigds/00331c6ff8fd2334de68a52ef0cd79c2

Requires python and LXML.

Fiddler can read these now, (but not via import):

  1. File > Import Sessions
  2. Select IE's F12 NetXML Format.
  3. Select correct file
  4. PROFIT!

Here is a Sample XLST to diplay NetworkData.xml in a browser, is not complete but you'll get the idea.

Edit NetworkData.xml and add

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="NDTable.xsl" ?>

at the beginning

Save the following XML at NDTable.xsl

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="/">
        <html>
            <xsl:apply-templates/>
        </html>

    </xsl:template>


    <xsl:template match="log">
        <head>
            <Title>
                <xsl:value-of select="creator/name"/>
            </Title>
        </head>
        <body>
            <h1>
                <xsl:value-of select="creator/name" />
            </h1>
            <P>Started at <xsl:value-of select="pages/page/startedDateTime" />
            </P>
            <table border="1">
                <tr>
                    <th>Request</th>
                    <th>Response</th>
                </tr>
                <xsl:apply-templates select="entries" />
            </table>
        </body>

    </xsl:template>

    <xsl:template match="entry">
        <tr> 
            <td>
                <xsl:apply-templates select="request" />
            </td>
            <td valig="top">
                <xsl:apply-templates select="response" />
            </td>

        </tr>


    </xsl:template>

    <xsl:template match="request">
        <table>
            <tr>
                <td valign="top">
                    <xsl:value-of select="method" />
                </td>
                <td>
                    <xsl:value-of select="url" />
                    <table>
                        <tr>
                            <th>Headers</th>
                        </tr>
                        <tr>
                            <td> </td>
                            <td>
                                <xsl:apply-templates select="headers/header[not(name='Cookie')]" />
                            </td>
                        </tr>
                    </table>
                    <table>
                        <tr>
                            <th>Cookies</th>
                        </tr>

                        <xsl:apply-templates select="cookies" />
                    </table>
                </td>
            </tr>
        </table>
    </xsl:template> 
    <xsl:template match="response">
        <table>
            <td>
                <xsl:value-of select="status" /> <span>.</span><xsl:value-of select="statusText" />
                <br/>
                    <table>
                        <tr>
                            <th>Headers</th>
                        </tr>
                        <tr>
                            <td> </td>
                            <td>
                                <xsl:apply-templates select="headers/header" />
                            </td>
                        </tr>
                    </table>
<div style='background-color: #C0C0C0'> <xsl:value-of select="content/text" /> </div>                   
            </td>
        </table>
    </xsl:template> 
    <xsl:template match="header">
        <xsl:value-of select="name" /> : <xsl:value-of select="value" />
        <br/>
    </xsl:template> 
    <xsl:template match="cookie">
        <tr>
            <td> </td>
            <td valign="top">
                <xsl:value-of select="name" />
            </td>
            <td>
                <xsl:value-of select="value" />
            </td>
        </tr>
    </xsl:template> 
</xsl:stylesheet>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!