OWASP Coraza Web Application Firewall, OWASP Coraza is a golang enterprise-grade Web Application Firewall framework that supports Modsecurity’s seclang language and is 100% compatible with OWASP Core Ruleset.
waf.SetErrorLogCb(cb)
(optional)Run the go tests:
go test ./…
go test -race ./…
Using pre-commit
pip install pre-commit
pre-commit run –all-files
ou can also install the pre-commit git hook by running
pre-commit install
package main
import(
“fmt”
“github.com/corazawaf/coraza/v2”
“github.com/corazawaf/coraza/v2/seclang”
)
func main() {
// First we initialize our waf and our seclang parser
waf := coraza.NewWaf()
parser, _ := seclang.NewParser(waf)
// Now we parse our rules
if err := parser.FromString(SecRule REMOTE_ADDR "@rx .*" "id:1,phase:1,deny,status:403"
); err != nil {
fmt.Println(err)
}
// Then we create a transaction and assign some variables
tx := waf.NewTransaction()
defer func(){
tx.ProcessLogging()
tx.Clean()
}()
tx.ProcessConnection(“127.0.0.1”, 8080, “127.0.0.1”, 12345)
// Finally we process the request headers phase, which may return an interruption
if it := tx.ProcessRequestHeaders(); it != nil {
fmt.Printf(“Transaction was interrupted with status %d\n”, it.Status)
}
}
Tookie-osint has a simple-to-use UI and is really straightforward. The main idea of Tookie-osint is…
Be aware, the installation needs technical skills and is not for beginners. Please do not…
The course is primarily intended for those who are professionally involved in or simply interested…
Embark on a 21-day journey to harness the power of Python for Open Source Intelligence…
I've seen multiple projects out there in GitHub, that are crawlers for the deep web,…
OSINTk.o is a customized Kali Linux-based ISO image with pre-installed packages and scripts. The idea…