Git Product home page Git Product logo

go-safe-browsing-api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-safe-browsing-api's Issues

can full hashes be downloaded in bulk, in advance?

Hi Richard,

Thank you for this really useful go binding! It is really nice.

I'm trying out the v3 adaption that github.com/kgilonne/go-safe-browsing-api provides.

One problem: I get a ton of false positives from MightBeListed(), and IsListed() is too slow. Is it possible to pull down the full hashes every 1800 minutes (or the update frequency that google requests), and to otherwise remain offline while having accurate (full) hash matching?

Thanks!
Jason

processFullHashes fails to process hashes that contain newlines correctly

Using strings.Split on a data response where the hash contains a newline character causes the hashlen validation to fail. This results in a false negative for a hash that should match.

e.g. http://vibiraem-okna.ru/tmp/ji/ returns a false negative due to the hashlen being 31 instead of 32, because the hash has a 0xa character at position 32.

https://www.google.com/transparencyreport/safebrowsing/diagnostic/?#url=http://vibiraem-okna.ru/tmp/ji/

panic

Sometimes after several days of use the package panics on "Update". Most likely there seems to be a kind of race condition.

github.com/rjohnsondev/go-safe-browsing-api.(*SafeBrowsingList).load(0xc499fadc20, 0xc46adf8000, 0x29f9, 0x3000, 0x0, 0x0)
	/go/src/github.com/rjohnsondev/go-safe-browsing-api/safebrowsinglist.go:125 +0x180
github.com/rjohnsondev/go-safe-browsing-api.(*SafeBrowsingList).loadDataFromRedirectLists(0xc499fadc20, 0x0, 0x0)
	/go/src/github.com/rjohnsondev/go-safe-browsing-api/safebrowsinglist.go:118 +0x474
github.com/rjohnsondev/go-safe-browsing-api.(*SafeBrowsing).update(0xc420168000, 0x759d80, 0xc47fc8e1e0, 0xc47fc8e1d0)
	/go/src/github.com/rjohnsondev/go-safe-browsing-api/safebrowsing.go:198 +0x17d
github.com/rjohnsondev/go-safe-browsing-api.(*SafeBrowsing).reloadLoop(0xc420168000)
	/go/src/github.com/rjohnsondev/go-safe-browsing-api/safebrowsing.go:351 +0x248
created by github.com/rjohnsondev/go-safe-browsing-api.(*SafeBrowsing).UpdateProcess
	/go/src/github.com/rjohnsondev/go-safe-browsing-api/safebrowsing.go:136 +0x159

HTTP request timeout

Quite often the HTTP request when "Requesting updates" hangs. It might be worth setting a time out on the http.Client:

timeout := time.Duration(30 * time.Second)
client := &http.Client{Transport: Transport, Timeout: timeout}

Lack of license

I'd like to use this to check outbound links on some forums I run.

Could you add a licence to the project please so that I know that it is fine to do so.

Interested in removing the dependency on the C library?

I've actually done the work myself. It's not as memory efficient, yet, but I'm still working on it. I wrote a HTTP/WS server using this as a library and wanted to make compiling, trying, distributing painless so the lib had to go. Let me know if you're interested and we can work out something.

If not. Close and ignore :)

  1. https://github.com/apokalyptik/gsbd
  2. https://github.com/apokalyptik/go-safe-browsing-api
  3. https://github.com/apokalyptik/quicktrie

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.