forked from safe6Sec/GolangBypassAV
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
50 lines (43 loc) · 1.27 KB
/
main.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
package main
import "fmt"
func main() {
//a := 16
//b :=20
//c:= a^b
//fmt.Println("1",c)
//
//fmt.Println("2",c^b)
//
//fmt.Println("3",c^a)
/*var shellcode = []byte{
0x31, 0xc0, 0x50, 0x68, 0x63, 0x61, 0x6c, 0x63,
0x54, 0x59, 0x50, 0x40, 0x92, 0x74, 0x15, 0x51,
0x64, 0x8b, 0x72, 0x2f, 0x8b, 0x76, 0x0c, 0x8b,
0x76, 0x0c, 0xad, 0x8b, 0x30, 0x8b, 0x7e, 0x18,
0xb2, 0x50, 0xeb, 0x1a, 0xb2, 0x60, 0x48, 0x29,
0xd4, 0x65, 0x48, 0x8b, 0x32, 0x48, 0x8b, 0x76,
0x18, 0x48, 0x8b, 0x76, 0x10, 0x48, 0xad, 0x48,
0x8b, 0x30, 0x48, 0x8b, 0x7e, 0x30, 0x03, 0x57,
0x3c, 0x8b, 0x5c, 0x17, 0x28, 0x8b, 0x74, 0x1f,
0x20, 0x48, 0x01, 0xfe, 0x8b, 0x54, 0x1f, 0x24,
0x0f, 0xb7, 0x2c, 0x17, 0x8d, 0x52, 0x02, 0xad,
0x81, 0x3c, 0x07, 0x57, 0x69, 0x6e, 0x45, 0x75,
0xef, 0x8b, 0x74, 0x1f, 0x1c, 0x48, 0x01, 0xfe,
0x8b, 0x34, 0xae, 0x48, 0x01, 0xf7, 0x99, 0xff,
0xd7,
}*/
//dd := hex.EncodeToString(shellcode)
//fmt.Println(dd)
a := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
s1 := a[1:3]
fmt.Println("a=", len(a))
fmt.Println("s1=", len(s1))
s2 := s1[2:5]
fmt.Println("s2=", len(s2))
s3 := s2[1:6]
fmt.Println("s3=", len(s3))
fmt.Println("=============")
fmt.Println("s3=", s3)
a = append(a, 12)
fmt.Printf("s1=%d\r\ns2=\ns3=%d\r\n%p\r\n%p", s1, s2, s3, &a, &s1)
}