Skip to content

Commit

Permalink
update config and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
elesiuta committed Nov 13, 2021
1 parent 36a24a3 commit 10db757
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
```python
{
"Config": {
"DB write min (sec)": 1, # Minimum time between writing logs to snitch.db
"Keep logs (days)": 365, # How many days to keep connection logs
"Log command lines": True, # Log command line args for each executable
"Log remote address": True, # Log remote addresses for each executable
Expand Down
4 changes: 2 additions & 2 deletions picosnitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def read_snitch() -> dict:
"""read snitch from correct location (even if sudo is used without preserve-env), or init a new one if not found"""
template = {
"Config": {
"Min DB write period (sec)": 10,
"DB write min (sec)": 1,
"Keep logs (days)": 365,
"Log command lines": True,
"Log remote address": True,
Expand Down Expand Up @@ -561,7 +561,7 @@ def sql_subprocess(init_pickle, p_virustotal: ProcessManager, sql_pipe, q_update
q_error.put("sync error between sql and updater on receive (did not receive all messages)")
# process new connections
get_vt_results(snitch, p_virustotal.q_out, q_updater_in, False)
if time.time() - last_write > snitch["Config"]["Min DB write period (sec)"]:
if time.time() - last_write > snitch["Config"]["DB write min (sec)"]:
transactions += update_snitch_sha_and_sql(snitch, new_processes, p_virustotal.q_in, q_updater_in)
new_processes = []
con = sqlite3.connect(file_path)
Expand Down

0 comments on commit 10db757

Please sign in to comment.