File tree 5 files changed +89
-4
lines changed
5 files changed +89
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Evil Pot
11
11
12
12
- 8887: evil server 让扫描器产生误报 困难模式
13
13
- 普通模式的基础上对所有请求元素进行拆解计算sha1/md5/base64
14
+ - /etc/passwd和win.ini的内容
14
15
- 8888: evil server 让扫描器产生误报 普通模式
15
16
- 常见状态码
16
17
- 常见报错信息
Original file line number Diff line number Diff line change
1
+ $targets = @ (
2
+ @ {GOOS = " darwin" ; GOARCH = " amd64" ; Output = " evilpot_darwin_amd64" },
3
+ @ {GOOS = " darwin" ; GOARCH = " arm64" ; Output = " evilpot_darwin_arm64" },
4
+ @ {GOOS = " linux" ; GOARCH = " 386" ; Output = " evilpot_linux_386" },
5
+ @ {GOOS = " linux" ; GOARCH = " amd64" ; Output = " evilpot_linux_amd64" },
6
+ @ {GOOS = " linux" ; GOARCH = " arm64" ; Output = " evilpot_linux_arm64" },
7
+ @ {GOOS = " windows" ; GOARCH = " amd64" ; Output = " evilpot_windows_amd64.exe" }
8
+ )
9
+
10
+ foreach ($target in $targets ) {
11
+ $env: GOOS = $target.GOOS
12
+ $env: GOARCH = $target.GOARCH
13
+ $output = $target.Output
14
+
15
+ Write-Host " Building for $ ( $env: GOOS ) /$ ( $env: GOARCH ) ..."
16
+ go build - o $output .
17
+
18
+ if ($LASTEXITCODE -eq 0 ) {
19
+ Write-Host " Successfully built $output "
20
+ } else {
21
+ Write-Host " Failed to build $output "
22
+ }
23
+ }
24
+
25
+ Remove-Item env:GOOS
26
+ Remove-Item env:GOARCH
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ targets=(
4
+ " darwin amd64 evilpot_darwin_amd64"
5
+ " darwin arm64 evilpot_darwin_arm64"
6
+ " linux 386 evilpot_linux_386"
7
+ " linux amd64 evilpot_linux_amd64"
8
+ " linux arm64 evilpot_linux_arm64"
9
+ " windows amd64 evilpot_windows_amd64.exe"
10
+ )
11
+
12
+ for target in " ${targets[@]} " ; do
13
+ IFS=' ' read -r -a params <<< " $target"
14
+ GOOS=${params[0]}
15
+ GOARCH=${params[1]}
16
+ OUTPUT=${params[2]}
17
+
18
+ echo " Building for $GOOS /$GOARCH ..."
19
+ GOOS=$GOOS GOARCH=$GOARCH go build -o $OUTPUT
20
+
21
+ if [ $? -eq 0 ]; then
22
+ echo " Successfully built $OUTPUT "
23
+ else
24
+ echo " Failed to build $OUTPUT "
25
+ fi
26
+ done
Original file line number Diff line number Diff line change @@ -58,6 +58,18 @@ func NewEvilServeMux(hard bool) *http.ServeMux {
58
58
})
59
59
}
60
60
61
+ if hard {
62
+ buf .WriteString ("\n root:x:0:0:root:/root:/bin/bash\n " )
63
+ buf .WriteString (`
64
+ ; for 16-bit app support
65
+ [fonts]
66
+ [extensions]
67
+ [mci extensions]
68
+ [files]
69
+ [Mail]
70
+ MAPI=1` )
71
+ }
72
+
61
73
// 处理 sleep 和 WAITFOR DELAY
62
74
sleepMatches := sleepRe .FindAllStringSubmatch (unescape , - 1 )
63
75
for _ , match := range sleepMatches {
@@ -218,6 +230,5 @@ func init() {
218
230
for i := 0 ; i < 1000 ; i ++ {
219
231
GenEvilContent (buf , []byte (strconv .Itoa (i )))
220
232
}
221
- buf .WriteString ("\n root:x:0:0:root:/root:/bin/bash\n " )
222
233
CommonEvilResponse = buf .Bytes ()
223
234
}
Original file line number Diff line number Diff line change @@ -12,8 +12,29 @@ func main() {
12
12
evilAddr := flag .String ("evil" , ":8888" , "evil server 监听地址" )
13
13
echoAddr := flag .String ("echo" , ":8889" , "echo server 监听地址" )
14
14
flag .Parse ()
15
- go func () { log .Fatalln (evil .ServeEvilServer (* evilHardAddr , true )) }()
16
- go func () { log .Fatalln (evil .ServeEvilServer (* evilAddr , false )) }()
17
- go func () { log .Fatalln (evil .ServeEchoServer (* echoAddr )) }()
15
+
16
+ log .Println ("Starting servers..." )
17
+
18
+ go func () {
19
+ log .Printf ("Starting evil server in hard mode on %s...\n " , * evilHardAddr )
20
+ if err := evil .ServeEvilServer (* evilHardAddr , true ); err != nil {
21
+ log .Fatalf ("Evil server hard mode failed: %v\n " , err )
22
+ }
23
+ }()
24
+
25
+ go func () {
26
+ log .Printf ("Starting evil server on %s...\n " , * evilAddr )
27
+ if err := evil .ServeEvilServer (* evilAddr , false ); err != nil {
28
+ log .Fatalf ("Evil server failed: %v\n " , err )
29
+ }
30
+ }()
31
+
32
+ go func () {
33
+ log .Printf ("Starting echo server on %s...\n " , * echoAddr )
34
+ if err := evil .ServeEchoServer (* echoAddr ); err != nil {
35
+ log .Fatalf ("Echo server failed: %v\n " , err )
36
+ }
37
+ }()
38
+
18
39
select {}
19
40
}
You can’t perform that action at this time.
0 commit comments