Ejemplo n.º 1
0
def main():

    if len(sys.argv) != 5:
        usage()
    
    casedesc        = sys.argv[1]
    outputdirectory = sys.argv[2]
    acquire_current = int(sys.argv[3])
    acquire_backups = int(sys.argv[4])
    
    aq = acquire_files.acquire_files(outputdirectory, acquire_current, acquire_backups, casedesc)
    
    aq.acquire_files()
Ejemplo n.º 2
0
def main():

    if len(sys.argv) != 5:
        usage()

    casedesc = sys.argv[1]
    outputdirectory = sys.argv[2]
    acquire_current = int(sys.argv[3])
    acquire_backups = int(sys.argv[4])

    aq = acquire_files.acquire_files(outputdirectory, acquire_current,
                                     acquire_backups, casedesc)

    aq.acquire_files()
Ejemplo n.º 3
0
    def acquireFiles(self):

        compDesc  = unicode(self.compDescLineEdit.text())

        if compDesc == "":
            self.msgBox("No computer descrption was entered")
            return

        directory = unicode(self.outputDirectoryLineEdit.text())
       
        if not self.check_directory(directory):
            return
              
        acquire_current = self.currentFilesCheckBox.isChecked()

        acquire_backups = self.backupFilesCheckBox.isChecked()

        if not acquire_current and not acquire_backups:
            self.msgBox("Both acquire current and acquire backups were unchecked. Cannot proceed")
            return

        self.stackedWidget.setCurrentIndex(1)
            
        aq = acquire_files.acquire_files(directory, acquire_current, acquire_backups, compDesc, self)
        ret = aq.acquire_files()
        if ret == False:
            self.stackedWidget.setCurrentIndex(0)
            return ret

        # write out log file
        fd = open(os.path.join(directory, "logfile.txt"), "w")

        files = aq.added_files
        runtime = time.strftime('%Y/%m/%d %H:%M:%S')
        cur  = ["No", "Yes"][acquire_current]
        back = ["No", "Yes"][acquire_backups]
        
        logdata = "Computer Descrption:     %s\nCurrent Files Acquired: %s\nBackup Files Acquired:  %s\nAcquisition Time:       %s\nAcquired Files:      %d\n" % \
                    (compDesc, cur, back, runtime , files)
                  
        fd.write(logdata)

        fd.close() 
        
        return True