Changeset 1083
- Timestamp:
- 12/19/07 08:28:41 (8 months ago)
- Files:
-
- honeyclient/trunk/etc/honeyclient.xml (modified) (2 diffs)
- honeyclient/trunk/lib/HoneyClient/Manager.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
honeyclient/trunk/etc/honeyclient.xml
r1081 r1083 101 101 </limit_spidering> 102 102 <max_relative_links_to_visit description="An integer, representing the maximum number of relative links that the browser should visit, before moving onto another website. If negative, then the browser will exhaust all possible relative links found, before moving on. This functionality is best effort; it's possible for the browser to visit new links on previously visited websites. Note that this value can be overridden if limit_spidering is set to 1 above." default="-1"> 103 5103 -1 104 104 </max_relative_links_to_visit> 105 105 <positive_words description="If a link contains any number of these words, then its probability of being visited (its score) will increase."> … … 374 374 etc/honeyclient_log.conf 375 375 </conffile> 376 <max_agent_error_count description="The maximum number of time the fault handler can be called for an Agent that the Manager has a SOAP connection to, before the VM is suspended and the Manager moves on. This is mostly to address the case where the Manager loses connectivity to the Agent (for instance due to the VM or Agent itself crashing) where if action is not taken, it will loop forever trying to connect to the Agent. This value should never be set to 0 and should always be positive." default="3"> 377 3 378 </max_agent_error_count> 376 379 <!-- HoneyClient::Manager::FW Options --> 377 380 <FW> honeyclient/trunk/lib/HoneyClient/Manager.pm
r1060 r1083 366 366 our $globalAgentState = undef; 367 367 368 369 #This variable is used to count how many times stubAgent's fault 370 #handler has been called, so that special actions can be taken if 371 #it is called too many times (for instance when Manager loses 372 #connectivity with the Agent it would otherwise loop and get errors 373 #forever if some action isn't taken) 374 #NOTE: This will have to be changed to be agent/vm-specific in the 375 #future when we have multiple Agents interacting with a single 376 #Manager. 377 our $globalAgentErrorCount; 378 368 379 # Temporary variable, used to indicate to the fault handler whether 369 380 # or not errors/warnings should be suppressed. … … 451 462 # Private Methods Implemented # 452 463 ####################################################################### 464 465 sub _agentHandleFault { 466 467 # Extract arguments. 468 my ($class, $res) = @_; 469 470 471 #NOTE: In the future we may want to have this check first to see if 472 #the error is specific to a failed connection (by regexing the error 473 #message. But for now, we have no evidence that multiple errors will 474 #occur in other circumstances. 475 $globalAgentErrorCount++; 476 477 478 # Construct error message. 479 # Figure out if the error occurred in transport or over 480 # on the other side. 481 my $errMsg = $class->transport->status; # Assume transport error. 482 483 if (ref $res) { 484 $errMsg = $res->faultcode . ": ". $res->faultstring . "\n"; 485 } 486 487 if (!$SUPPRESS_ERRORS) { 488 $LOG->warn("Error occurred during processing. " . $errMsg); 489 Carp::carp __PACKAGE__ . "->_handleFault(): Error occurred during processing.\n" . $errMsg; 490 } 491 } 453 492 454 493 sub _handleFault { … … 1014 1053 if ($vmCompromised) { 1015 1054 # Reset the FW state table. 1016 $vmStateTable = { }; 1055 $vmStateTable = ( ); 1056 return $args{'agent_state'}; 1057 } 1058 if ($globalAgentErrorCount >= getVar(name => "max_agent_error_count")) { 1059 # Reset the FW state table. 1060 $vmStateTable = ( ); 1017 1061 return $args{'agent_state'}; 1018 1062 }
