# # $Date: 2005/10/13 17:02:34 $ # # Functions to create the tabs and frame of the main browsing mode # # Brian Carrier [carrier@sleuthkit.org] # Copyright (c) 2001-2005 by Brian Carrier. All rights reserved # # This file is part of the Autopsy Forensic Browser (Autopsy) # # Autopsy is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # Autopsy is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Autopsy; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR ANY PARTICULAR PURPOSE. # IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, LOSS OF USE, DATA, OR PROFITS OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. package Frame; $Frame::IMG_FRAME = 0; $Frame::IMG_TABS = 1; $Frame::IMG_BLANK = 2; sub main { Args::check_vol('vol'); # By default, show the main frame $Args::args{'view'} = $Args::enc_args{'view'} = $Frame::IMG_FRAME unless (exists $Args::args{'view'}); Args::check_view(); my $view = Args::get_view(); if ($view == $Frame::IMG_FRAME) { vol_browse_frame(); } elsif ($view == $Frame::IMG_TABS) { vol_browse_tabs(); } elsif ($view == $Frame::IMG_BLANK) { vol_browse_blank(); } else { Print::print_check_err("Invalid Frame View"); } return 0; } # create the frame for the tabs on top and the generic message on the bottom sub vol_browse_frame { Print::print_html_header_frameset( "$Args::args{'case'}:$Args::args{'host'}:$Args::args{'vol'}"); my $submod = $::MOD_FRAME; $submod = Args::get_submod() if (exists $Args::args{'submod'}); # Print the rest of the frames my $str = ""; my $view = ""; if ($submod == $::MOD_FILE) { $str .= "&meta=$Args::args{'meta'}" if (exists $Args::args{'meta'}); $str .= "&dir=$Args::args{'dir'}" if (exists $Args::args{'dir'}); $str .= "&sort=$Args::args{'sort'}" if (exists $Args::args{'sort'}); $str .= "&dmode=$Args::args{'dmode'}" if (exists $Args::args{'dmode'}); } elsif ($submod == $::MOD_DATA) { $str .= "&block=$Args::args{'block'}" if (exists $Args::args{'block'}); $str .= "&len=$Args::args{'len'}" if (exists $Args::args{'len'}); } elsif ($submod == $::MOD_META) { $str .= "&meta=$Args::args{'meta'}" if (exists $Args::args{'meta'}); } elsif ($submod == $::MOD_FRAME) { $view = "&view=$Frame::IMG_BLANK"; } print < <center> Autopsy requires a browser that supports frames. </center> EOF Print::print_html_footer_frameset(); return 0; } # Display a message when the image is opened (below the tabs) sub vol_browse_blank { Print::print_html_header("Main Message"); print <






To start analyzing this volume, choose an analysis mode from the tabs above. EOF Print::print_html_footer(); return 0; } sub vol_browse_tabs { Args::check_submod(); Print::print_html_header_tabs("Mode Tabs"); my $submod = Args::get_submod(); my $vol = Args::get_vol('vol'); my $special = 0; $special = 1 unless (($Caseman::vol2cat{$vol} eq "part") && ($Fs::is_fs{$Caseman::vol2ftype{$vol}} == 1)); # if ( ($Caseman::vol2ftype{$vol} eq "strings") # || ($Caseman::vol2ftype{$vol} eq "dls") # || ($Caseman::vol2ftype{$vol} eq "swap") # || ($Caseman::vol2ftype{$vol} eq "raw")); print "
\n"; # Files print "\n" . "\n" . "\n" . "\n" . "\n" . "\n" . "\n"; # Close print "\n"; print "
"; if ($special == 0) { print ""; # Current if ($submod == $::MOD_FILE) { print ""; } # Link else { print ""; } } # non-link else { print ""; } # Search print ""; print ""; if ($submod == $::MOD_KWSRCH) { print ""; } else { print ""; } # File Type print ""; if (($special == 0) && ($::LIVE == 0)) { print ""; # Current if ($submod == $::MOD_APPSORT) { print ""; } else { print ""; } } else { print ""; } # Image Details print ""; if (($special == 0) || ($Caseman::vol2cat{$vol} eq "disk")) { print ""; if ($submod == $::MOD_FS) { print ""; } else { print ""; } } else { print ""; } # Meta Data print ""; if ($special == 0) { print ""; if ($submod == $::MOD_META) { print ""; } else { print ""; } } else { print ""; } # Data Units print ""; print ""; # Current if ($submod == $::MOD_DATA) { print ""; } # Link else { print ""; } # Help - set to current mode print "" . "" . "" . "" . "" . "
\n"; Print::print_html_footer_tabs(); return 0; }