Skip to content

Commit

Permalink
Implemented a directory listing LRU cache. (Velocidex#85)
Browse files Browse the repository at this point in the history
This really speeds up globs and is more memory efficient than the
previous map.
  • Loading branch information
scudette authored Sep 26, 2019
1 parent 221593e commit cced111
Show file tree
Hide file tree
Showing 14 changed files with 591 additions and 461 deletions.
35 changes: 18 additions & 17 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,3 @@
[[constraint]]
name="www.velocidex.com/golang/go-ntfs"
source="https://github.com/Velocidex/go-ntfs.git"

[[constraint]]
name = "github.com/AlecAivazis/survey"
source = "https://github.com/AlecAivazis/survey.git"
revision = "4de88574e78145bdcfa6627ed766564231588b31"
10 changes: 5 additions & 5 deletions artifacts/assets/ab0x.go

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions artifacts/definitions/Windows/Collectors/File.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ sources:
# Generate the collection globs for each device
- LET specs = SELECT "\\\\.\\" + RootDevice + "\\" + Glob AS Glob
FROM parse_csv(filename=collectionSpec, accessor="data")
WHERE log(message="Processing Device " +RootDevice)
WHERE log(message="Processing Device " + RootDevice + " With " + Accessor)

# Join all the collection rules into a single Glob plugin. This ensure we
# only make one pass over the filesystem. We only want LFNs.
Expand All @@ -42,13 +42,14 @@ sources:
- LET all_results <= SELECT Created, LastAccessed,
Modified, Size, SourceFile
FROM hits

- SELECT * FROM all_results

- name: Uploads
queries:
# Upload the files
- LET uploaded_tiles = SELECT Created, LastAccessed, Modified, SourceFile, Size,
upload(file=SourceFile, accessor=Accessor) AS Upload
upload(file=SourceFile, accessor=Accessor, name=SourceFile) AS Upload
FROM all_results

# Seperate the hashes into their own column.
Expand Down
4 changes: 2 additions & 2 deletions artifacts/definitions/Windows/Collectors/VSS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ sources:
# Generate the collection globs for each device
- LET specs = SELECT Device + Glob AS Glob FROM parse_csv(
filename=collectionSpec, accessor="data")
WHERE log(message="Processing Device " + Device)
WHERE log(message="Processing Device " + Device + " With " + Accessor)

# Join all the collection rules into a single Glob plugin. This ensure we
# only make one pass over the filesystem. We only want LFNs.
Expand Down Expand Up @@ -90,7 +90,7 @@ sources:

# Upload the files using the MFT accessor.
- LET uploaded_tiles = SELECT Created, LastAccessed, Modified, MFT, SourceFile, Size,
upload(file=Device+MFT, name=SourceFile, accessor="mft") AS Upload
upload(file=Device+MFT, name=Device + SourceFile, accessor="mft") AS Upload
FROM unique_mtimes

# Seperate the hashes into their own column.
Expand Down
Loading

0 comments on commit cced111

Please sign in to comment.