1
0
mirror of https://github.com/FloatTech/zbpdata.git synced 2026-02-16 04:05:54 +09:00

Compare commits

...

7 Commits

Author SHA1 Message Date
源文雨
215a217867 add chat vocab 2022-11-29 23:22:59 +08:00
源文雨
8920298a4f fix 2022-11-22 17:11:02 +08:00
源文雨
9532f04a1a 更新setu数据库 2022-11-22 17:04:57 +08:00
源文雨
3585b946c3 fix 2022-11-15 11:49:01 +08:00
DreamZero
4bafa3eb68 Add files via upload (#33) 2022-11-15 11:30:27 +08:00
源文雨
7bc1828db5 优化 ignore 匹配规则 2022-10-15 13:48:11 +08:00
源文雨
c066abebe7 update Heisi 2022-10-13 11:10:19 +08:00
20 changed files with 35567 additions and 45455 deletions

View File

@@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.17'
go-version: '1.19'
- name: Run Updater
env:

24
.gitignore vendored
View File

@@ -1,22 +1,6 @@
SetuTime/cache
control
SetuTime/search
manager
acgimage
saucenao
Fortune/cache
hs
nsetu
nwife
sleep
score
danbooru
gif
pixiv
scale
cache
/SetuTime/search
/VtbQuotation/store
.DS_Store
.vscode
MockingBird/cache
driftbottle
job
hyaku
/[a-z]*

35370
Chat/simai.yml Normal file

File diff suppressed because it is too large Load Diff

BIN
Control/icon.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
Heisi/baisi.bin Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
Heisi/heisi.bin Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
Heisi/jk.bin Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
Heisi/jur.bin Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
Heisi/mcn.bin Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

113
Heisi/migrate/migrate.go Normal file
View File

@@ -0,0 +1,113 @@
package main
import (
"bufio"
"encoding/binary"
"encoding/hex"
"fmt"
"os"
"strconv"
"strings"
)
type item [10]byte
func main() {
if len(os.Args) != 3 {
fmt.Println("Usage: heisi.txt heisi.bin")
return
}
inf, err := os.Open(os.Args[1])
if err != nil {
panic(err)
}
defer inf.Close()
ouf, err := os.Create(os.Args[2])
if err != nil {
panic(err)
}
defer ouf.Close()
s := bufio.NewScanner(inf)
i := 0
for s.Scan() {
i++
t := s.Text()
if !strings.HasPrefix(t, "http://hs.heisiwu.com/wp-content/uploads/") {
panic("line " + strconv.Itoa(i) + ": invalid url prefix")
}
t = t[41:]
if len(t) < 27 {
panic("line " + strconv.Itoa(i) + ": invalid url suffix")
}
year, err := strconv.Atoi(t[:4]) // 4bits
if err != nil {
panic("line " + strconv.Itoa(i) + ": " + err.Error())
}
if year < 2021 {
panic("line " + strconv.Itoa(i) + ": invalid year")
}
mounth, err := strconv.Atoi(t[5:7]) // 4bits
if err != nil {
panic("line " + strconv.Itoa(i) + ": " + err.Error())
}
if mounth == 0 || mounth > 12 {
panic("line " + strconv.Itoa(i) + ": invalid mounth")
}
var it item
it[0] = byte((year-2021)<<4) | byte(mounth&0x0f) // 1byte
if year == 2021 {
num, err := strconv.Atoi(t[16 : 16+6]) // 4bytes
if err != nil {
panic("line " + strconv.Itoa(i) + ": " + err.Error())
}
d, err := hex.DecodeString(t[28 : 28+8]) // 4bytes
if err != nil {
panic("line " + strconv.Itoa(i) + ": " + err.Error())
}
if len(d) != 4 {
panic("line " + strconv.Itoa(i) + ": invalid data")
}
binary.BigEndian.PutUint32(it[1:], uint32(num))
copy(it[5:], d)
} else {
head := "0"
if strings.Contains(t[23:], ".png") {
head = "1"
} else if strings.Contains(t[23:], ".webp") {
head = "2"
}
d, err := hex.DecodeString(head + t[8:8+15]) // 8bytes
if err != nil {
panic("line " + strconv.Itoa(i) + ": " + err.Error())
}
if len(d) != 8 {
panic("line " + strconv.Itoa(i) + ": invalid data")
}
copy(it[1:], d)
if strings.Contains(t[23:], "scaled") {
it[9] = 0x80
}
if t[23] == '-' && t[24] != 's' {
switch {
case t[25] == '-' || t[25] == '.':
it[9] |= (t[24] - '0') & 0x7f
case t[26] == '-' || t[26] == '.':
num, err := strconv.Atoi(t[24:26]) // 1byte
if err != nil {
panic("line " + strconv.Itoa(i) + ": " + err.Error())
}
it[9] |= byte(num) & 0x7f
case t[27] == '-' || t[27] == '.':
num, err := strconv.Atoi(t[24:27]) // 1byte
if err != nil {
panic("line " + strconv.Itoa(i) + ": " + err.Error())
}
it[9] |= byte(num) & 0x7f
default:
panic("line " + strconv.Itoa(i) + ": invalid num")
}
}
}
ouf.Write(it[:])
}
}

View File

@@ -0,0 +1,78 @@
package main
import (
"bufio"
"encoding/binary"
"encoding/hex"
"fmt"
"math/bits"
"os"
"strconv"
)
type item [10]byte
const (
template2021 = "http://hs.heisiwu.com/wp-content/uploads/%4d/%02d/%4d%02d16%06d-611a3%8s.jpg"
templategeneral = "http://hs.heisiwu.com/wp-content/uploads/%4d/%02d/%015x"
)
func main() {
if len(os.Args) != 3 {
fmt.Println("Usage: heisi.txt heisi.bin")
return
}
inf, err := os.Open(os.Args[1])
if err != nil {
panic(err)
}
defer inf.Close()
ouf, err := os.Open(os.Args[2])
if err != nil {
panic(err)
}
defer ouf.Close()
s := bufio.NewScanner(inf)
i := 0
for s.Scan() {
i++
t := s.Text()
var it item
ouf.Read(it[:])
year, month := int((it[0]>>4)&0x0f), int(it[0]&0x0f)
year += 2021
if year == 2021 {
num := binary.BigEndian.Uint32(it[1:5])
dstr := hex.EncodeToString(it[5:9])
trestore := fmt.Sprintf(template2021, year, month, year, month, num, dstr)
if trestore != t {
panic("line " + strconv.Itoa(i) + ": mismatched content " + trestore)
}
continue
}
d := binary.BigEndian.Uint64(it[1:9])
isscaled := it[9]&0x80 > 0
num := int(it[9] & 0x7f)
trestore := fmt.Sprintf(templategeneral, year, month, d&0x0fffffff_ffffffff)
if num > 0 {
trestore += fmt.Sprintf("-%d", num)
}
if isscaled {
trestore += "-scaled"
}
d = bits.RotateLeft64(d, 4) & 0x0f
switch d {
case 0:
trestore += ".jpg"
case 1:
trestore += ".png"
case 2:
trestore += ".webp"
default:
panic("line " + strconv.Itoa(i) + ": invalid ext")
}
if trestore != t {
panic("line " + strconv.Itoa(i) + ": mismatched content " + trestore)
}
}
}

BIN
Heisi/zuk.bin Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -39,7 +39,7 @@ func main() {
*(*unsafe.Pointer)(unsafe.Pointer(&md5s[i])) = unsafe.Pointer(&buf)
*(*uintptr)(unsafe.Add(unsafe.Pointer(&md5s[i]), unsafe.Sizeof(uintptr(0)))) = uintptr(16)
}
r := registry.NewRegedit("reilia.fumiama.top:32664", "fumiama", os.Getenv("REILIA_SPS"))
r := registry.NewRegedit("reilia.fumiama.top:32664", "", "fumiama", os.Getenv("REILIA_SPS"))
err := r.Connect()
if err != nil {
panic(err)