Skip to content

Commit 4ce10b8

Browse files
committed
1.4.2 compilation
1 parent 588095c commit 4ce10b8

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
```
2-
___ __ ___ ___ __ ___ __
3-
|__ /\ /__` | |__ | |\ | | \ |__ |__)
4-
| /~~\ .__/ | | | | \| |__/ |___ | \
5-
6-
2021-2022 | Jean-Pierre GARNIER | @codeyourweb
7-
https://github.com/codeyourweb/fastfinder
8-
```
9-
101
# _FastFinder_ - Incident Response - Fast suspicious file finder
112
[![Golang](https://img.shields.io/badge/Go-1.17-blue.svg)](https://golang.org) ![Linux](https://img.shields.io/badge/Supports-Linux-green.svg) ![windows](https://img.shields.io/badge/Supports-windows-green.svg)
123
![build windows workflow](https://github.com/codeyourweb/fastfinder/actions/workflows/go_build_windows.yml/badge.svg) ![build windows workflow](https://github.com/codeyourweb/fastfinder/actions/workflows/go_build_linux.yml/badge.svg)
@@ -26,6 +17,13 @@ _go-yara_ and CGO compilation. Anyway, you'll find a detailed documentation [for
2617

2718
### Usage
2819
```
20+
___ __ ___ ___ __ ___ __
21+
|__ /\ /__` | |__ | |\ | | \ |__ |__)
22+
| /~~\ .__/ | | | | \| |__/ |___ | \
23+
24+
2021-2022 | Jean-Pierre GARNIER | @codeyourweb
25+
https://github.com/codeyourweb/fastfinder
26+
2927
usage: fastfinder [-h|--help] [-c|--configuration "configuration.yaml"] [-b|--build
3028
"path_to_package_bin"] [-o|--output "log_file.log"] [-n|--nowindow]
3129
[-p|--showprogress] [-v|--version]

main.go

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// #cgo !yara_no_pkg_config,!yara_static pkg-config: yara
22
// #cgo !yara_no_pkg_config,yara_static pkg-config: --static yara
33
// #cgo yara_no_pkg_config LDFLAGS: -lyara
4-
// compile: go build -tags yara_static -a -ldflags '-s -w -extldflags "-static"' .
4+
// compile: go build -trimpath -tags yara_static -a -ldflags '-s -w -extldflags "-static"' .
5+
// suggestion: reduce binary size with upx --best --lzma .\fastfinder.exe
6+
57
package main
68

79
import (
@@ -19,7 +21,7 @@ import (
1921
)
2022

2123
func main() {
22-
const FASTFINDER_VERSION = "1.4.2b"
24+
const FASTFINDER_VERSION = "1.4.2"
2325
const YARA_VERSION = "4.1.3"
2426
var compiler *yara.Compiler
2527
var rules *yara.Rules
@@ -49,19 +51,21 @@ func main() {
4951
}
5052
}
5153

52-
// create mutex
5354
if len(*pSfxPath) == 0 {
55+
// create mutex
5456
if _, err = CreateMutex("fastfinder"); err != nil {
5557
LogMessage(LOG_ERROR, "[ERROR]", "Only one instance or fastfinder can be launched:", err.Error())
5658
os.Exit(1)
5759
}
58-
}
5960

60-
// Retrieve current user permissions
61-
admin, elevated := CheckCurrentUserPermissions()
62-
if !admin && !elevated {
63-
LogMessage(LOG_INFO, "[WARNING] fastfinder is not running with fully elevated righs. Notice that the analysis will be partial and limited to the current user scope")
64-
time.Sleep(3 * time.Second)
61+
// Retrieve current user permissions
62+
admin, elevated := CheckCurrentUserPermissions()
63+
if !admin && !elevated {
64+
LogMessage(LOG_INFO, "[WARNING] fastfinder is not running with fully elevated righs. Notice that the analysis will be partial and limited to the current user scope")
65+
if !*pHideWindow {
66+
time.Sleep(3 * time.Second)
67+
}
68+
}
6569
}
6670

6771
// progressbar

0 commit comments

Comments
 (0)