Skip to content

Commit 35b5f18

Browse files
committed
Update wechat.deb to 1.0.0.241
use kylin V10 SP1 repo add libactivation remove .kyact redirect
1 parent f3222db commit 35b5f18

File tree

4 files changed

+73
-22
lines changed

4 files changed

+73
-22
lines changed

activation.c

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#include <stdio.h>
2+
#include <string.h>
3+
4+
5+
char *get_value(const char *func, const char *key) {
6+
char *value;
7+
8+
FILE *fp = fopen("/app/etc/.kyact", "r");
9+
char buffer[50];
10+
while (fgets(buffer, sizeof(buffer), fp)) {
11+
buffer[strcspn(buffer, "\n")] = '\0';
12+
13+
if (strcmp(key, strtok(buffer, "=")) == 0) {
14+
value = strtok(NULL, "=");
15+
break;
16+
}
17+
}
18+
fclose(fp);
19+
20+
printf("%s: %s\n", func, value);
21+
return strdup(value);
22+
}
23+
24+
char *activation_get_harddisk_id() {
25+
return get_value("activation_get_harddisk_id", "harddisk");
26+
}
27+
28+
char *activation_get_interface_mac() {
29+
return get_value("activation_get_interface_mac", "netmac");
30+
}
31+
32+
char *activation_new_register_number() {
33+
return get_value("activation_new_register_number", "registernum");
34+
}
35+
36+
char *activation_get_system_uuid() {
37+
return get_value("activation_get_system_uuid", "systemuuid");
38+
}
39+
40+
char *activation_get_serial_number() {
41+
return get_value("activation_get_serial_number", "serialnum");
42+
}
43+
44+
int activation_status_code() {
45+
printf("activation_status_code\n");
46+
return 1;
47+
}

com.tencent.WeChat.metainfo.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<category>Network</category>
1919
</categories>
2020
<releases>
21+
<release version="1.0.0.241" date="2024-04-23"/>
2122
<release version="1.0.0.238" date="2024-03-14"/>
2223
<release version="1.0.0.236" date="2024-03-13"/>
2324
<release version="1.0.0.145" date="2024-03-07"/>

com.tencent.WeChat.yaml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,27 @@ cleanup:
4747
- '*.a'
4848

4949
modules:
50+
- name: libactivation
51+
buildsystem: simple
52+
build-commands:
53+
- bsdtar --to-stdout -xf wechat.deb data.* | bsdtar -xf -
54+
- gcc -shared -fPIC activation.c -o libactivation.so -ldl
55+
- install -Dm644 libactivation.so -t $FLATPAK_DEST/lib/
56+
- install -Dm644 etc/.kyact etc/lsb-release-ukui -t $FLATPAK_DEST/etc/
57+
sources:
58+
- type: file
59+
path: activation.c
60+
- type: file
61+
url: https://archive2.kylinos.cn/deb/kylin/production/PART-openKylin/custom/partner/openKylin/pool/all/wechat-beta_1.0.0.238_amd64.deb
62+
sha256: 912cfd30641ef376a680b05c6bdcb70cb3f154cb9eb6d0d3a57d23befe23b99c
63+
dest-filename: wechat.deb
64+
x-checker-data:
65+
type: debian-repo
66+
package-name: wechat-beta
67+
root: https://archive2.kylinos.cn/deb/kylin/production/PART-openKylin/custom/partner/openKylin
68+
dist: default
69+
component: all
70+
5071
- name: libredirect
5172
buildsystem: simple
5273
build-commands:
@@ -91,19 +112,16 @@ modules:
91112
buildsystem: simple
92113
build-commands:
93114
- bsdtar --to-stdout -xf wechat.deb data.* | bsdtar -xf -
94-
- mkdir -p $FLATPAK_DEST/wechat/ $FLATPAK_DEST/etc/ $FLATPAK_DEST/lib/
95-
- mv opt/wechat-beta/* $FLATPAK_DEST/wechat/
96-
- mv usr/lib/libactivation.so $FLATPAK_DEST/lib/
97-
- mv etc/.kyact etc/lsb-release-ukui $FLATPAK_DEST/etc/
115+
- mv opt/wechat-beta -T $FLATPAK_DEST/wechat
98116
sources:
99117
- type: file
100-
url: https://archive2.kylinos.cn/deb/kylin/production/PART-openKylin/custom/partner/openKylin/pool/all/wechat-beta_1.0.0.238_amd64.deb
101-
sha256: 912cfd30641ef376a680b05c6bdcb70cb3f154cb9eb6d0d3a57d23befe23b99c
118+
url: https://archive2.kylinos.cn/deb/kylin/production/PART-V10-SP1/custom/partner/V10-SP1/pool/all/wechat-beta_1.0.0.241_amd64.deb
119+
sha256: 4ffe0cda779b46ad5d76b85bdc65136c9c89add4d0bc1175a34d8b94f516c4fb
102120
dest-filename: wechat.deb
103121
x-checker-data:
104122
type: debian-repo
105123
package-name: wechat-beta
106-
root: https://archive2.kylinos.cn/deb/kylin/production/PART-openKylin/custom/partner/openKylin
124+
root: https://archive2.kylinos.cn/deb/kylin/production/PART-V10-SP1/custom/partner/V10-SP1
107125
dist: default
108126
component: all
109127
is-main-source: true

redirect.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88

99
void *(*real_dlopen)(const char *, int);
10-
FILE *(*real_fopen)(const char *, const char *);
1110
FILE *(*real_fopen64)(const char *, const char *);
1211

1312
void hook_path(const char *func, const char **path) {
@@ -17,8 +16,6 @@ void hook_path(const char *func, const char **path) {
1716
redirect = "/app/lib/libactivation.so";
1817
} else if (strcmp(*path, "/etc/lsb-release") == 0) {
1918
redirect = "/app/etc/lsb-release-ukui";
20-
} else if (strcmp(*path, "/etc/.kyact") == 0) {
21-
redirect = "/app/etc/.kyact";
2219
}
2320

2421
if (redirect != NULL) {
@@ -39,18 +36,6 @@ void *dlopen(const char *__file, int __mode) {
3936
return (*real_dlopen)(__file, __mode);
4037
}
4138

42-
FILE *fopen(const char *__file, const char *__mode) {
43-
if (real_fopen == NULL) {
44-
real_fopen = dlsym(RTLD_NEXT, "fopen");
45-
}
46-
47-
if (__file != NULL) {
48-
hook_path("fopen", &__file);
49-
}
50-
51-
return (*real_fopen)(__file, __mode);
52-
}
53-
5439
FILE *fopen64(const char *__file, const char *__mode) {
5540
if (real_fopen64 == NULL) {
5641
real_fopen64 = dlsym(RTLD_NEXT, "fopen64");

0 commit comments

Comments
 (0)