-
Notifications
You must be signed in to change notification settings - Fork 0
/
modules.go
87 lines (81 loc) · 2.36 KB
/
modules.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
75
76
77
78
79
80
81
82
83
84
85
86
87
package main
import (
"fmt"
"sort"
"github.com/nbr23/rss-banquet/parser"
"github.com/nbr23/rss-banquet/parser/bugcrowd"
"github.com/nbr23/rss-banquet/parser/dockerhub"
garminwearables "github.com/nbr23/rss-banquet/parser/garmin-wearables"
"github.com/nbr23/rss-banquet/parser/garminsdk"
"github.com/nbr23/rss-banquet/parser/goodreads"
"github.com/nbr23/rss-banquet/parser/googlebooks"
"github.com/nbr23/rss-banquet/parser/googlebooksapi"
"github.com/nbr23/rss-banquet/parser/hackerone"
"github.com/nbr23/rss-banquet/parser/hackeronePrograms"
"github.com/nbr23/rss-banquet/parser/infocon"
"github.com/nbr23/rss-banquet/parser/lego"
"github.com/nbr23/rss-banquet/parser/pentesterland"
"github.com/nbr23/rss-banquet/parser/pocorgtfo"
"github.com/nbr23/rss-banquet/parser/psupdates"
)
var Modules = map[string]func() parser.Parser{
"psupdates": func() parser.Parser {
return psupdates.PSUpdatesParser()
},
"bugcrowd": func() parser.Parser {
return bugcrowd.BugcrowdParser()
},
"hackerone": func() parser.Parser {
return hackerone.HackeroneParser()
},
"hackeronePrograms": func() parser.Parser {
return hackeronePrograms.HackeroneProgramsParser()
},
"lego": func() parser.Parser {
return lego.LegoParser()
},
"infocon": func() parser.Parser {
return infocon.InfoConParser()
},
"pentesterland": func() parser.Parser {
return pentesterland.PentesterLandParser()
},
"garmin-sdk": func() parser.Parser {
return garminsdk.GarminSDKParser()
},
"garmin-wearables": func() parser.Parser {
return garminwearables.GarminWearablesParser()
},
"dockerhub": func() parser.Parser {
return dockerhub.DockerHubParser()
},
"googlebooksapi": func() parser.Parser {
return googlebooksapi.GooglebooksapiParser()
},
"books": func() parser.Parser {
return googlebooks.GooglebooksParser()
},
"pocorgtfo": func() parser.Parser {
return pocorgtfo.PoCOrGTFOParser()
},
"goodreads": func() parser.Parser {
return goodreads.GoodReadsParser()
},
}
func getModule(name string) parser.Parser {
m, ok := Modules[name]
if ok {
return m()
}
return nil
}
func printModulesHelp() {
sortedModules := make([]string, 0, len(Modules))
for key := range Modules {
sortedModules = append(sortedModules, key)
}
sort.Strings(sortedModules)
for _, module := range sortedModules {
fmt.Printf(" - %s\n%s\n", module, parser.GetFullOptions(Modules[module]()).GetHelp())
}
}