-
Notifications
You must be signed in to change notification settings - Fork 10
/
conf.go
74 lines (68 loc) · 2.01 KB
/
conf.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package main
import (
"fmt"
"sync"
"time"
)
type (
JSONTime time.Time
ExpDetails41157 struct {
Extension string `json:"extension"`
NotifsRecvd []struct {
Timestamp JSONTime `json:"timestamp"`
Message string `json:"notification"`
} `json:"notifications_received"`
}
ExpDetails37624 struct {
Extension string `json:"extension"`
SentMessages []struct {
Message string `json:"message"`
Timestamp JSONTime `json:"timestamp"`
} `json:"sent_messages"`
SentSuccessfully bool `json:"sent_successfully"`
}
fResult struct {
Host string `json:"host"`
Details struct {
CVE202137624 struct {
IsVulnerable bool `json:"is_vulnerable"`
ExploitDetails []ExpDetails37624 `json:"exploit_details"`
} `json:"cve_2021_37624,omitempty"`
CVE202141157 struct {
IsVulnerable bool `json:"is_vulnerable"`
ExploitDetails []ExpDetails41157 `json:"exploit_details"`
} `json:"cve_2021_41157,omitempty"`
} `json:"vulnerability_details"`
}
)
var (
delay, maxConcurrent, maxExpires int
userAgent, cveToScan, extensions string
extFile, outdir, sendmsgs string
monEvents, outFormat string
allexts, allEvents []string
finalResults []fResult
msgstosend [][]string
version = "0.1"
allvulns = []string{"cve-2021-37624", "cve-2021-41157"}
vulnToModule = map[string]interface{}{
"cve-2021-37624": cve2021x37624,
"cve-2021-41157": cve2021x41157,
}
globalTex = &sync.Mutex{}
lackofart = fmt.Sprintf(`
___ . ____ _ __ __
/ _ \___|\ __/ __/| __(_) /_____/ /
/ ___/ -_) |/|/ /\ \| |/|/ / / __/ __/ _ \
/_/ \__/|__,__/___/|__,__/_/\__/\__/_//_/ v%s
"where we pew pew pew freeswitch"`, version)
defaultMsgText = []string{
"FBI",
"022-324-3000",
"FBI here. Open your door!",
}
)
func (t JSONTime) MarshalJSON() ([]byte, error) {
stamp := fmt.Sprintf("\"%s\"", time.Time(t).Format(time.RFC3339))
return []byte(stamp), nil
}