BoxLang 🚀 A New JVM Dynamic Language Learn More...

SafeBrowsing

v1.0.2 Modules

ColdBox SafeBrowsing Module

A module for testing URLs against the Google SafeBrowsing Lookup v4 API.

LICENSE

Apache License, Version 2.0.

SYSTEM REQUIREMENTS

  • Lucee 5+
  • ColdBox 5.3+

Instructions

Just drop into your modules folder or use the box-cli to install

box install safebrowsing

USAGE

Add your Google API_KEY to the module settings in Coldbox.cfc:

moduleSettings = {
	"safebrowsing":{
		apiKey:"YOUR_API_KEY"
	}
}

The module creates a mapping for ThreatMatches@safebrowsing which has the following methods:

  • checkURLs(required array urls) returns a struct of data from the API describing any issues in the URLs submitted
  • isThreat(required string url) returns true if the URL is problematic for any reason, false if it's "safe"

$ box install safebrowsing

No collaborators yet.
   
  • {{ getFullDate("2020-02-27T14:17:53Z") }}
  • {{ getFullDate("2020-03-03T13:28:30Z") }}
  • 2,203
  • 7,583