-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodule-version.txt
More file actions
90 lines (72 loc) · 4.27 KB
/
Copy pathmodule-version.txt
File metadata and controls
90 lines (72 loc) · 4.27 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
CONCLUSION:
· the TXT chenxuself not read. thanks
0.9x till 0.9x we familiar with/understand code,we can simplify shit long code make it module, modulize-f(x) it.
· one intend change a number, tag xx.py change, xx.py not change, only xx.py change seems not good; maintain old do-method because reappear modified code no need
# controller.py v1.6.2.2 add
0.02 1.6.2.2
0.03 stupid logic fix:why not exist can enter signpy?
0.04 exit judge improve:modify together with sign.py-0.09
alway 存在 但是no unique file
cut走 ,一直不存在
2510141330 proxy 无连接问题; ??????when proxy on, we can surf the internet
mitmproxy --listen-port 8080 listen statue wan net work, add sleep for
def main():
p = start_mitmdump()
time.sleep(2)
exec(open("script.py", encoding="utf-8").read())
last_token = None
0.05 ok,why? "mitmdump", "-s", "save_token.py"
无法访问代理 "mitmdump", "--listen-port 8080" ,"-s", "save_token.py" wait
增加自动代理
增加自动判断是否签到成功(用status 200)
增加 token 特征,这样就不会在当次 抓取时 读错了:初值是删除目录下 token不就行了
0.06 把哥们儿干懵了,你删除token file 再打开 miniprogram 就会重新生成token file,噢 没问题
close 提现笔笔省 失败循环获取token ok.windowClose
需要加硬判断 对 discount的 回复,万一有的电脑特别卡呢 nok
sign-in hard judge:status code ok
0.07 D:\whether1\txbbs-WxMiniProgramScript\docs\___old-test-data\1.6.2.3\3-success repeat 3 round success, seem ng;wait
精准的判断一个瞬间 登录到翻牌页面有返回的瞬间。URL: https://discount.wxpapp.wechatpay.cn/txbbs-mall/coupon/queryfreewithdrawalcouponeligibility
这个有返回值时的瞬间
# save_token.py fetch/get/parse means all text/extract/pull token
0.01 only parse response token when test mitmdump -nr aaa.mitm -s save_token.py
0.02 gpt generate code fix 0.01 version;error
[19:59:56.837] error in script save_token.py
Traceback (most recent call last):
File "save_token.py", line 64, in <module>
def try_extract_from_request(req: http.HTTPRequest):
^^^^^^^^^^^^^^^^
AttributeError: module 'mitmproxy.http' has no attribute 'HTTPRequest'
Error logged during startup, exiting...
0.03 fix 0.02
0.04 add catch X-Track-Id ,use for sign-in-post later
wait structure want x, f(x) =y;
0.05 output file use unified prefix ,which easy to see or move to _old file nok,dismiss the idea2510140913because auto-handle txt file don't require human eye select.
# sign.py sign post action
0.01 fail to select repeat content
0.02 fix 0.01
0.04 skip 0.03 to number same with save-tokwn. add X-Track id; test ok: (X-Track-id used for posting to sign) same with (catched X-Track-id)
ssl chk fail to post;
0.05 output file use unified prefix ,which easy to see or move to _old file nok;2510140913 Dismiss the idea because auto-handle txt file don't require human eye select.
fix 0.04 post error:requests.post(URL, headers=headers, json=request_body, timeout=timeout,**verify=False**);
one structue:
未完成,还没有去做 nok, not ok,wait
test 不好 否定,做了结果不行 ng
two plan:
ng ; test ng
from0.06:embeded, make all step auto v1.6.2.2
0.06 modify to exec by main p:cotroller.py
0.07 fix 0.06 exit, [ERROR] 输入文件未找到: session_token_all.txt ,handle no session token.txt情况;fail to filter repeat token,that's say uniq.txt
[ERROR] 输入文件未找到: session_token_all.txt yes,just return/exit def to main
[WARN] 文件 session_token_all.txt 不存在,跳过本轮main exit
0.071 only test it ok
0.08 fix 0.07:
guess:exit/stop controller too fast to parse and post sign action ng
def read_token(): try: if not os.path.exists(TOKEN_FILE):return None **mislead** while not os.path.exists(TOKEN_FILE):
0.09 exit judge improve:modify together with controller-0.04.py
main return not means run_with_args(infile, delay, mask) turn
0.10 #controller.py-0.06;
0.11 未登录也 code200;改 判断返回里有 coupen_value;有问题的,万一有两个token,就不行吧 应该每个 循环里 判断一次 reponse body.但是我们不管
# close.py loop if fail
0.01 close miniprogram by window
TRASH:
reopen_miniprogram-0.07.py compared to windows close, not stable