<section index="2.3" title="No HTTP(S) Server Session Timeout or HTTP(S) Server Idle Timeout Set" ref="ADMINISTRATION.WEBTIMEOUT.NO.HTTP.OR.HTTPS.SESSION.OR.IDLE.TIMEOUT.four">
<issuedetails>
<devices>
<device name="Switch" type="Cisco Catalyst Switch" osversion="16.3" />
</devices>
<ratings type="Nipperv1">
<rating>High</rating>
<impact>Critical</impact>
<ease>Easy</ease>
<fix>Quick</fix>
<FindingID>NSA-ADMIN-046</FindingID>
<classif>Administration</classif>
</ratings>
</issuedetails>
<section index="2.3.1" title="Finding" ref="FINDING">
</section>
<section index="2.3.4" title="Recommendation" ref="RECOMMENDATION">
<text>Nipper Studio recommends that a HTTP(S) server session timeout period of 10 minutes or less should be configured.</text>
<text>Notes for Cisco Catalyst Switch devices:</text>
<text>The HTTP server timeout can be configured with the following command:<code><command>ip http timeout-policy idle <cmduser>seconds</cmduser> life <cmduser>seconds</cmduser> requests <cmduser>number</cmduser></command>
</code>
</text>
XML解析器:
$commands = $section->xpath('section[4]/text/code/command');
$object->commands = "";
foreach($commands as $command)
{
$object->commands .= $command;
$cmdusers = $command->xpath('cmduser');
foreach($cmdusers as $cmduser){
$object->commands .= $cmduser;
}
$object->commands .= "<br>";
}
echo "commands : <br>".$object->commands;
echo "<be>";
输出:
ip http timeout-policy idle seconds life seconds requests number
但它是这样来的
ip http timeout-policy idle life requests secondssecondsnumber