Skip to content

Commit b606a70

Browse files
committed
1 parent 15937ad commit b606a70

File tree

5 files changed

+40
-4
lines changed

5 files changed

+40
-4
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<h1 align="center" >SpringExploit</h1>
2-
<h3 align="center" >一款为了学习go而诞生的漏洞利用工具</h3>
1+
32
<p align="center">
3+
<a href="https://github.com/SummerSec/SpringExploit"><img alt="SpringExploit" src="https://socialify.git.ci/SummerSec/SpringExploit/image?font=Raleway&language=1&logo=https%3A%2F%2Fsumsec.me%2Fresources%2FHi.gif&name=1&owner=1&pattern=Circuit%20Board&theme=Light"></a>
44
<a href="https://github.com/SummerSec/SpringExploit"></a>
55
<a href="https://github.com/SummerSec/SpringExploit"><img alt="SpringExploit" src="https://img.shields.io/badge/SpringExploit-green"></a>
66
<a href="https://github.com/SummerSec/SpringExploit"><img alt="Forks" src="https://img.shields.io/github/forks/SummerSec/SpringExploit"></a>
@@ -21,6 +21,7 @@
2121
* [x] 添加支持CVE-2022-22963 (Spring Cloud Function SpEL RCE)
2222
* [x] 添加支持CVE-2021-26084 (Atlassian Confluence RCE)
2323
* [x] 添加支持CVE-2022-22965 (Spring Core RCE)
24+
* [x] 添加支持CVE-2022-1388 (F5 BIG-IP RCE)
2425
* [x] 自定义并发
2526
* [x] 自定义输出日志位置
2627
* [x] 自定义结果输出位置

cmd/commons/core/banner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const banner = `
1515
`
1616

1717
// TODO 修改版本号
18-
const version = "0.0.9"
18+
const version = "0.1.0"
1919

2020
func ShowBanner(Version string) {
2121
fmt.Println(banner)

cmd/commons/core/runner.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ func (r *Runner) Run() {
4545
} else if r.options.Version {
4646
getLatestVersion()
4747
return
48+
} else if r.options.SP {
49+
return
4850
} else {
4951
log.Error("No file or url or ips specified")
5052
return

cmd/commons/core/update.go

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func getLatestVersion() {
7777

7878
}
7979

80-
// 获取最新版本从github
80+
// 从github获取最新版本
8181
func getLatestVersionFromGithub() string {
8282
m := &update.Manager{
8383
Store: &githubUpdateStore.Store{
@@ -93,5 +93,22 @@ func getLatestVersionFromGithub() string {
9393
}
9494
latest := releases[0]
9595

96+
defer func() {
97+
if errs := recover(); errs != nil {
98+
log.Error("Failed to get latest version", err)
99+
}
100+
}()
101+
96102
return latest.Version
103+
104+
//u := "https://api.github.com/repos/SummerSec/SpringExploit/releases/latest"
105+
//resp, _ := req.R().Get(u)
106+
//body, _ := resp.ToString()
107+
//var m map[string]interface{}
108+
//err := json.Unmarshal([]byte(body), &m)
109+
//if err != nil {
110+
// log.Error("Failed to get latest version", err)
111+
// return ""
112+
//}
113+
//return m["tag_name"].(string)
97114
}

cmd/commons/core/update_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,19 @@ func Test_selfUpdate(t *testing.T) {
1414
})
1515
}
1616
}
17+
18+
func Test_getLatestVersionFromGithub(t *testing.T) {
19+
tests := []struct {
20+
name string
21+
want string
22+
}{
23+
// TODO: Add test cases.
24+
}
25+
for _, tt := range tests {
26+
t.Run(tt.name, func(t *testing.T) {
27+
if got := getLatestVersionFromGithub(); got != tt.want {
28+
t.Errorf("getLatestVersionFromGithub() = %v, want %v", got, tt.want)
29+
}
30+
})
31+
}
32+
}

0 commit comments

Comments
 (0)