Changeset 1126
- Timestamp:
- 01/24/08 16:34:14 (7 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
honeyclient/trunk/lib/HoneyClient/Agent/Integrity.pm
r1108 r1126 494 494 495 495 #OPTIONAL, this will not exist for deleted files 496 ' content' => {496 'file_content' => { 497 497 'size' => 1234, # size of new content 498 ' type' => 'application/octect-stream',# type of new content498 'mime_type' => 'application/octect-stream', # type of new content 499 499 'md5' => 'b1946ac92492d2347c6235b4d2611184', # md5 of new content 500 500 'sha1' => 'f572d396fae9206628714fb2ce00f72e94f2258f', # sha1 of new content … … 690 690 if($toks[$F_EVENT_TYPE] ne "Delete"){ 691 691 #Fill in the default values, incase the file can't be found due to a rename rather than delete 692 $file_obj->{' contents'} = {692 $file_obj->{'file_content'} = { 693 693 'size' => 0, 694 ' type' => "UNKNOWN",694 'mime_type' => "UNKNOWN", 695 695 'md5' => "$toks[$F_NAME]$toks[$F_TIME]", 696 696 'sha1' => "$toks[$F_NAME]$toks[$F_TIME]", … … 728 728 # Close the file handle. 729 729 undef $fh; 730 $file_obj->{' contents'}->{'size'} = $size;731 $file_obj->{' contents'}->{'md5'} = $md5;732 $file_obj->{' contents'}->{'sha1'} = $sha1;733 $file_obj->{' contents'}->{'type'} = $type;730 $file_obj->{'file_content'}->{'size'} = $size; 731 $file_obj->{'file_content'}->{'md5'} = $md5; 732 $file_obj->{'file_content'}->{'sha1'} = $sha1; 733 $file_obj->{'file_content'}->{'mime_type'} = $type; 734 734 } 735 735 }; 736 736 if($@){ 737 737 print "Filesystem error occurred, setting safe values for $tmp_name\n"; 738 $file_obj->{' contents'} = {738 $file_obj->{'file_content'} = { 739 739 'size' => 0, 740 ' type' => "FSERROR",740 'mime_type' => "FSERROR", 741 741 'md5' => "FSERROR", 742 742 'sha1' => "FSERROR",
