goggins
goggins

Reputation: 43

go-rod triggering anti-virus

I'm using a sample script taken directly from go-rods website https://go-rod.github.io/#/

But for some reason, it's triggering my anti-virus. I've never had this problem with any golang packages

Here is the code that I am using


import (
    "time"

    "github.com/go-rod/rod"
)

func main() {
    browser := rod.New().MustConnect().NoDefaultDevice()
    page := browser.MustPage("https://www.wikipedia.org/").MustWindowFullscreen()

    page.MustElement("#searchInput").MustInput("earth")
    page.MustElement("#search-form > fieldset > button").MustClick()

    page.MustWaitLoad().MustScreenshot("a.png")
    time.Sleep(time.Hour)
}

I would think this would be a false positive, but why would any malware code be linked to something like go-rod?

I would think this would be a false positive, but why would any malware code be linked to something like go-rod?

(I am using Windows Defender)

Upvotes: 2

Views: 1392

Answers (2)

Goutam_4
Goutam_4

Reputation: 797

If you are a windows user then adding exclusion for the Leakless executable solve the problem

Follow these steps:

Windows Security -> virus & threat protection -> click Manage settings -> click Add or remove exclusions -> choose Folder -> Navigate to the leakless.exe file located at C:\Users[user_name]\AppData\Local\Temp\leakless-amd64-[your-temp-folder] and add it as an exclusion.

then try to restart or rebuild and run the app

Upvotes: 0

sne4ker
sne4ker

Reputation: 11

go-rod uses a binary of leakless, which is used to cleanly close subprocesses (such as the browser in the case of rod). It is being detected by your antivirus, because leakless is also used by popular malware.

Solution 1: Disable leakless by creating your own *Launcher and set its leakless property to false.

Solution 2: Tell your antivirus to ignore the leakless binary.

Upvotes: 1

Related Questions