-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmi.sh
39 lines (32 loc) · 917 Bytes
/
mi.sh
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
#!/bin/sh
# rememver to modify the COOKIE & NEXT_START_TRY_TIME
COOKIE="my cookie"
NEXT_START_TRY_TIME=1541642180
# check time
timestamp=`date +%s`
while [ $timestamp -le $NEXT_START_TRY_TIME ]
do
timestamp=`date +%s`
echo "wait 1 seconds"
sleep 1
done
while [ 1 ]
do
# 250
echo "Try 250 ..."
curl -X GET \
'https://hd.c.mi.com/tw/eventapi/api/raffle/drawprize?tag=tw_supersalesday_page&present_id=897' \
-H 'Cache-Control: no-cache' \
-H "Cookie: $COOKIE" \
-H 'Origin: https://event.mi.com' \
-H 'Referer: https://event.mi.com/tw/sales2018/super-sales-day' &
# 100
echo "Try 100 ..."
curl -X GET \
'https://hd.c.mi.com/tw/eventapi/api/raffle/drawprize?tag=tw_supersalesday_page&present_id=896' \
-H 'Cache-Control: no-cache' \
-H "Cookie: $COOKIE" \
-H 'Origin: https://event.mi.com' \
-H 'Referer: https://event.mi.com/tw/sales2018/super-sales-day' &
wait
done