example

command
v0.2.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

How to run example

run zaproxy daemon
docker run --name zap -u zap -p 8080:8080 -i owasp/zap2docker-stable zap.sh -daemon -host 0.0.0.0 -port 8080 -config api.disablekey=true -config api.addrs.addr.name=.\* -config api.addrs.addr.regex=true
run bodgeit
docker run --name bodgeit --rm -it psiinon/bodgeit
get the ip address of bodgeit
docker inspect bodgeit | grep IPAddress
run example
go run example.go -target=http://{$bodgeit_IP}:8080/bodgeit
How to connect to ZAP server using HTTPS
  1. Client connect to ZAP server using HTTP by default. To instruct client to connect ZAP server using HTTPS, you should:
  • change the ZAP base path using HTTPS
  • pass in your TLS config
  1. example:
	cfg := &zap.Config{
		Base:      zap.DefaultHTTPSBase,
		BaseOther: zap.DefaultHTTPSBaseOther,
		// you can set your custom certificates here
		TLSConfig: tls.Config{
			InsecureSkipVerify: true,
		},
	}
	client, err := zap.NewClient(cfg)
	if err != nil {
	    log.Fatal(err)
	}
	/*
	use the client...
	*/

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL