@@ -2,6 +2,8 @@ package core
2
2
3
3
import (
4
4
"flag"
5
+ "fmt"
6
+ "github.com/SummerSec/SpringExploit/cmd/commons/attack"
5
7
"github.com/SummerSec/SpringExploit/cmd/logs"
6
8
log "github.com/sirupsen/logrus"
7
9
)
@@ -37,6 +39,8 @@ type Options struct {
37
39
Pocs string
38
40
// ip 段
39
41
IP string
42
+ // show pocs list
43
+ SP bool
40
44
}
41
45
42
46
func (o Options ) toString () interface {} {
@@ -53,6 +57,7 @@ func ParseOptions() *Options {
53
57
flag .StringVar (& options .Proxy , "proxy" , "" , "proxy example: -proxy=http(socks5)://127.0.0.1:8080 " )
54
58
flag .BoolVar (& options .Version , "version" , false , "show version" )
55
59
flag .BoolVar (& options .Verbose , "verbose" , false , "show verbose" )
60
+ flag .BoolVar (& options .SP , "sp" , false , "show pocs list" )
56
61
flag .StringVar (& options .LogFile , "log" , "" , "log file example: -log=/logs/logs.txt" )
57
62
flag .IntVar (& options .Retry , "retry" , 3 , "repeat request times" )
58
63
//flag.StringVar(&options.IP, "i", "", "ip segment example: -ip=192.168.0.1/24 ")
@@ -79,6 +84,8 @@ func ParseOptions() *Options {
79
84
} else if options .IP != "" {
80
85
options .File = ""
81
86
options .Url = ""
87
+ } else if options .SP {
88
+ showPocsList ()
82
89
} else {
83
90
//ShowBanner(v)
84
91
flag .PrintDefaults ()
@@ -90,6 +97,15 @@ func ParseOptions() *Options {
90
97
91
98
}
92
99
100
+ func showPocsList () {
101
+ fmt .Println ("Pocs list: " )
102
+ ls := attack .GetList ()
103
+ // 遍历list,输出pocs名称
104
+ for i := ls .Front (); i != nil ; i = i .Next () {
105
+ fmt .Println (i .Value )
106
+ }
107
+ }
108
+
93
109
func showVerbose (options * Options ) {
94
110
if ! options .Verbose {
95
111
switch options .Mode {
0 commit comments