MCPcopy Create free account
hub / github.com/chainreactors/spray / BuildPlugin

Method BuildPlugin

core/option.go:875–956  ·  view source on GitHub ↗
(r *Runner)

Source from the content-addressed store, hash-verified

873}
874
875func (opt *Option) BuildPlugin(r *Runner) error {
876 // brute only
877 if opt.Advance {
878 opt.CrawlPlugin = true
879 opt.Finger = true
880 opt.BakPlugin = true
881 opt.FuzzuliPlugin = true
882 opt.CommonPlugin = true
883 opt.ActivePlugin = true
884 opt.ReconPlugin = true
885 opt.PocPlugin = true
886 opt.KeysPlugin = true
887 }
888
889 if opt.KeysPlugin {
890 if err := pkg.LoadFoundKeys(); err != nil {
891 return err
892 }
893 }
894
895 var extractTags []string
896 if opt.ReconPlugin {
897 extractTags = append(extractTags, "pentest", "info")
898 }
899 if opt.KeysPlugin {
900 extractTags = append(extractTags, "keys")
901 }
902 if len(extractTags) > 0 {
903 pkg.EnableExtractors(extractTags)
904 }
905
906 if opt.Finger && !pkg.EnableAllFingerEngine {
907 pkg.EnableAllFingerEngine = true
908 }
909
910 if opt.BakPlugin {
911 r.bruteMod = true
912 opt.AppendRule = append(opt.AppendRule, "filebak")
913 r.AppendWords = append(r.AppendWords, pkg.GetPresetWordList([]string{"bak_file"})...)
914 }
915
916 if opt.CommonPlugin {
917 r.bruteMod = true
918 r.AppendWords = append(r.AppendWords, pkg.Dicts["common"]...)
919 r.AppendWords = append(r.AppendWords, pkg.Dicts["log"]...)
920 }
921
922 if opt.ActivePlugin {
923 r.bruteMod = true
924 r.AppendWords = append(r.AppendWords, pkg.ActivePath...)
925 }
926
927 if opt.CrawlPlugin {
928 r.bruteMod = true
929 }
930
931 if opt.PocPlugin {
932 pkg.NeutronEnabled = true

Callers 1

NewRunnerMethod · 0.95

Calls 5

LoadFoundKeysFunction · 0.92
EnableExtractorsFunction · 0.92
GetPresetWordListFunction · 0.92
LoadNeutronFunction · 0.92

Tested by

no test coverage detected