Changeset 76
- Timestamp:
- 12/06/06 15:49:58 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
honeyclient/branches/exp/stephenson-link_scoring/etc/honeyclient.xml
r74 r76 165 165 <Manager> 166 166 <!-- TODO: Update this. --> 167 <manager_state description="Upon termination, the Manager will attempt to save a complete copy of its state into this file, if specified." default=""> 168 Manager.dump 169 </manager_state> 170 <!-- TODO: Update this. --> 167 171 <address description="The IP or hostname that all Manager modules should use, when accepting SOAP requests." default="localhost"> 168 172 localhost honeyclient/branches/exp/stephenson-link_scoring/lib/HoneyClient/Manager.pm
r75 r76 191 191 VM_EXECUTION_STATE_SUSPENDED); 192 192 193 # TODO: Include unit tests. 194 use IO::File; 195 193 196 # Complete URL of SOAP server, when initialized. 194 197 our $URL_BASE : shared = undef; … … 210 213 # eventually. 211 214 our $globalAgentState = undef; 215 216 # This static variable may contain a filename that the Manager 217 # would use to dump its entire state information, upon termination. 218 # XXX: May want to change this format/usage, eventually. 219 our $STATE_FILE = getVar(name => "manager_state"); 212 220 213 221 ####################################################################### … … 367 375 } 368 376 369 # XXX: Delete this block, eventually. 370 $Data::Dumper::Terse = 0; 371 $Data::Dumper::Indent = 2; 372 print Dumper(thaw(decode_base64($globalAgentState))); 377 # XXX: May want to change this format/usage, eventually. 378 if (length($STATE_FILE) > 0) { 379 print "Saving state to '" . $STATE_FILE . "'...\n"; 380 my $dump_file = new IO::File($STATE_FILE, "w"); 381 382 # XXX: Delete this block, eventually. 383 $Data::Dumper::Terse = 0; 384 $Data::Dumper::Indent = 2; 385 print $dump_file Dumper(thaw(decode_base64($globalAgentState))); 386 } 373 387 374 388 exit;
