Browse Source

patched for less output for debugging

cjs3
Stephen Lorenz 3 years ago
parent
commit
a4bf179c1b
  1. 1
      .gitignore
  2. 5
      bin/lrmix.R
  3. 19
      cjs/cjs/core/batch.py
  4. 2
      run_cjs

1
.gitignore

@ -1,4 +1,5 @@
# cjs
cjs-data/
# cjsd
cjsd/cjsd/.app

5
bin/lrmix.R

@ -1,10 +1,11 @@
#!/usr/bin/env Rscript
require(euroformix); sessionInfo()
suppressMessages(require(euroformix));
#sessionInfo()
#setwd("C:\\Users\\oyvbl\\Dropbox\\Forensic\\LRmixStudio")
#rm(list=ls())
#source("lrmix_multisampleUsage.R")
library(forensim);library(euroformix)
suppressMessages(library(forensim));suppressMessages(library(euroformix))
################
#help functions#

19
cjs/cjs/core/batch.py

@ -1,6 +1,7 @@
#!/usr/bin/env python3
# standard library
import os
import sys
import signal
import threading
@ -43,6 +44,9 @@ class FileSystemScanner(PatternMatchingEventHandler):
def on_created(self, event):
self.pending_files.put(event.src_path)
def on_modified(self, event):
self.pending_files.put(event.src_path)
def send_error(subject, message):
send_email('resources/mailer.json',
'cucjsoftware@gmail.com',
@ -72,12 +76,14 @@ class AutomateState:
def run_process(command_list, timeout=None):
# modified from https://docs.python.org/3/library/subprocess.html#subprocess.run
output = subprocess.run(
command_list,
check=True,
timeout=timeout,
encoding='utf-8'
)
with open(os.devnull, 'w') as devnull:
output = subprocess.run(
command_list,
check=True,
timeout=timeout,
encoding='utf-8',
stdout=devnull
)
return output
def poll_queue(queue_obj, item_func):
@ -142,7 +148,6 @@ def spawn_foreman(state, interface, database, scan_dir):
if job == None:
print('Foreman: Received dismissal signal')
else:
print(hault)
print('Foreman: Received %s and %s' % (job['evidence']['name'], job['comparison']['name']))
state.input_queue.put(job)

2
run_cjs

@ -1,6 +1,6 @@
#!/usr/bin/env bash
sleep $(($RANDOM % 100))
sleep $(($RANDOM % 60))
source .env/bin/activate
cjs --address 128.153.145.175 --port 80 automate --num_workers 4 efm pilot
Loading…
Cancel
Save