Changeset 722
- Timestamp:
- 07/20/07 18:27:19 (1 year ago)
- Files:
-
- honeyclient/branches/exp/kindlund-firefox/etc/honeyclient.xml (modified) (2 diffs)
- honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Driver.pm (modified) (1 diff)
- honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Driver/Browser.pm (modified) (9 diffs)
- honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Driver/Browser/FF.pm (modified) (3 diffs)
- honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Driver/Browser/IE.pm (modified) (3 diffs)
- honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Integrity.pm (modified) (3 diffs)
- honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Integrity/Filesystem.pm (modified) (1 diff)
- honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Integrity/Registry.pm (modified) (4 diffs)
- honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Integrity/Registry/Parser.pm (modified) (9 diffs)
- honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Integrity/Registry/Parser.yp (modified) (9 diffs)
- honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Manager/VM/Clone.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
honeyclient/branches/exp/kindlund-firefox/etc/honeyclient.xml
r717 r722 126 126 <IE> 127 127 <!-- HoneyClient::Agent::Driver::Browser::IE Options --> 128 <!-- TODO: Update this. -->129 128 <process_exec description="The absolute path to the Internet Explorer application process, as it sits in the VM filesystem." default="C:\Program Files\Internet Explorer\iexplore.exe"> 130 129 C:\Program Files\Internet Explorer\iexplore.exe 131 130 </process_exec> 131 <process_name description="The name of the Internet Explorer executable, as it appears on the VM filesystem." default="iexplore.exe"> 132 iexplore.exe 133 </process_name> 132 134 </IE> 133 135 <FF> … … 136 138 C:\Program Files\Mozilla Firefox\firefox.exe 137 139 </process_exec> 140 <process_name description="The name of the Mozilla Firefox executable, as it appears on the VM filesystem." default="firefox.exe"> 141 firefox.exe 142 </process_name> 138 143 </FF> 139 144 </Browser> honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Driver.pm
r615 r722 306 306 307 307 # Sanity check: Make sure the supplied value is an object. 308 my $type = ref($self) or Carp::croak "Error: $self is not an object!\n"; 308 my $type = ref($self); 309 unless(defined($type)) { 310 $LOG->error("Error: $self is not an object!"); 311 Carp::croak "Error: $self is not an object!\n"; 312 } 309 313 310 314 # Now, get the name of the function. honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Driver/Browser.pm
r696 r722 625 625 # hashtable. The link with the highest score is returned. 626 626 # 627 #628 #629 627 # Inputs: hashref 630 628 # Outputs: valid key, or undef if the hash is empty … … 828 826 } 829 827 828 # XXX: Is this really needed? 830 829 # Helper function designed to kill all instances of the driven 831 830 # application. … … 848 847 849 848 if (!$som->result) { 849 $LOG->warn("Failed to kill process: '" . $self->process_name . "'!"); 850 850 Carp::carp "Failed to kill process: '" . $self->process_name . "'!\n"; 851 851 } … … 986 986 # Sanity check: Make sure we've been fed an object. 987 987 unless (ref($self)) { 988 $LOG->error("Error: Function must be called in reference to a " . 989 __PACKAGE__ . "->new() object!"); 988 990 Carp::croak "Error: Function must be called in reference to a " . 989 991 __PACKAGE__ . "->new() object!\n"; … … 1002 1004 # Sanity check: Make sure our next URL is defined. 1003 1005 unless (defined($args{'url'})) { 1004 Carp::croak "Error: Unable to drive browser - 'links_to_visit' " .1005 "hashtable is empty!\n";1006 $LOG->error("Error: Unable to drive browser - no links left to browse!"); 1007 Carp::croak "Error: Unable to drive browser - no links left to browse!\n"; 1006 1008 } 1007 1009 … … 1152 1154 # Sanity check: Make sure we've been fed an object. 1153 1155 unless (ref($self)) { 1156 $LOG->error("Error: Function must be called in reference to a " . 1157 __PACKAGE__ . "->new() object!"); 1154 1158 Carp::croak "Error: Function must be called in reference to a " . 1155 1159 __PACKAGE__ . "->new() object!\n"; … … 1248 1252 # Sanity check: Make sure we've been fed an object. 1249 1253 unless (ref($self)) { 1254 $LOG->error("Error: Function must be called in reference to a " . 1255 __PACKAGE__ . "->new() object!"); 1250 1256 Carp::croak "Error: Function must be called in reference to a " . 1251 1257 __PACKAGE__ . "->new() object!\n"; … … 1591 1597 # Sanity check: Make sure we've been fed an object. 1592 1598 unless (ref($self)) { 1599 $LOG->error("Error: Function must be called in reference to a " . 1600 __PACKAGE__ . "->new() object!"); 1593 1601 Carp::croak "Error: Function must be called in reference to a " . 1594 1602 __PACKAGE__ . "->new() object!\n"; … … 1654 1662 # Sanity check: Make sure we've been fed an object. 1655 1663 unless (ref($self)) { 1664 $LOG->error("Error: Function must be called in reference to a " . 1665 __PACKAGE__ . "->new() object!"); 1656 1666 Carp::croak "Error: Function must be called in reference to a " . 1657 1667 __PACKAGE__ . "->new() object!\n"; honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Driver/Browser/FF.pm
r707 r722 190 190 # Sanity check: Make sure we've been fed an object. 191 191 unless (ref($self)) { 192 $LOG->error("Error: Function must be called in reference to a " . 193 __PACKAGE__ . "->new() object!"); 192 194 Carp::croak "Error: Function must be called in reference to a " . 193 195 __PACKAGE__ . "->new() object!\n"; … … 209 211 # Sanity check: Make sure our next URL is defined. 210 212 unless (defined($args{'url'})) { 211 Carp::croak "Error: Unable to drive browser - 'links_to_visit' " .212 "hashtable is empty!\n";213 $LOG->error("Error: Unable to drive browser - no links left to browse!"); 214 Carp::croak "Error: Unable to drive browser - no links left to browse!\n"; 213 215 } 214 216 … … 222 224 # Sanity check. 223 225 if (!defined($job)) { 226 $LOG->error("Error: Unable to spawn new job - " . $^E . "."); 224 227 Carp::croak "Error: Unable to spawn new job - " . $^E . ".\n"; 225 228 } honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Driver/Browser/IE.pm
r605 r722 211 211 # Sanity check: Make sure we've been fed an object. 212 212 unless (ref($self)) { 213 $LOG->error("Error: Function must be called in reference to a " . 214 __PACKAGE__ . "->new() object!"); 213 215 Carp::croak "Error: Function must be called in reference to a " . 214 216 __PACKAGE__ . "->new() object!\n"; … … 227 229 # Drive the generic browser before opening with IE 228 230 $self = $self->SUPER::drive(%args); 229 231 230 232 # Sanity check: Make sure our next URL is defined. 231 233 unless (defined($args{'url'})) { 232 Carp::croak "Error: Unable to drive browser - 'links_to_visit' " .233 "hashtable is empty!\n";234 $LOG->error("Error: Unable to drive browser - no links left to browse!"); 235 Carp::croak "Error: Unable to drive browser - no links left to browse!\n"; 234 236 } 235 237 … … 243 245 # Sanity check. 244 246 if (!defined($job)) { 247 $LOG->error("Error: Unable to spawn new job - " . $^E . "."); 245 248 Carp::croak "Error: Unable to spawn new job - " . $^E . ".\n"; 246 249 } honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Integrity.pm
r605 r722 534 534 my ($self, %args) = @_; 535 535 536 # Sanity check: Make sure we've been fed an object. 537 unless (ref($self)) { 538 $LOG->error("Error: Function must be called in reference to a " . 539 __PACKAGE__ . "->new() object!"); 540 Carp::croak "Error: Function must be called in reference to a " . 541 __PACKAGE__ . "->new() object!\n"; 542 } 543 536 544 # Log resolved arguments. 537 545 $LOG->debug(sub { … … 568 576 my $self = shift; 569 577 578 # Sanity check: Make sure we've been fed an object. 579 unless (ref($self)) { 580 $LOG->error("Error: Function must be called in reference to a " . 581 __PACKAGE__ . "->new() object!"); 582 Carp::croak "Error: Function must be called in reference to a " . 583 __PACKAGE__ . "->new() object!\n"; 584 } 585 570 586 if (defined($self->{'_registry'})) { 571 587 $self->{'_registry'}->closeFiles(); … … 576 592 sub destroy { 577 593 my $self = shift; 594 595 # Sanity check: Make sure we've been fed an object. 596 unless (ref($self)) { 597 $LOG->error("Error: Function must be called in reference to a " . 598 __PACKAGE__ . "->new() object!"); 599 Carp::croak "Error: Function must be called in reference to a " . 600 __PACKAGE__ . "->new() object!\n"; 601 } 578 602 579 603 if (defined($self->{'_registry'})) { honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Integrity/Filesystem.pm
r605 r722 1370 1370 my ($self, %args) = @_; 1371 1371 1372 # Sanity check: Make sure we've been fed an object. 1373 unless (ref($self)) { 1374 $LOG->error("Error: Function must be called in reference to a " . 1375 __PACKAGE__ . "->new() object!"); 1376 Carp::croak "Error: Function must be called in reference to a " . 1377 __PACKAGE__ . "->new() object!\n"; 1378 } 1379 1372 1380 # Log resolved arguments. 1373 1381 $LOG->debug(sub { honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Integrity/Registry.pm
r605 r722 411 411 # Extract arguments. 412 412 my $self = shift; 413 414 # Sanity check: Make sure we've been fed an object. 415 unless (ref($self)) { 416 $LOG->error("Error: Function must be called in reference to a " . 417 __PACKAGE__ . "->new() object!"); 418 Carp::croak "Error: Function must be called in reference to a " . 419 __PACKAGE__ . "->new() object!\n"; 420 } 413 421 414 422 # Delete any temporary files created by the baseline … … 1471 1479 my ($self, %args) = @_; 1472 1480 1481 # Sanity check: Make sure we've been fed an object. 1482 unless (ref($self)) { 1483 $LOG->error("Error: Function must be called in reference to a " . 1484 __PACKAGE__ . "->new() object!"); 1485 Carp::croak "Error: Function must be called in reference to a " . 1486 __PACKAGE__ . "->new() object!\n"; 1487 } 1488 1473 1489 # Log resolved arguments. 1474 1490 $LOG->debug(sub { … … 1584 1600 # Extract arguments. 1585 1601 my ($self, %args) = @_; 1602 1603 # Sanity check: Make sure we've been fed an object. 1604 unless (ref($self)) { 1605 $LOG->error("Error: Function must be called in reference to a " . 1606 __PACKAGE__ . "->new() object!"); 1607 Carp::croak "Error: Function must be called in reference to a " . 1608 __PACKAGE__ . "->new() object!\n"; 1609 } 1586 1610 1587 1611 # Log resolved arguments. … … 1639 1663 my ($self, %args) = @_; 1640 1664 1665 # Sanity check: Make sure we've been fed an object. 1666 unless (ref($self)) { 1667 $LOG->error("Error: Function must be called in reference to a " . 1668 __PACKAGE__ . "->new() object!"); 1669 Carp::croak "Error: Function must be called in reference to a " . 1670 __PACKAGE__ . "->new() object!\n"; 1671 } 1672 1641 1673 # Log resolved arguments. 1642 1674 $LOG->debug(sub { honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Integrity/Registry/Parser.pm
r605 r722 781 781 my ($self, %args) = @_; 782 782 783 # Sanity check: Make sure we've been fed an object. 784 unless (ref($self)) { 785 $LOG->error("Error: Function must be called in reference to a " . 786 __PACKAGE__ . "->new() object!"); 787 Carp::croak "Error: Function must be called in reference to a " . 788 __PACKAGE__ . "->new() object!\n"; 789 } 790 783 791 # Log resolved arguments. 784 792 $LOG->debug(sub { … … 1019 1027 my ($self, %args) = @_; 1020 1028 1029 # Sanity check: Make sure we've been fed an object. 1030 unless (ref($self)) { 1031 $LOG->error("Error: Function must be called in reference to a " . 1032 __PACKAGE__ . "->new() object!"); 1033 Carp::croak "Error: Function must be called in reference to a " . 1034 __PACKAGE__ . "->new() object!\n"; 1035 } 1036 1021 1037 # Log resolved arguments. 1022 1038 $LOG->debug(sub { … … 1085 1101 # Extract arguments. 1086 1102 my ($self, %args) = @_; 1103 1104 # Sanity check: Make sure we've been fed an object. 1105 unless (ref($self)) { 1106 $LOG->error("Error: Function must be called in reference to a " . 1107 __PACKAGE__ . "->new() object!"); 1108 Carp::croak "Error: Function must be called in reference to a " . 1109 __PACKAGE__ . "->new() object!\n"; 1110 } 1087 1111 1088 1112 # Log resolved arguments. … … 1135 1159 my ($self, %args) = @_; 1136 1160 1161 # Sanity check: Make sure we've been fed an object. 1162 unless (ref($self)) { 1163 $LOG->error("Error: Function must be called in reference to a " . 1164 __PACKAGE__ . "->new() object!"); 1165 Carp::croak "Error: Function must be called in reference to a " . 1166 __PACKAGE__ . "->new() object!\n"; 1167 } 1168 1137 1169 # Log resolved arguments. 1138 1170 $LOG->debug(sub { … … 1179 1211 my ($self, %args) = @_; 1180 1212 1213 # Sanity check: Make sure we've been fed an object. 1214 unless (ref($self)) { 1215 $LOG->error("Error: Function must be called in reference to a " . 1216 __PACKAGE__ . "->new() object!"); 1217 Carp::croak "Error: Function must be called in reference to a " . 1218 __PACKAGE__ . "->new() object!\n"; 1219 } 1220 1181 1221 # Log resolved arguments. 1182 1222 $LOG->debug(sub { … … 1222 1262 # Extract arguments. 1223 1263 my ($self, %args) = @_; 1264 1265 # Sanity check: Make sure we've been fed an object. 1266 unless (ref($self)) { 1267 $LOG->error("Error: Function must be called in reference to a " . 1268 __PACKAGE__ . "->new() object!"); 1269 Carp::croak "Error: Function must be called in reference to a " . 1270 __PACKAGE__ . "->new() object!\n"; 1271 } 1224 1272 1225 1273 # Log resolved arguments. … … 1276 1324 my ($self, %args) = @_; 1277 1325 1326 # Sanity check: Make sure we've been fed an object. 1327 unless (ref($self)) { 1328 $LOG->error("Error: Function must be called in reference to a " . 1329 __PACKAGE__ . "->new() object!"); 1330 Carp::croak "Error: Function must be called in reference to a " . 1331 __PACKAGE__ . "->new() object!\n"; 1332 } 1333 1278 1334 # Log resolved arguments. 1279 1335 $LOG->debug(sub { … … 1325 1381 # Extract arguments. 1326 1382 my ($self, %args) = @_; 1383 1384 # Sanity check: Make sure we've been fed an object. 1385 unless (ref($self)) { 1386 $LOG->error("Error: Function must be called in reference to a " . 1387 __PACKAGE__ . "->new() object!"); 1388 Carp::croak "Error: Function must be called in reference to a " . 1389 __PACKAGE__ . "->new() object!\n"; 1390 } 1327 1391 1328 1392 # Log resolved arguments. … … 1486 1550 my ($self, %args) = @_; 1487 1551 1552 # Sanity check: Make sure we've been fed an object. 1553 unless (ref($self)) { 1554 $LOG->error("Error: Function must be called in reference to a " . 1555 __PACKAGE__ . "->new() object!"); 1556 Carp::croak "Error: Function must be called in reference to a " . 1557 __PACKAGE__ . "->new() object!\n"; 1558 } 1559 1488 1560 # Log resolved arguments. 1489 1561 $LOG->debug(sub { honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Agent/Integrity/Registry/Parser.yp
r605 r722 626 626 my ($self, %args) = @_; 627 627 628 # Sanity check: Make sure we've been fed an object. 629 unless (ref($self)) { 630 $LOG->error("Error: Function must be called in reference to a " . 631 __PACKAGE__ . "->new() object!"); 632 Carp::croak "Error: Function must be called in reference to a " . 633 __PACKAGE__ . "->new() object!\n"; 634 } 635 628 636 # Log resolved arguments. 629 637 $LOG->debug(sub { … … 864 872 my ($self, %args) = @_; 865 873 874 # Sanity check: Make sure we've been fed an object. 875 unless (ref($self)) { 876 $LOG->error("Error: Function must be called in reference to a " . 877 __PACKAGE__ . "->new() object!"); 878 Carp::croak "Error: Function must be called in reference to a " . 879 __PACKAGE__ . "->new() object!\n"; 880 } 881 866 882 # Log resolved arguments. 867 883 $LOG->debug(sub { … … 930 946 # Extract arguments. 931 947 my ($self, %args) = @_; 948 949 # Sanity check: Make sure we've been fed an object. 950 unless (ref($self)) { 951 $LOG->error("Error: Function must be called in reference to a " . 952 __PACKAGE__ . "->new() object!"); 953 Carp::croak "Error: Function must be called in reference to a " . 954 __PACKAGE__ . "->new() object!\n"; 955 } 932 956 933 957 # Log resolved arguments. … … 980 1004 my ($self, %args) = @_; 981 1005 1006 # Sanity check: Make sure we've been fed an object. 1007 unless (ref($self)) { 1008 $LOG->error("Error: Function must be called in reference to a " . 1009 __PACKAGE__ . "->new() object!"); 1010 Carp::croak "Error: Function must be called in reference to a " . 1011 __PACKAGE__ . "->new() object!\n"; 1012 } 1013 982 1014 # Log resolved arguments. 983 1015 $LOG->debug(sub { … … 1024 1056 my ($self, %args) = @_; 1025 1057 1058 # Sanity check: Make sure we've been fed an object. 1059 unless (ref($self)) { 1060 $LOG->error("Error: Function must be called in reference to a " . 1061 __PACKAGE__ . "->new() object!"); 1062 Carp::croak "Error: Function must be called in reference to a " . 1063 __PACKAGE__ . "->new() object!\n"; 1064 } 1065 1026 1066 # Log resolved arguments. 1027 1067 $LOG->debug(sub { … … 1068 1108 my ($self, %args) = @_; 1069 1109 1110 # Sanity check: Make sure we've been fed an object. 1111 unless (ref($self)) { 1112 $LOG->error("Error: Function must be called in reference to a " . 1113 __PACKAGE__ . "->new() object!"); 1114 Carp::croak "Error: Function must be called in reference to a " . 1115 __PACKAGE__ . "->new() object!\n"; 1116 } 1117 1070 1118 # Log resolved arguments. 1071 1119 $LOG->debug(sub { … … 1121 1169 my ($self, %args) = @_; 1122 1170 1171 # Sanity check: Make sure we've been fed an object. 1172 unless (ref($self)) { 1173 $LOG->error("Error: Function must be called in reference to a " . 1174 __PACKAGE__ . "->new() object!"); 1175 Carp::croak "Error: Function must be called in reference to a " . 1176 __PACKAGE__ . "->new() object!\n"; 1177 } 1178 1123 1179 # Log resolved arguments. 1124 1180 $LOG->debug(sub { … … 1170 1226 # Extract arguments. 1171 1227 my ($self, %args) = @_; 1228 1229 # Sanity check: Make sure we've been fed an object. 1230 unless (ref($self)) { 1231 $LOG->error("Error: Function must be called in reference to a " . 1232 __PACKAGE__ . "->new() object!"); 1233 Carp::croak "Error: Function must be called in reference to a " . 1234 __PACKAGE__ . "->new() object!\n"; 1235 } 1172 1236 1173 1237 # Log resolved arguments. … … 1330 1394 # Extract arguments. 1331 1395 my ($self, %args) = @_; 1396 1397 # Sanity check: Make sure we've been fed an object. 1398 unless (ref($self)) { 1399 $LOG->error("Error: Function must be called in reference to a " . 1400 __PACKAGE__ . "->new() object!"); 1401 Carp::croak "Error: Function must be called in reference to a " . 1402 __PACKAGE__ . "->new() object!\n"; 1403 } 1332 1404 1333 1405 # Log resolved arguments. honeyclient/branches/exp/kindlund-firefox/lib/HoneyClient/Manager/VM/Clone.pm
r605 r722 755 755 # Check to see if the class name is inherited or defined. 756 756 my $class = ref($self) || $self; 757 758 # Sanity check: Make sure we've been fed an object. 759 unless (ref($self)) { 760 $LOG->error("Error: Function must be called in reference to a " . 761 __PACKAGE__ . "->new() object!"); 762 Carp::croak "Error: Function must be called in reference to a " . 763 __PACKAGE__ . "->new() object!"; 764 } 757 765 758 766 # Emit generic "not implemented" error message. … … 840 848 # Check to see if the class name is inherited or defined. 841 849 my $class = ref($self) || $self; 850 851 # Sanity check: Make sure we've been fed an object. 852 unless (ref($self)) { 853 $LOG->error("Error: Function must be called in reference to a " . 854 __PACKAGE__ . "->new() object!"); 855 Carp::croak "Error: Function must be called in reference to a " . 856 __PACKAGE__ . "->new() object!"; 857 } 842 858 843 859 # Emit generic "not implemented" error message. … … 923 939 # Check to see if the class name is inherited or defined. 924 940 my $class = ref($self) || $self; 941 942 # Sanity check: Make sure we've been fed an object. 943 unless (ref($self)) { 944 $LOG->error("Error: Function must be called in reference to a " . 945 __PACKAGE__ . "->new() object!"); 946 Carp::croak "Error: Function must be called in reference to a " . 947 __PACKAGE__ . "->new() object!"; 948 } 925 949 926 950 # Emit generic "not implemented" error message.
