sticker-convert 2.13.3.0__py3-none-any.whl → 2.17.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sticker_convert/__main__.py +24 -27
- sticker_convert/auth/__init__.py +0 -0
- sticker_convert/auth/auth_base.py +19 -0
- sticker_convert/{utils/auth/get_discord_auth.py → auth/auth_discord.py} +149 -118
- sticker_convert/{utils/auth/get_kakao_auth.py → auth/auth_kakao_android_login.py} +331 -330
- sticker_convert/auth/auth_kakao_desktop_login.py +327 -0
- sticker_convert/{utils/auth/get_kakao_desktop_auth.py → auth/auth_kakao_desktop_memdump.py} +281 -263
- sticker_convert/{utils/auth/get_line_auth.py → auth/auth_line.py} +98 -80
- sticker_convert/{utils/auth/get_signal_auth.py → auth/auth_signal.py} +139 -135
- sticker_convert/auth/auth_telethon.py +161 -0
- sticker_convert/{utils/auth/get_viber_auth.py → auth/auth_viber.py} +250 -235
- sticker_convert/{utils/auth → auth}/telegram_api.py +736 -675
- sticker_convert/cli.py +623 -608
- sticker_convert/converter.py +1093 -1084
- sticker_convert/definitions.py +4 -0
- sticker_convert/downloaders/download_band.py +111 -110
- sticker_convert/downloaders/download_base.py +171 -166
- sticker_convert/downloaders/download_discord.py +92 -91
- sticker_convert/downloaders/download_kakao.py +417 -404
- sticker_convert/downloaders/download_line.py +484 -475
- sticker_convert/downloaders/download_ogq.py +80 -79
- sticker_convert/downloaders/download_signal.py +108 -105
- sticker_convert/downloaders/download_telegram.py +56 -55
- sticker_convert/downloaders/download_viber.py +121 -120
- sticker_convert/gui.py +788 -873
- sticker_convert/gui_components/frames/comp_frame.py +180 -166
- sticker_convert/gui_components/frames/config_frame.py +156 -113
- sticker_convert/gui_components/frames/control_frame.py +32 -30
- sticker_convert/gui_components/frames/cred_frame.py +232 -233
- sticker_convert/gui_components/frames/input_frame.py +139 -137
- sticker_convert/gui_components/frames/output_frame.py +112 -110
- sticker_convert/gui_components/frames/right_clicker.py +25 -23
- sticker_convert/gui_components/windows/advanced_compression_window.py +757 -757
- sticker_convert/gui_components/windows/base_window.py +7 -2
- sticker_convert/gui_components/windows/discord_get_auth_window.py +79 -82
- sticker_convert/gui_components/windows/kakao_get_auth_window.py +511 -321
- sticker_convert/gui_components/windows/line_get_auth_window.py +94 -102
- sticker_convert/gui_components/windows/signal_get_auth_window.py +84 -89
- sticker_convert/gui_components/windows/viber_get_auth_window.py +168 -168
- sticker_convert/ios-message-stickers-template/.github/FUNDING.yml +3 -3
- sticker_convert/ios-message-stickers-template/README.md +10 -10
- sticker_convert/ios-message-stickers-template/stickers/Info.plist +43 -43
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Info.plist +31 -31
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Contents.json +6 -6
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Contents.json +20 -20
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 1.sticker/Contents.json +9 -9
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 2.sticker/Contents.json +9 -9
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/Sticker Pack.stickerpack/Sticker 3.sticker/Contents.json +9 -9
- sticker_convert/ios-message-stickers-template/stickers StickerPackExtension/Stickers.xcstickers/iMessage App Icon.stickersiconset/Contents.json +91 -91
- sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.pbxproj +364 -364
- sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -7
- sticker_convert/ios-message-stickers-template/stickers.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
- sticker_convert/ios-message-stickers-template/stickers.xcodeproj/xcuserdata/niklaspeterson.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
- sticker_convert/job.py +166 -130
- sticker_convert/job_option.py +1 -0
- sticker_convert/locales/en_US/LC_MESSAGES/base.mo +0 -0
- sticker_convert/locales/ja_JP/LC_MESSAGES/base.mo +0 -0
- sticker_convert/locales/zh_CN/LC_MESSAGES/base.mo +0 -0
- sticker_convert/locales/zh_TW/LC_MESSAGES/base.mo +0 -0
- sticker_convert/py.typed +0 -0
- sticker_convert/resources/NotoColorEmoji.ttf +0 -0
- sticker_convert/resources/help.ja_JP.json +88 -0
- sticker_convert/resources/help.json +10 -7
- sticker_convert/resources/help.zh_CN.json +88 -0
- sticker_convert/resources/help.zh_TW.json +88 -0
- sticker_convert/resources/input.ja_JP.json +74 -0
- sticker_convert/resources/input.json +121 -121
- sticker_convert/resources/input.zh_CN.json +74 -0
- sticker_convert/resources/input.zh_TW.json +74 -0
- sticker_convert/resources/output.ja_JP.json +38 -0
- sticker_convert/resources/output.zh_CN.json +38 -0
- sticker_convert/resources/output.zh_TW.json +38 -0
- sticker_convert/uploaders/compress_wastickers.py +186 -177
- sticker_convert/uploaders/upload_base.py +44 -35
- sticker_convert/uploaders/upload_signal.py +218 -203
- sticker_convert/uploaders/upload_telegram.py +353 -338
- sticker_convert/uploaders/upload_viber.py +178 -169
- sticker_convert/uploaders/xcode_imessage.py +295 -286
- sticker_convert/utils/callback.py +238 -6
- sticker_convert/utils/emoji.py +16 -4
- sticker_convert/utils/files/json_resources_loader.py +24 -19
- sticker_convert/utils/files/metadata_handler.py +3 -3
- sticker_convert/utils/translate.py +108 -0
- sticker_convert/utils/url_detect.py +40 -37
- sticker_convert/version.py +1 -1
- {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/METADATA +89 -74
- {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/RECORD +91 -74
- sticker_convert/utils/auth/telethon_setup.py +0 -97
- sticker_convert/utils/singletons.py +0 -18
- {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/WHEEL +0 -0
- {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/entry_points.txt +0 -0
- {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/licenses/LICENSE +0 -0
- {sticker_convert-2.13.3.0.dist-info → sticker_convert-2.17.0.0.dist-info}/top_level.txt +0 -0
|
@@ -1,321 +1,511 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
import platform
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
from sticker_convert.
|
|
10
|
-
from sticker_convert.
|
|
11
|
-
from sticker_convert.gui_components.
|
|
12
|
-
from sticker_convert.
|
|
13
|
-
from sticker_convert.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
self.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
self.
|
|
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
|
-
self.
|
|
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
|
-
self.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
self.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
)
|
|
163
|
-
self.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
self.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
)
|
|
221
|
-
self.
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
self.
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
self.
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
self.
|
|
237
|
-
column=0, row=
|
|
238
|
-
)
|
|
239
|
-
|
|
240
|
-
self.
|
|
241
|
-
|
|
242
|
-
self.
|
|
243
|
-
|
|
244
|
-
)
|
|
245
|
-
self.
|
|
246
|
-
self.
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
self.
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
import platform
|
|
3
|
+
from threading import Thread
|
|
4
|
+
from typing import Any, Optional
|
|
5
|
+
|
|
6
|
+
from ttkbootstrap import Button, Entry, Frame, Label, LabelFrame # type: ignore
|
|
7
|
+
|
|
8
|
+
from sticker_convert.auth.auth_kakao_android_login import AuthKakaoAndroidLogin
|
|
9
|
+
from sticker_convert.auth.auth_kakao_desktop_login import AuthKakaoDesktopLogin
|
|
10
|
+
from sticker_convert.auth.auth_kakao_desktop_memdump import AuthKakaoDesktopMemdump
|
|
11
|
+
from sticker_convert.gui_components.frames.right_clicker import RightClicker
|
|
12
|
+
from sticker_convert.gui_components.gui_utils import GUIUtils
|
|
13
|
+
from sticker_convert.gui_components.windows.base_window import BaseWindow
|
|
14
|
+
from sticker_convert.utils.translate import I
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class KakaoGetAuthWindow(BaseWindow):
|
|
18
|
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
19
|
+
super().__init__(*args, **kwargs)
|
|
20
|
+
|
|
21
|
+
self.title(I("Get Kakao auth_token"))
|
|
22
|
+
|
|
23
|
+
self.frame_desktop_memdump = LabelFrame(
|
|
24
|
+
self.scrollable_frame, text=I("Method 1: KakaoTalk Desktop memdump")
|
|
25
|
+
)
|
|
26
|
+
self.frame_desktop_login = LabelFrame(
|
|
27
|
+
self.scrollable_frame, text=I("Method 2: Simulate Desktop login")
|
|
28
|
+
)
|
|
29
|
+
self.frame_android_login = LabelFrame(
|
|
30
|
+
self.scrollable_frame, text=I("Method 3: Simulate Android login")
|
|
31
|
+
)
|
|
32
|
+
self.frame_login_btn = Frame(self.scrollable_frame)
|
|
33
|
+
|
|
34
|
+
self.frame_desktop_memdump.grid(column=0, row=0, sticky="news", padx=3, pady=3)
|
|
35
|
+
self.frame_desktop_login.grid(column=0, row=1, sticky="news", padx=3, pady=3)
|
|
36
|
+
self.frame_android_login.grid(column=0, row=2, sticky="news", padx=3, pady=3)
|
|
37
|
+
|
|
38
|
+
# Method 1 frame
|
|
39
|
+
self.explanation1_1_lbl = Label(
|
|
40
|
+
self.frame_desktop_memdump,
|
|
41
|
+
text=I("This will get Kakao auth_token from Kakao Desktop"),
|
|
42
|
+
justify="left",
|
|
43
|
+
anchor="w",
|
|
44
|
+
)
|
|
45
|
+
self.explanation1_2_lbl = Label(
|
|
46
|
+
self.frame_desktop_memdump,
|
|
47
|
+
text=I("Download Kakao Desktop, login and press 'Get auth_token'"),
|
|
48
|
+
justify="left",
|
|
49
|
+
anchor="w",
|
|
50
|
+
)
|
|
51
|
+
self.explanation1_3_lbl = Label(
|
|
52
|
+
self.frame_desktop_memdump,
|
|
53
|
+
text=I("This can take about a minute."),
|
|
54
|
+
justify="left",
|
|
55
|
+
anchor="w",
|
|
56
|
+
)
|
|
57
|
+
if platform.system() != "Darwin":
|
|
58
|
+
self.explanation1_4_lbl = Label(
|
|
59
|
+
self.frame_desktop_memdump,
|
|
60
|
+
text=I(
|
|
61
|
+
"Note: This will download ProcDump and read memory of KakaoTalk Desktop"
|
|
62
|
+
),
|
|
63
|
+
justify="left",
|
|
64
|
+
anchor="w",
|
|
65
|
+
)
|
|
66
|
+
else:
|
|
67
|
+
self.explanation1_4_lbl = Label(
|
|
68
|
+
self.frame_desktop_memdump,
|
|
69
|
+
text=I("Note: This will read memory of KakaoTalk Desktop"),
|
|
70
|
+
justify="left",
|
|
71
|
+
anchor="w",
|
|
72
|
+
)
|
|
73
|
+
self.kakao_bin_path_lbl = Label(
|
|
74
|
+
self.frame_desktop_memdump,
|
|
75
|
+
text=I("Kakao app path (Optional):"),
|
|
76
|
+
justify="left",
|
|
77
|
+
anchor="w",
|
|
78
|
+
)
|
|
79
|
+
self.kakao_bin_path_entry = Entry(
|
|
80
|
+
self.frame_desktop_memdump,
|
|
81
|
+
textvariable=self.gui.kakao_bin_path_var,
|
|
82
|
+
width=30,
|
|
83
|
+
)
|
|
84
|
+
self.launch_desktop_btn = Button(
|
|
85
|
+
self.frame_desktop_memdump,
|
|
86
|
+
text=I("Launch Desktop app"),
|
|
87
|
+
command=self.cb_launch_desktop,
|
|
88
|
+
width=24,
|
|
89
|
+
bootstyle="secondary", # type: ignore
|
|
90
|
+
)
|
|
91
|
+
self.get_auth_desktop_btn = Button(
|
|
92
|
+
self.frame_desktop_memdump,
|
|
93
|
+
text=I("Get auth_token"),
|
|
94
|
+
command=self.cb_get_auth_desktop_memdump,
|
|
95
|
+
width=24,
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
self.explanation1_1_lbl.grid(
|
|
99
|
+
column=0, row=0, columnspan=2, sticky="w", padx=3, pady=3
|
|
100
|
+
)
|
|
101
|
+
self.explanation1_2_lbl.grid(
|
|
102
|
+
column=0, row=1, columnspan=2, sticky="w", padx=3, pady=3
|
|
103
|
+
)
|
|
104
|
+
self.explanation1_3_lbl.grid(
|
|
105
|
+
column=0, row=2, columnspan=2, sticky="w", padx=3, pady=3
|
|
106
|
+
)
|
|
107
|
+
self.explanation1_4_lbl.grid(
|
|
108
|
+
column=0, row=3, columnspan=2, sticky="w", padx=3, pady=3
|
|
109
|
+
)
|
|
110
|
+
self.kakao_bin_path_lbl.grid(column=0, row=4, sticky="w", padx=3, pady=3)
|
|
111
|
+
self.kakao_bin_path_entry.grid(column=1, row=4, sticky="w", padx=3, pady=3)
|
|
112
|
+
self.launch_desktop_btn.grid(column=0, row=5, columnspan=2, padx=3, pady=3)
|
|
113
|
+
self.get_auth_desktop_btn.grid(column=0, row=6, columnspan=2, padx=3, pady=3)
|
|
114
|
+
|
|
115
|
+
# Method 2 frame
|
|
116
|
+
self.explanation2_1_lbl = Label(
|
|
117
|
+
self.frame_desktop_login,
|
|
118
|
+
text=I("This will simulate login to Desktop Kakao app"),
|
|
119
|
+
justify="left",
|
|
120
|
+
anchor="w",
|
|
121
|
+
)
|
|
122
|
+
self.explanation2_2_lbl = Label(
|
|
123
|
+
self.frame_desktop_login,
|
|
124
|
+
text=I("You may receive verification code from Kakao app on phone"),
|
|
125
|
+
justify="left",
|
|
126
|
+
anchor="w",
|
|
127
|
+
)
|
|
128
|
+
self.explanation2_3_lbl = Label(
|
|
129
|
+
self.frame_desktop_login,
|
|
130
|
+
text=I("It is not necessary to download Desktop Kakao app"),
|
|
131
|
+
justify="left",
|
|
132
|
+
anchor="w",
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
self.kakao_username_help_btn2 = Button(
|
|
136
|
+
self.frame_desktop_login,
|
|
137
|
+
text="?",
|
|
138
|
+
width=1,
|
|
139
|
+
command=lambda: self.gui.cb.put(
|
|
140
|
+
(
|
|
141
|
+
"msg_block",
|
|
142
|
+
None,
|
|
143
|
+
{
|
|
144
|
+
"message": self.gui.help["cred"]["kakao_username"],
|
|
145
|
+
"parent": self,
|
|
146
|
+
},
|
|
147
|
+
)
|
|
148
|
+
),
|
|
149
|
+
bootstyle="secondary", # type: ignore
|
|
150
|
+
)
|
|
151
|
+
self.kakao_username_lbl2 = Label(
|
|
152
|
+
self.frame_desktop_login,
|
|
153
|
+
text=I("Username"),
|
|
154
|
+
width=18,
|
|
155
|
+
justify="left",
|
|
156
|
+
anchor="w",
|
|
157
|
+
)
|
|
158
|
+
self.kakao_username_entry2 = Entry(
|
|
159
|
+
self.frame_desktop_login,
|
|
160
|
+
textvariable=self.gui.kakao_username_var,
|
|
161
|
+
width=30,
|
|
162
|
+
)
|
|
163
|
+
self.kakao_username_entry2.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
164
|
+
|
|
165
|
+
self.kakao_password_help_btn2 = Button(
|
|
166
|
+
self.frame_desktop_login,
|
|
167
|
+
text="?",
|
|
168
|
+
width=1,
|
|
169
|
+
command=lambda: self.gui.cb.put(
|
|
170
|
+
(
|
|
171
|
+
"msg_block",
|
|
172
|
+
None,
|
|
173
|
+
{
|
|
174
|
+
"message": self.gui.help["cred"]["kakao_password"],
|
|
175
|
+
"parent": self,
|
|
176
|
+
},
|
|
177
|
+
)
|
|
178
|
+
),
|
|
179
|
+
bootstyle="secondary", # type: ignore
|
|
180
|
+
)
|
|
181
|
+
self.kakao_password_lbl2 = Label(
|
|
182
|
+
self.frame_desktop_login,
|
|
183
|
+
text=I("Password"),
|
|
184
|
+
justify="left",
|
|
185
|
+
anchor="w",
|
|
186
|
+
)
|
|
187
|
+
self.kakao_password_entry2 = Entry(
|
|
188
|
+
self.frame_desktop_login,
|
|
189
|
+
textvariable=self.gui.kakao_password_var,
|
|
190
|
+
width=30,
|
|
191
|
+
)
|
|
192
|
+
self.kakao_password_entry2.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
193
|
+
|
|
194
|
+
self.kakao_device_uuid_help_btn = Button(
|
|
195
|
+
self.frame_desktop_login,
|
|
196
|
+
text="?",
|
|
197
|
+
width=1,
|
|
198
|
+
command=lambda: self.gui.cb.put(
|
|
199
|
+
(
|
|
200
|
+
"msg_block",
|
|
201
|
+
None,
|
|
202
|
+
{
|
|
203
|
+
"message": self.gui.help["cred"]["kakao_device_uuid"],
|
|
204
|
+
"parent": self,
|
|
205
|
+
},
|
|
206
|
+
)
|
|
207
|
+
),
|
|
208
|
+
bootstyle="secondary", # type: ignore
|
|
209
|
+
)
|
|
210
|
+
self.kakao_device_uuid_lbl = Label(
|
|
211
|
+
self.frame_desktop_login,
|
|
212
|
+
text=I("Device UUID (Optional)"),
|
|
213
|
+
justify="left",
|
|
214
|
+
anchor="w",
|
|
215
|
+
)
|
|
216
|
+
self.kakao_device_uuid_entry = Entry(
|
|
217
|
+
self.frame_desktop_login,
|
|
218
|
+
textvariable=self.gui.kakao_device_uuid_var,
|
|
219
|
+
width=30,
|
|
220
|
+
)
|
|
221
|
+
self.kakao_device_uuid_entry.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
222
|
+
|
|
223
|
+
self.login_btn2 = Button(
|
|
224
|
+
self.frame_desktop_login,
|
|
225
|
+
text=I("Login and get auth_token"),
|
|
226
|
+
command=self.cb_get_auth_desktop_login,
|
|
227
|
+
width=24,
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
self.explanation2_1_lbl.grid(
|
|
231
|
+
column=0, row=0, columnspan=3, sticky="w", padx=3, pady=3
|
|
232
|
+
)
|
|
233
|
+
self.explanation2_2_lbl.grid(
|
|
234
|
+
column=0, row=1, columnspan=3, sticky="w", padx=3, pady=3
|
|
235
|
+
)
|
|
236
|
+
self.explanation2_3_lbl.grid(
|
|
237
|
+
column=0, row=2, columnspan=3, sticky="w", padx=3, pady=3
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
self.kakao_username_help_btn2.grid(column=0, row=3, sticky="w", padx=3, pady=3)
|
|
241
|
+
self.kakao_username_lbl2.grid(column=1, row=3, sticky="w", padx=3, pady=3)
|
|
242
|
+
self.kakao_username_entry2.grid(column=2, row=3, sticky="w", padx=3, pady=3)
|
|
243
|
+
|
|
244
|
+
self.kakao_password_help_btn2.grid(column=0, row=4, sticky="w", padx=3, pady=3)
|
|
245
|
+
self.kakao_password_lbl2.grid(column=1, row=4, sticky="w", padx=3, pady=3)
|
|
246
|
+
self.kakao_password_entry2.grid(column=2, row=4, sticky="w", padx=3, pady=3)
|
|
247
|
+
|
|
248
|
+
self.kakao_device_uuid_help_btn.grid(
|
|
249
|
+
column=0, row=5, sticky="w", padx=3, pady=3
|
|
250
|
+
)
|
|
251
|
+
self.kakao_device_uuid_lbl.grid(column=1, row=5, sticky="w", padx=3, pady=3)
|
|
252
|
+
self.kakao_device_uuid_entry.grid(column=2, row=5, sticky="w", padx=3, pady=3)
|
|
253
|
+
|
|
254
|
+
self.login_btn2.grid(column=0, row=6, columnspan=3, padx=3, pady=3)
|
|
255
|
+
|
|
256
|
+
# Method 3 frame
|
|
257
|
+
self.explanation3_1_lbl = Label(
|
|
258
|
+
self.frame_android_login,
|
|
259
|
+
text=I("This will simulate login to Android Kakao app"),
|
|
260
|
+
justify="left",
|
|
261
|
+
anchor="w",
|
|
262
|
+
)
|
|
263
|
+
self.explanation3_2_lbl = Label(
|
|
264
|
+
self.frame_android_login,
|
|
265
|
+
text=I("You will send / receive verification code via SMS"),
|
|
266
|
+
justify="left",
|
|
267
|
+
anchor="w",
|
|
268
|
+
)
|
|
269
|
+
self.explanation3_3_lbl = Label(
|
|
270
|
+
self.frame_android_login,
|
|
271
|
+
text=I("You will be logged out of existing device"),
|
|
272
|
+
justify="left",
|
|
273
|
+
anchor="w",
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
self.kakao_username_help_btn3 = Button(
|
|
277
|
+
self.frame_android_login,
|
|
278
|
+
text="?",
|
|
279
|
+
width=1,
|
|
280
|
+
command=lambda: self.gui.cb.put(
|
|
281
|
+
(
|
|
282
|
+
"msg_block",
|
|
283
|
+
None,
|
|
284
|
+
{
|
|
285
|
+
"message": self.gui.help["cred"]["kakao_username"],
|
|
286
|
+
"parent": self,
|
|
287
|
+
},
|
|
288
|
+
)
|
|
289
|
+
),
|
|
290
|
+
bootstyle="secondary", # type: ignore
|
|
291
|
+
)
|
|
292
|
+
self.kakao_username_lbl3 = Label(
|
|
293
|
+
self.frame_android_login,
|
|
294
|
+
text=I("Username"),
|
|
295
|
+
width=18,
|
|
296
|
+
justify="left",
|
|
297
|
+
anchor="w",
|
|
298
|
+
)
|
|
299
|
+
self.kakao_username_entry3 = Entry(
|
|
300
|
+
self.frame_android_login,
|
|
301
|
+
textvariable=self.gui.kakao_username_var,
|
|
302
|
+
width=30,
|
|
303
|
+
)
|
|
304
|
+
self.kakao_username_entry3.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
305
|
+
|
|
306
|
+
self.kakao_password_help_btn3 = Button(
|
|
307
|
+
self.frame_android_login,
|
|
308
|
+
text="?",
|
|
309
|
+
width=1,
|
|
310
|
+
command=lambda: self.gui.cb.put(
|
|
311
|
+
(
|
|
312
|
+
"msg_block",
|
|
313
|
+
None,
|
|
314
|
+
{
|
|
315
|
+
"message": self.gui.help["cred"]["kakao_password"],
|
|
316
|
+
"parent": self,
|
|
317
|
+
},
|
|
318
|
+
)
|
|
319
|
+
),
|
|
320
|
+
bootstyle="secondary", # type: ignore
|
|
321
|
+
)
|
|
322
|
+
self.kakao_password_lbl3 = Label(
|
|
323
|
+
self.frame_android_login,
|
|
324
|
+
text=I("Password"),
|
|
325
|
+
justify="left",
|
|
326
|
+
anchor="w",
|
|
327
|
+
)
|
|
328
|
+
self.kakao_password_entry3 = Entry(
|
|
329
|
+
self.frame_android_login,
|
|
330
|
+
textvariable=self.gui.kakao_password_var,
|
|
331
|
+
width=30,
|
|
332
|
+
)
|
|
333
|
+
self.kakao_password_entry3.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
334
|
+
|
|
335
|
+
self.kakao_country_code_help_btn = Button(
|
|
336
|
+
self.frame_android_login,
|
|
337
|
+
text="?",
|
|
338
|
+
width=1,
|
|
339
|
+
command=lambda: self.gui.cb.put(
|
|
340
|
+
(
|
|
341
|
+
"msg_block",
|
|
342
|
+
None,
|
|
343
|
+
{
|
|
344
|
+
"message": self.gui.help["cred"]["kakao_country_code"],
|
|
345
|
+
"parent": self,
|
|
346
|
+
},
|
|
347
|
+
)
|
|
348
|
+
),
|
|
349
|
+
bootstyle="secondary", # type: ignore
|
|
350
|
+
)
|
|
351
|
+
self.kakao_country_code_lbl = Label(
|
|
352
|
+
self.frame_android_login,
|
|
353
|
+
text=I("Country code"),
|
|
354
|
+
justify="left",
|
|
355
|
+
anchor="w",
|
|
356
|
+
)
|
|
357
|
+
self.kakao_country_code_entry = Entry(
|
|
358
|
+
self.frame_android_login,
|
|
359
|
+
textvariable=self.gui.kakao_country_code_var,
|
|
360
|
+
width=30,
|
|
361
|
+
)
|
|
362
|
+
self.kakao_country_code_entry.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
363
|
+
|
|
364
|
+
self.kakao_phone_number_help_btn = Button(
|
|
365
|
+
self.frame_android_login,
|
|
366
|
+
text="?",
|
|
367
|
+
width=1,
|
|
368
|
+
command=lambda: self.gui.cb.put(
|
|
369
|
+
(
|
|
370
|
+
"msg_block",
|
|
371
|
+
None,
|
|
372
|
+
{
|
|
373
|
+
"message": self.gui.help["cred"]["kakao_phone_number"],
|
|
374
|
+
"parent": self,
|
|
375
|
+
},
|
|
376
|
+
)
|
|
377
|
+
),
|
|
378
|
+
bootstyle="secondary", # type: ignore
|
|
379
|
+
)
|
|
380
|
+
self.kakao_phone_number_lbl = Label(
|
|
381
|
+
self.frame_android_login,
|
|
382
|
+
text=I("Phone number"),
|
|
383
|
+
justify="left",
|
|
384
|
+
anchor="w",
|
|
385
|
+
)
|
|
386
|
+
self.kakao_phone_number_entry = Entry(
|
|
387
|
+
self.frame_android_login,
|
|
388
|
+
textvariable=self.gui.kakao_phone_number_var,
|
|
389
|
+
width=30,
|
|
390
|
+
)
|
|
391
|
+
self.kakao_phone_number_entry.bind("<Button-3><ButtonRelease-3>", RightClicker)
|
|
392
|
+
|
|
393
|
+
self.login_btn3 = Button(
|
|
394
|
+
self.frame_android_login,
|
|
395
|
+
text=I("Login and get auth_token"),
|
|
396
|
+
command=self.cb_get_auth_android_login,
|
|
397
|
+
width=24,
|
|
398
|
+
)
|
|
399
|
+
|
|
400
|
+
self.explanation3_1_lbl.grid(
|
|
401
|
+
column=0, row=0, columnspan=3, sticky="w", padx=3, pady=3
|
|
402
|
+
)
|
|
403
|
+
self.explanation3_2_lbl.grid(
|
|
404
|
+
column=0, row=1, columnspan=3, sticky="w", padx=3, pady=3
|
|
405
|
+
)
|
|
406
|
+
self.explanation3_3_lbl.grid(
|
|
407
|
+
column=0, row=2, columnspan=3, sticky="w", padx=3, pady=3
|
|
408
|
+
)
|
|
409
|
+
|
|
410
|
+
self.kakao_username_help_btn3.grid(column=0, row=3, sticky="w", padx=3, pady=3)
|
|
411
|
+
self.kakao_username_lbl3.grid(column=1, row=3, sticky="w", padx=3, pady=3)
|
|
412
|
+
self.kakao_username_entry3.grid(column=2, row=3, sticky="w", padx=3, pady=3)
|
|
413
|
+
|
|
414
|
+
self.kakao_password_help_btn3.grid(column=0, row=4, sticky="w", padx=3, pady=3)
|
|
415
|
+
self.kakao_password_lbl3.grid(column=1, row=4, sticky="w", padx=3, pady=3)
|
|
416
|
+
self.kakao_password_entry3.grid(column=2, row=4, sticky="w", padx=3, pady=3)
|
|
417
|
+
|
|
418
|
+
self.kakao_country_code_help_btn.grid(
|
|
419
|
+
column=0, row=5, sticky="w", padx=3, pady=3
|
|
420
|
+
)
|
|
421
|
+
self.kakao_country_code_lbl.grid(column=1, row=5, sticky="w", padx=3, pady=3)
|
|
422
|
+
self.kakao_country_code_entry.grid(column=2, row=5, sticky="w", padx=3, pady=3)
|
|
423
|
+
|
|
424
|
+
self.kakao_phone_number_help_btn.grid(
|
|
425
|
+
column=0, row=6, sticky="w", padx=3, pady=3
|
|
426
|
+
)
|
|
427
|
+
self.kakao_phone_number_lbl.grid(column=1, row=6, sticky="w", padx=3, pady=3)
|
|
428
|
+
self.kakao_phone_number_entry.grid(column=2, row=6, sticky="w", padx=3, pady=3)
|
|
429
|
+
self.login_btn3.grid(column=0, row=7, columnspan=3, padx=3, pady=3)
|
|
430
|
+
|
|
431
|
+
GUIUtils.finalize_window(self)
|
|
432
|
+
|
|
433
|
+
def cb_get_auth_android_login(self) -> None:
|
|
434
|
+
Thread(target=self.cb_get_auth_android_login_thread, daemon=True).start()
|
|
435
|
+
|
|
436
|
+
def cb_get_auth_desktop_login_thread(self, *_: Any) -> None:
|
|
437
|
+
self.gui.save_creds()
|
|
438
|
+
m = AuthKakaoDesktopLogin(self.gui.get_opt_cred(), self.gui.cb)
|
|
439
|
+
|
|
440
|
+
auth_token, msg = m.get_cred()
|
|
441
|
+
|
|
442
|
+
if auth_token:
|
|
443
|
+
if not self.gui.creds.get("kakao"):
|
|
444
|
+
self.gui.creds["kakao"] = {}
|
|
445
|
+
self.gui.creds["kakao"]["auth_token"] = auth_token
|
|
446
|
+
self.gui.kakao_auth_token_var.set(auth_token)
|
|
447
|
+
|
|
448
|
+
self.gui.save_creds()
|
|
449
|
+
self.gui.highlight_fields()
|
|
450
|
+
|
|
451
|
+
self.gui.cb.put(("msg_block", None, {"message": msg, "parent": self}))
|
|
452
|
+
|
|
453
|
+
def cb_get_auth_desktop_login(self) -> None:
|
|
454
|
+
Thread(target=self.cb_get_auth_desktop_login_thread, daemon=True).start()
|
|
455
|
+
|
|
456
|
+
def cb_get_auth_android_login_thread(self, *_: Any) -> None:
|
|
457
|
+
self.gui.save_creds()
|
|
458
|
+
m = AuthKakaoAndroidLogin(self.gui.get_opt_cred(), self.gui.cb)
|
|
459
|
+
|
|
460
|
+
auth_token, msg = m.get_cred()
|
|
461
|
+
|
|
462
|
+
if auth_token:
|
|
463
|
+
if not self.gui.creds.get("kakao"):
|
|
464
|
+
self.gui.creds["kakao"] = {}
|
|
465
|
+
self.gui.creds["kakao"]["auth_token"] = auth_token
|
|
466
|
+
self.gui.kakao_auth_token_var.set(auth_token)
|
|
467
|
+
|
|
468
|
+
self.gui.save_creds()
|
|
469
|
+
self.gui.highlight_fields()
|
|
470
|
+
|
|
471
|
+
self.gui.cb.put(("msg_block", None, {"message": msg, "parent": self}))
|
|
472
|
+
|
|
473
|
+
def cb_launch_desktop(self) -> None:
|
|
474
|
+
m = AuthKakaoDesktopMemdump(self.gui.get_opt_cred(), self.gui.cb)
|
|
475
|
+
if self.gui.kakao_bin_path_var.get() != "":
|
|
476
|
+
bin_path = self.gui.kakao_bin_path_var.get()
|
|
477
|
+
else:
|
|
478
|
+
bin_path = m.get_kakao_desktop()
|
|
479
|
+
|
|
480
|
+
if bin_path is not None:
|
|
481
|
+
m.launch_kakao(bin_path)
|
|
482
|
+
else:
|
|
483
|
+
msg = I("Error: Cannot launch Kakao Desktop. Is it installed?")
|
|
484
|
+
self.gui.cb.put(("msg_block", None, {"message": msg, "parent": self}))
|
|
485
|
+
|
|
486
|
+
def cb_get_auth_desktop_memdump(self) -> None:
|
|
487
|
+
Thread(target=self.cb_get_auth_desktop_memdump_thread, daemon=True).start()
|
|
488
|
+
|
|
489
|
+
def cb_get_auth_desktop_memdump_thread(self, *_: Any) -> None:
|
|
490
|
+
self.gui.save_creds()
|
|
491
|
+
self.gui.cb.bar("indeterminate")
|
|
492
|
+
m = AuthKakaoDesktopMemdump(self.gui.get_opt_cred(), self.gui.cb)
|
|
493
|
+
|
|
494
|
+
bin_path: Optional[str]
|
|
495
|
+
if self.gui.kakao_bin_path_var.get() != "":
|
|
496
|
+
bin_path = self.gui.kakao_bin_path_var.get()
|
|
497
|
+
else:
|
|
498
|
+
bin_path = None
|
|
499
|
+
auth_token, msg = m.get_cred(bin_path)
|
|
500
|
+
|
|
501
|
+
if auth_token:
|
|
502
|
+
if not self.gui.creds.get("kakao"):
|
|
503
|
+
self.gui.creds["kakao"] = {}
|
|
504
|
+
self.gui.creds["kakao"]["auth_token"] = auth_token
|
|
505
|
+
self.gui.kakao_auth_token_var.set(auth_token)
|
|
506
|
+
|
|
507
|
+
self.gui.save_creds()
|
|
508
|
+
self.gui.highlight_fields()
|
|
509
|
+
|
|
510
|
+
self.gui.cb.put(("msg_block", None, {"message": msg, "parent": self}))
|
|
511
|
+
self.gui.cb.bar("clear")
|