Comments (5)
Why are you not using YARA 4.x? Please refer to https://pkg.go.dev/github.com/hillu/go-yara/v4#section-readme for the current version.
from go-yara.
I was getting an error while installing the package which stated that YARA version was 3 required
from go-yara.
Yes its true @preranaprabhu02
Even i wasn't able to import or use github.com/hillu/go-yara/v4
I went the other way round by cloning your git repo, and running your example, which also does'nt recognise yara package
My go version and env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\prajwal.bharadwaj\AppData\Local\go-build
set GOENV=C:\Users\prajwal.bharadwaj\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\prajwal.bharadwaj\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\prajwal.bharadwaj\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.20.2
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=C:\Users\prajwal.bharadwaj\Desktop\go-yara-master\go-yara-master\go.mod
set GOWORK=
set CGO_CFLAGS=-IC:/msys64/mingw64/include
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\PRAJWA~1.BHA\AppData\Local\Temp\go-build2429229660=/tmp/go-build -gno-record-gcc-switches
*i have installed libyara and its working fine too.
from go-yara.
Yes its true @preranaprabhu02 Even i wasn't able to import or use github.com/hillu/go-yara/v4 I went the other way round by cloning your git repo, and running your example, which also does'nt recognise yara package
This is a different problem than what @preranaprabhu02 reported. We really should move it to a new issue. Do you have gcc installed on your Windows system?
from go-yara.
@preranaprabhu02 I have fixed the issue on the v1.x branch and tagged v1.3.1. So, provided that you update your go.mod file to point to the 1.3.1 release (using go get github.com/hillu/[email protected]
), this problem should be gone.
If you still get compiler errors such as
libyara/.libs/libyara.a(pe.o):pe.c:(.bss+0x0): multiple definition of `yr_cryptprov'; libyara/.libs/libyara.a(libyara.o):libyara.c:(.bss+0x208): first defined here
you should patch the yr_cryptprov
definition in your YARA 3.11 sources, see: VirusTotal/yara#1416.
This being said, I still recommend against using YARA 3 (and go-yara 1.x) for any new projects because in the meantime quite a few security problems that might lead to code execution through maliciously crafted files have been fixed in YARA. Just use YARA 4.x (4.3.2 at the moment) and github.com/hillu/go-yara/v4.
from go-yara.
Related Issues (20)
- There's no way to return an error from MemoryBlockIterator HOT 5
- yr_scanner_scan_file Using mmap is a dangerous operation HOT 9
- Is the new tag version expected ? HOT 1
- Issues while installing HOT 7
- Unable to use ScanProc HOT 23
- Unable to define variable on AIX HOT 4
- Scan a file in a streaming maner HOT 2
- Encrypted rules? HOT 4
- unstable rules HOT 5
- Wrong release version? HOT 1
- Building static binary HOT 3
- cannot find -lyara HOT 1
- linux编译yara出现错误 HOT 2
- generate a dynamic-link library (.so file) HOT 1
- v3.x no release tag HOT 1
- Failing to compile with go-yara HOT 9
- yararule.ScanFile, can not scan filepath which contains chinese, may be other language has the same HOT 2
- Attempt to add a new YARA rule files during runtime causes panic HOT 1
- Question: Adding multiple Compiled YARA files to a single yara.Scanner or *yara.Rules HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-yara.