Package org.sleuthkit.autopsy.casemodule

Examples of org.sleuthkit.autopsy.casemodule.Case


            if (this.anyFiltersEnabled()) {
                String title = NbBundle.getMessage(this.getClass(), "FileSearchPanel.search.results.title", ++resultWindowCount);
                String pathText = NbBundle.getMessage(this.getClass(), "FileSearchPanel.search.results.pathText");

                // try to get the number of matches first
                Case currentCase = Case.getCurrentCase(); // get the most updated case
                long totalMatches = 0;
                List<AbstractFile> contentList = null;
                try {
                    SleuthkitCase tskDb = currentCase.getSleuthkitCase();
                    //ResultSet rs = tempDb.runQuery(this.getQuery("count(*) as TotalMatches"));
                    contentList = tskDb.findAllFilesWhere(this.getQuery());

                } catch (TskCoreException ex) {
                    Logger logger = Logger.getLogger(this.getClass().getName());
View Full Code Here


        setEnabled(false);
        Case.addPropertyChangeListener(new PropertyChangeListener() {
            @Override
            public void propertyChange(PropertyChangeEvent evt) {
                if (evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())) {
                    Case newCase = (Case) evt.getNewValue();
                    setEnabled(newCase != null);

                    // Make the cases' Reoports folder, if it doesn't exist
                    if (newCase != null) {
                        boolean exists = (new File(newCase.getCaseDirectory() + File.separator + "Reports")).exists();
                        if (!exists) {
                            boolean reportCreate = (new File(newCase.getCaseDirectory() + File.separator + "Reports")).mkdirs();
                            if (!reportCreate) {
                                logger.log(Level.WARNING, "Could not create Reports directory for case. It does not exist."); //NON-NLS
                            }
                        }
                    }
View Full Code Here

    public void componentOpened() {
        // change the cursor to "waiting cursor" for this operation
        this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        try {
            if (Case.existsCurrentCase()) {
                Case currentCase = Case.getCurrentCase();

                // close the top component if there's no image in this case
                if (currentCase.hasData() == false) {
                    //this.close();
                    ((BeanTreeView) this.jScrollPane1).setRootVisible(false); // hide the root
                } else {
                    // if there's at least one image, load the image and open the top component
                    List<Object> items = new ArrayList<>();
                    final SleuthkitCase tskCase = currentCase.getSleuthkitCase();
                    items.add(new DataSources());
                    items.add(new Views(tskCase));
                    items.add(new Results(tskCase));
                    items.add(new Reports());
                    contentChildren = new RootContentChildren(items);
                    Node root = new AbstractNode(contentChildren) {
                        /**
                         * to override the right click action in the white blank
                         * space area on the directory tree window
                         */
                        @Override
                        public Action[] getActions(boolean popup) {
                            return new Action[]{};
                        }

                        // Overide the AbstractNode use of DefaultHandle to return
                        // a handle which can be serialized without a parent
                        @Override
                        public Node.Handle getHandle() {
                            return new Node.Handle() {
                                @Override
                                public Node getNode() throws IOException {
                                    return em.getRootContext();
                                }
                            };
                        }
                    };

                    root = new DirectoryTreeFilterNode(root, true);


                    em.setRootContext(root);
                    em.getRootContext().setName(currentCase.getName());
                    em.getRootContext().setDisplayName(currentCase.getName());
                    ((BeanTreeView) this.jScrollPane1).setRootVisible(false); // hide the root

                    // Reset the forward and back lists because we're resetting the root context
                    resetHistory();

View Full Code Here

       
        private void doImgTest() {
            imgReadStats = 0;
            setStatusMsg("Running Image Reading Test");
           
            Case curCase;
            try {
                curCase = Case.getCurrentCase();
            }
            catch (Exception e) {  
                setImgLabel("Case Not Open");
                setStatusMsg("");
                return;
            }
               
            List<Content> dataSources;
            try {
                dataSources = curCase.getDataSources();
            } catch (TskCoreException ex) {
                setImgLabel("No Images In Case");
                setStatusMsg("");
                return;
            }
View Full Code Here

                setFileReadLabel("Skipped");
            }
           
            setStatusMsg("Running File Reading Test");
           
            Case curCase;
            try {
                curCase = Case.getCurrentCase();
            }
            catch (Exception e) {  
                setFileReadLabel("Case Not Open");
                setStatusMsg("");
                return;
            }
               
            List<Content> dataSources;
            try {
                dataSources = curCase.getDataSources();
            } catch (TskCoreException ex) {
                setFileReadLabel("No Images In Case");
                setStatusMsg("");
                return;
            }
View Full Code Here

       
        private void doDbTest() {
            dbStats = 0;
            setStatusMsg("Running DB Test");
           
            Case curCase;
            try {
                curCase = Case.getCurrentCase();
            }
            catch (Exception e) {
                setDbLabel("Case Not Open");
                return;
            }
           
            try {
                SleuthkitCase tskCase = curCase.getSleuthkitCase();
                long start = new Date().getTime();

                List<AbstractFile> files = tskCase.findAllFilesWhere("obj_id < 50000");
               
                long end = new Date().getTime();
View Full Code Here

        ++rowIndex;

        sheet.createRow(rowIndex);
        ++rowIndex;
                               
        Case currentCase = Case.getCurrentCase();       
              
        row = sheet.createRow(rowIndex);
        row.setRowStyle(setStyle);
        row.createCell(0).setCellValue(NbBundle.getMessage(this.getClass(), "ReportExcel.cellVal.caseName"));
        row.createCell(1).setCellValue(currentCase.getName());
        ++rowIndex;

        row = sheet.createRow(rowIndex);
        row.setRowStyle(setStyle);
        row.createCell(0).setCellValue(NbBundle.getMessage(this.getClass(), "ReportExcel.cellVal.caseNum"));
        row.createCell(1).setCellValue(currentCase.getNumber());
        ++rowIndex;

        row = sheet.createRow(rowIndex);
        row.setRowStyle(setStyle);
        row.createCell(0).setCellValue(NbBundle.getMessage(this.getClass(), "ReportExcel.cellVal.examiner"));
        row.createCell(1).setCellValue(currentCase.getExaminer());
        ++rowIndex;

        row = sheet.createRow(rowIndex);
        row.setRowStyle(setStyle);
        row.createCell(0).setCellValue(NbBundle.getMessage(this.getClass(), "ReportExcel.cellVal.numImages"));
        int numImages;
        try {
            numImages = currentCase.getDataSources().size();
        } catch (TskCoreException ex) {
            numImages = 0;
        }
        row.createCell(1).setCellValue(numImages);
        ++rowIndex;
View Full Code Here

            statement = connection.createStatement();
        } catch (ClassNotFoundException | SQLException e) {
            logger.log(Level.SEVERE, "Error opening database", e);
        }

        Case currentCase = Case.getCurrentCase();
        SleuthkitCase skCase = currentCase.getSleuthkitCase();
        try {
            AbstractFile f = skCase.getAbstractFileById(fId);
            try {
                resultSet = statement.executeQuery(
                        "Select address,date,type,subject,body FROM sms;");
View Full Code Here

    @Override
    public void startUp(IngestJobContext context) throws IngestModuleException {
        this.context = context;
        jobId = context.getJobId();

        final Case currentCase = Case.getCurrentCase();

        moduleDirRelative = Case.getModulesOutputDirRelPath() + File.separator + ArchiveFileExtractorModuleFactory.getModuleName();
        moduleDirAbsolute = currentCase.getModulesOutputDirAbsPath() + File.separator + ArchiveFileExtractorModuleFactory.getModuleName();

       
        File unpackDirPathFile = new File(moduleDirAbsolute);
        if (!unpackDirPathFile.exists()) {
            try {
View Full Code Here

            statement = connection.createStatement();
        } catch (ClassNotFoundException | SQLException e) {
            logger.log(Level.SEVERE, "Error opening database", e);
        }

        Case currentCase = Case.getCurrentCase();
        SleuthkitCase skCase = currentCase.getSleuthkitCase();
        try {
            AbstractFile f = skCase.getAbstractFileById(fId);
            try {
                // get display_name, mimetype(email or phone number) and data1 (phonenumber or email address depending on mimetype)
                //sorted by name, so phonenumber/email would be consecutive for a person if they exist.
View Full Code Here

TOP

Related Classes of org.sleuthkit.autopsy.casemodule.Case

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.