Skip to content

VirusTotal Scanning #648

@Aetherinox

Description

@Aetherinox

I've read over the docs, and I don't know why, but I can do every other action with this app. But for some reason, testing VirualTotal never works.

curl -X PUT --upload-file nhgbhhj https://x.domain.lan/test.txt/virustotal
invalid character '<' looking for beginning of value

And then transfer.sh logs returns a curl 500 error.


Just to eliminate something dumb, I even used the example straight out of the docs, and created a file named nhgbhhj; with text inside to ensure it wasn't trying to push an empty file.

If I add a / to the end of the URL, or change the capitalization, no error, but nothing posts or outputs

curl -X PUT --upload-file nhgbhhj https://x.domain.lan/test.txt/virustotal/

Any help would be awesome with this.

I found the log file, which outputs the following:

[transfer.sh] starting to listen on: :8080
[transfer.sh] ---------------------------
[transfer.sh] Submitting to VirusTotal: test.txt 5 
[transfer.sh] scanid: , resource: , permalink: , md5: 
[transfer.sh] "PUT /test.txt/virustotal HTTP/1.1" 500  "" "curl/7.81.0"
[transfer.sh] Submitting to VirusTotal: test.txt 5 
[transfer.sh] scanid: , resource: , permalink: , md5: 
[transfer.sh] "PUT /test.txt/virustotal HTTP/1.1" 500  "" "curl/7.81.0"
[transfer.sh] Error metadata: open /tmp/test.txt/virustotal.metadata: no such file or directory
[transfer.sh] "GET /test.txt/virustotal HTTP/1.1" 404  "" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100211 Firefox/141.0"

But no matter what I do, I get the < error. And after looking online, it appears to be a GoLang JSON error.




After looking through the code, it appears to be coming from the Go package https://github.com/dutchcoders/go-virustotal via the line

	vt, err := virustotal.NewVirusTotal(s.VirusTotalKey)
	if err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
	}

The err is returning

%!s(<nil>)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions