forked from FunnyWolf/ligolo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlib.go
87 lines (86 loc) · 5.21 KB
/
lib.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
package ligolo
const CertPEM = `-----BEGIN CERTIFICATE-----
MIIFnTCCA4WgAwIBAgIUb8auVNIbbScZ3Si/Q3fclASF3U4wDQYJKoZIhvcNAQEL
BQAwXjELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBVRleGFzMQ8wDQYDVQQHDAZBdXN0
aW4xFDASBgNVBAoMC0RldmVsb3BtZW50MRgwFgYDVQQDDA93d3cuZXhhbXBsZS5j
b20wHhcNMTkwODE2MTQyNDIwWhcNMjAwODE1MTQyNDIwWjBeMQswCQYDVQQGEwJV
UzEOMAwGA1UECAwFVGV4YXMxDzANBgNVBAcMBkF1c3RpbjEUMBIGA1UECgwLRGV2
ZWxvcG1lbnQxGDAWBgNVBAMMD3d3dy5leGFtcGxlLmNvbTCCAiIwDQYJKoZIhvcN
AQEBBQADggIPADCCAgoCggIBAPk94FxUqTYZhdaqVQEIrS/yE7BjO9RMsM1nhZ5n
sM0s0noWMpJmQMGRoOP+uqIFanUT2FHfMe1iSRsmeALOB1hkbZsIGpwS6MTaS0vu
VEVACENJebJz+aNtq5QuUA66C0T+IRvxXolynx+5gWvqoWeq3T3bGOlI4MI8n4Xe
ywGvqVW57M3sp+G7Avs/K0PbmcX4qEC6N+i46oE1Q/siuFz21NeoPpOKgCPMEzPG
P1H9o2JYMp0NODp69HOYBQlPH7z1pvtZca7mS+QJWIGYV9mJ9itN4LmnvypSu6jJ
aavw/s2OGz9lbqpmZQT/3SwB3Mr/lfCdyL03J/JhUJsA4SIG2Xrc/V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