Skip to content

Commit 5e96ad0

Browse files
committed
v0.3.1 (#291)
1 parent 96811bb commit 5e96ad0

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

pkg/csprecon/net.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ func DomainOk(input string, domains []string) bool {
3030
}
3131

3232
for _, domain := range domains {
33-
if len(input) >= len(domain) && input[len(input)-len(domain):] == domain {
33+
if input == domain {
34+
return true
35+
}
36+
37+
if len(input)-len(domain) >= 2 && input[len(input)-len(domain)-1:] == "."+domain {
3438
return true
3539
}
3640
}

pkg/csprecon/net_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,18 @@ func TestDomainOk(t *testing.T) {
117117
domains: []string{"ciao.com", "goooooooogle.com"},
118118
want: false,
119119
},
120+
{
121+
name: "subdomain not ok 2",
122+
input: "dc.*.agoogle.com",
123+
domains: []string{"ciao.com", "google.com"},
124+
want: false,
125+
},
126+
{
127+
name: "subdomain not ok 3",
128+
input: "agoogle.com",
129+
domains: []string{"ciao.com", "aaagoogle.com"},
130+
want: false,
131+
},
120132
}
121133
for _, tt := range tests {
122134
t.Run(tt.name, func(t *testing.T) {

pkg/output/banner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import "github.com/projectdiscovery/gologger"
1212
var printed = false
1313

1414
const (
15-
Version = "v0.3.0"
15+
Version = "v0.3.1"
1616
banner = ` ______________ ________ _________ ____
1717
/ ___/ ___/ __ \/ ___/ _ \/ ___/ __ \/ __ \
1818
/ /__(__ ) /_/ / / / __/ /__/ /_/ / / / /

snapcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ summary: Discover new target domains using Content Security Policy
33
description: |
44
Take as input target URLs and probe them to retrieve their CSP (either from Head or Header)
55
and get new target domains.
6-
version: 0.3.0
6+
version: 0.3.1
77
grade: stable
88
base: core20
99

0 commit comments

Comments
 (0)