Comments (7)
I'm seeing similar behavior on Ubuntu 18.04. I saw this error when testing the build:
root@osquery:~/clamav-yara# go test -v
_/home/cmerchant/clamav-yara
./definitions_test.go:41: Errorf format %s has arg def.Level of wrong type int
./definitions_test.go:45: Errorf format %s has arg def.TotalSignatures of wrong type int64
./definitions_test.go:49: Errorf format %s has arg def.Version of wrong type int
FAIL _/home/cmerchant/clamav-yara [build failed]
from clamav-yara.
I am seeing the same errors on CentOS 7.6.
[root@localhost clamav-yara]# go test -v
# _/root/clamav-yara
./definitions_test.go:41:3: Errorf format %s has arg def.Level of wrong type int
./definitions_test.go:45:3: Errorf format %s has arg def.TotalSignatures of wrong type int64
./definitions_test.go:49:3: Errorf format %s has arg def.Version of wrong type int
FAIL _/root/clamav-yara [build failed]
[root@localhost clamav-yara]# ./clamav-yara
2020/03/09 01:32:16 Downloading main definitions from https://sec51.com/definitions/main.cvd ...
2020/03/09 01:32:17 Download completed, proceeding with parsing.
panic: runtime error: slice bounds out of range [512:162]
goroutine 1 [running]:
main.extractFiles(0xc000184600, 0xa2, 0x200, 0x0, 0x0, 0x200, 0x0)
/root/clamav-yara/definitions.go:296 +0xb0e
main.(*DefinitionsManager).DownloadDefinitions(0xc000062600, 0x0, 0x0, 0x0)
/root/clamav-yara/definitions.go:237 +0x42d
main.downloadDefinitions(0xc000062600)
/root/clamav-yara/main.go:30 +0x34
main.main()
/root/clamav-yara/main.go:19 +0x84
from clamav-yara.
Is this caused by newer go version? I can't find old go version like 1.5.
[root@localhost clamav-yara]# go version
go version go1.14 linux/amd64
from clamav-yara.
Appears to run into problem here...
definitions.go
// Extract the file tar.gz
func extractFiles(data []byte, fileType definitionType) (map[definitionExtensionType]definitionFile, error) {
files := make(map[definitionExtensionType]definitionFile)
// extract the data only and cut the header off
tarGzip := data[512:]
from clamav-yara.
+1
from clamav-yara.
The solve:
wget http://database.clamav.net/main.cvd
wget https://raw.githubusercontent.com/mattulm/volgui/master/tools/clamav_to_yara.py
sigtool -u main.cvd
./clamav_to_yara.py -f main.ndb -o clamav.yara
from clamav-yara.
The issue is that the default URL used to download the ClavAV database was set to a HTTPS URL that is now down.
See #6 that's reversing to the ClamAV default HTTP URL.
from clamav-yara.
Related Issues (5)
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 clamav-yara.