PyPtt 2.3.2__tar.gz → 2.3.3__tar.gz
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.
- {pyptt-2.3.2 → pyptt-2.3.3}/PKG-INFO +1 -1
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/__init__.py +1 -1
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_change_pw.py +6 -5
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_give_money.py +1 -1
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_loginout.py +3 -1
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt.egg-info/PKG-INFO +1 -1
- {pyptt-2.3.2 → pyptt-2.3.3}/LICENSE +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/PTT.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_bucket.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_call_status.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_comment.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_del_post.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_get_board_info.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_get_board_list.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_get_bottom_post_list.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_get_favourite_board.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_get_newest_index.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_get_post.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_get_post_index.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_get_post_list.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_get_time.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_get_user.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_get_waterball.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_has_new_mail.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_mail.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_mark_post.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_post.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_reply_post.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_search_user.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_set_board_title.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_set_signature_file.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_api_util.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_uao/LICENSE +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_uao/__init__.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_uao/b2u.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/_uao/u2b.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/api_server.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/check_value.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/command.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/config.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/connect_core.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/data_type.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/exceptions.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/i18n.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/lang_en_US.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/lang_zh_TW.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/lib_util.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/log.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/screens.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/service.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt/ssl_config.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt.egg-info/SOURCES.txt +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt.egg-info/dependency_links.txt +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt.egg-info/requires.txt +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/PyPtt.egg-info/top_level.txt +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/README.md +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/pyproject.toml +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/setup.cfg +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/setup.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_backup_effective.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_backup_param.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_bucket.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_change_pw.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_comment.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_connect_core_timeout.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_del_post.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_del_post_unit.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_exceptions.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_fast_post.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_board_info.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_board_list.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_bottom_post_list.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_content_formula.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_favourite_boards.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_mail.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_newest_index.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_post.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_post_list.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_post_list_parser.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_post_parser.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_time.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_user.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_get_waterball.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_give_money.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_half_dead_connection.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_i18n.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_incremental_parity.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_init.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_logger.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_login_logout.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_mail_send_and_del.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_mark_post.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_parse_query_post.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_post.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_post_anonymous.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_pyte_parity.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_reply_post.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_search_user.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_service.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_set_board_title.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_set_signature_file.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_uao_codec.py +0 -0
- {pyptt-2.3.2 → pyptt-2.3.3}/tests/test_vt100_parser.py +0 -0
|
@@ -13,8 +13,6 @@ def change_pw(api, new_password: str) -> None:
|
|
|
13
13
|
|
|
14
14
|
log.logger.info(i18n.change_pw)
|
|
15
15
|
|
|
16
|
-
new_password = new_password[:8]
|
|
17
|
-
|
|
18
16
|
cmd_list = []
|
|
19
17
|
cmd_list.append(command.go_main_menu)
|
|
20
18
|
cmd_list.append('U')
|
|
@@ -29,9 +27,12 @@ def change_pw(api, new_password: str) -> None:
|
|
|
29
27
|
connect_core.TargetUnit('設定聯絡信箱後才能修改密碼', exceptions_=exceptions.SetContactMailFirst()),
|
|
30
28
|
connect_core.TargetUnit('您輸入的密碼不正確', exceptions_=exceptions.WrongPassword()),
|
|
31
29
|
connect_core.TargetUnit('請您確定(Y/N)?', response='Y' + command.enter),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
# 只比對「新密碼」/「原密碼」, 不含前後綴與冒號: 正式站目前是「請設定新密碼:」
|
|
31
|
+
# 「請檢查新密碼:」「請輸入原密碼:」(全形冒號), pttbbs #112 之後上游改成兩步同名的
|
|
32
|
+
# 「新密碼:」(半形), 兩種寫法都涵蓋。新密碼要吃設定與確認兩次, 故 max_match=2。
|
|
33
|
+
# 「新密碼」必須排在「原密碼」前面: 新版輸入完原密碼後該行仍留在畫面上, 兩者會同時出現。
|
|
34
|
+
connect_core.TargetUnit('新密碼', response=new_password + command.enter, max_match=2, secret=True),
|
|
35
|
+
connect_core.TargetUnit('原密碼', response=api._ptt_pw + command.enter, max_match=1, secret=True),
|
|
35
36
|
connect_core.TargetUnit('設定個人資料與密碼', break_detect=True)
|
|
36
37
|
]
|
|
37
38
|
|
|
@@ -78,7 +78,7 @@ def give_money(api, ptt_id: str, money: int, red_bag_title: str, red_bag_content
|
|
|
78
78
|
connect_core.TargetUnit('按任意鍵繼續', break_detect=True),
|
|
79
79
|
edit_red_bag_target,
|
|
80
80
|
connect_core.TargetUnit('要修改紅包袋嗎', response=command.enter),
|
|
81
|
-
connect_core.TargetUnit('完成交易前要重新確認您的身份', response=api._ptt_pw + command.enter),
|
|
81
|
+
connect_core.TargetUnit('完成交易前要重新確認您的身份', response=api._ptt_pw + command.enter, secret=True),
|
|
82
82
|
connect_core.TargetUnit('他是你的小主人,是否匿名?', response='n' + command.enter),
|
|
83
83
|
connect_core.TargetUnit('要給他多少Ptt幣呢?', response=command.tab + str(money) + command.enter),
|
|
84
84
|
connect_core.TargetUnit('這位幸運兒的id', response=ptt_id + command.enter),
|
|
@@ -68,7 +68,9 @@ def login(api, ptt_id: str, ptt_pw: str, kick_other_session: bool) -> None:
|
|
|
68
68
|
api.process_picks = int(pattern.search(screen).group(0))
|
|
69
69
|
|
|
70
70
|
ptt_id = ptt_id[:12].strip()
|
|
71
|
-
|
|
71
|
+
# 不截斷密碼: 舊版 PTT 由 server 端忽略第 8 字之後的部分, 新版 (pttbbs #112, bcrypt)
|
|
72
|
+
# 則支援 72 字元, 兩邊都必須送出完整密碼才會正確。
|
|
73
|
+
ptt_pw = ptt_pw.strip()
|
|
72
74
|
|
|
73
75
|
api.ptt_id = ptt_id
|
|
74
76
|
api._ptt_pw = ptt_pw
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|