Giter Club home page Giter Club logo

Comments (5)

hillu avatar hillu commented on June 11, 2024

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.

preranaprabhu02 avatar preranaprabhu02 commented on June 11, 2024

I was getting an error while installing the package which stated that YARA version was 3 required

from go-yara.

prajwalbharadwajbm avatar prajwalbharadwajbm commented on June 11, 2024

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
image
image

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.

hillu avatar hillu commented on June 11, 2024

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 image image

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.

hillu avatar hillu commented on June 11, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.