只提供学习研究使用,请勿非法使用

应为我河南这个疫情比较严重,闲着没有事情在家上网课,就看见这个赞挺好玩

昨天我在老师钉钉直播叫赞刷到了20多亿,应为int类型的最大值2147483647所以赞最多只能刷到2147483647到后面赞就不显示了

下面我就分享一下我的思路

a

思路

首先得判断他是怎么进行点赞增加的,可以抓包进行测试看看

用wireshark进行抓包,发是被加了密的,看不出来是什么东西

image-20210909150805431

用burp suite工具截断代理,通过伪造证书进行https解密
原理,证书内容都是一样的,就是公钥信息是不同的,请求的内容截断代理会吧自己的私钥,解密会话密钥,会话密钥在解密出成明文数据内容

生成证书

image-20210909153013973

image-20210909153116700

image-20210909153133578

我叫代理设置成自己的物理机的ip,应为我钉钉是在虚拟机里面测试的

image-20210909151701656

钉钉代理设置下面这样,直接设置系统代理掺杂了其他应用的数据包分析去了比较麻烦

image-20210909152249660

我测试可以看见burp是可以进行抓取到数据包的

image-20210909152421031

发现登录的时候他报错了,他登录的时候可能不是用的http/https协议没有办法啊

image-20210909155537305

他这个钉钉有好几种代理,但是我看见了浏览器代理,应为浏览器都是走的http/https协议的

但是他这个代理不能输出地址端口

image-20210909155942607

我就怀疑是能不能设置系统代理他就可以了,发就是设置系统代理,然后他就会自动填充

image-20210909160127548

测试还是可以连接到服务器端

image-20210909160229653

但是登录还登录不上去

image-20210909162103845

我用wireshark查看他是什么协议进行请求的,系统还是用的burp代理,wireshark监听网卡的全部流量,,

登录应该是用的这个,burp应该是抓取不了的

image-20210909163304441

代理手机进行抓包用burp看看能不能抓到

先叫burp的证书安装上

image-20210909164551052

image-20210909164749011

image-20210909164803470

image-20210909164852336

image-20210909164906624

设置手机wifi代理

image-20210909165008330

还是抓不到

image-20210909170515518

burp我是真的想不到有什么方法可以获取数据包了

Fiddler数据包抓取,也算是一个web代理工具,可以进行http/https

也可以解密HTTPS的,安装自己的证书

这个软件是

image-20210909171635715

使用浏览器代理

image-20210909171828752

可以正常登录

image-20210909171943369

进入直播间

发现时不时的都会发出这个请求

image-20210910170127257

查看一下原文

image-20210909172707005

分析一下文件,可以看见这个请求的参数非常多

发现每次请求头里面都有一个Referer ,感觉赞肯定给这个有关

image-20210910170430686

看一下,发现是一个直播

image-20210910170934252

他应该是一个m3u8直播的,只是判断,可以看见下面请求里面有一个http://dtlive-sz-hls.dingtalk.com/live/fe97ec3a-96ac-498e-a6c3-885ff4498980.m3u8?auth_key=1633855156-0-0-d5b07d9b69bf93d1f51553a6a8fa920d&cid=a7ab5d9d3b265c490b83128c67899de4&token2=b4a83c70b58ad52e3e6f0c5b873b348f9XPSIyZYnsdWzV4zbkAvnoTMJEscAWVZ90m8380nhi21PfKkKTtYJ33Z-YDjEY0Np6YSfi0wYCNslAra0aqxPAqYX5wcpaTn58FUxWF_URI=

1
2
3
4
5
6
7
8
9
10
11
12
GET /r.png?f=b&uid=8b95c60b-3b5f-40f9-b44f-76abaa27f883&userNick=614223570&times=1&_t=8244137689&tag=6.0.26-Release.9039987&type=log&msg=[live-playback-room][/r/Adaptor/LiveStream/getLiveDetail success][response]{"liveInfo":{"liveUuid":"fe97ec3a-96ac-498e-a6c3-885ff4498980","anchorId":614223570,"title":"群直播 2021-09-10","coverUrl":"https://dtlive-sz.oss-cn-shenzhen.aliyuncs.com/cover/fe97ec3a-96ac-498e-a6c3-885ff4498980_group_live_cover.jpg","inputStreamUrl":"rtmp://dtlive-sz-push.dingtalk.com/live/fe97ec3a-96ac-498e-a6c3-885ff4498980?auth_key=1633855051-0-0-114d4efc70cb3d8df0550c9e5a6462d1","status":1,"isLandscape":0,"codeLevel":3,"isLiveAbord":0,"publicLandingUrl":"https://h5.dingtalk.com/group-live-share/index.htm?encCid=a7ab5d9d3b265c490b83128c67899de4&liveUuid=fe97ec3a-96ac-498e-a6c3-885ff4498980","viewerShareType":0,"disableThumbup":false,"linkMicType":0,"anchorReportStatusList":[],"anchorDevice":"Android","enableH265":false,"liveInteractionSetting":{"disableThumbup":false,"ext":{}},"recordSeenLevel":0},"statistics":{"memberCount":0,"pv":6,"uv":0,"onlineCount":0,"praiseCount":0,"messageCount":0,"viewerCount":0},"liveUrlHls":"http://dtlive-sz-hls.dingtalk.com/live/fe97ec3a-96ac-498e-a6c3-885ff4498980.m3u8?auth_key=1633855156-0-0-d5b07d9b69bf93d1f51553a6a8fa920d&cid=a7ab5d9d3b265c490b83128c67899de4&token2=b4a83c70b58ad52e3e6f0c5b873b348f9XPSIyZYnsdWzV4zbkAvnoTMJEscAWVZ90m8380nhi21PfKkKTtYJ33Z-YDjEY0Np6YSfi0wYCNslAra0aqxPAqYX5wcpaTn58FUxWF_URI="}&sampling=1&monitorType=prodCommonXflush&monitorGroupType=live&spm=dd.live.public.share&sdkType=dingRetcodeSdk HTTP/1.1
Host: retcode.taobao.com
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 dingtalk-win/1.0.0 nw(0.14.7) DingTalk(6.0.26-Release.9039987) Mojo/1.0.0 Native AppType(release) Channel/201200
Accept: image/avif,image/webp,image/apng,image/*,*/*;q=0.8
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: no-cors
Sec-Fetch-Dest: image
Referer: https://h5.dingtalk.com/group-live-share/index.htm?type=0&cid=42337584319&liveUuid=fe97ec3a-96ac-498e-a6c3-885ff4498980&anchorId=614223570
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9

说明这个fe97ec3a-96ac-498e-a6c3-885ff4498980和上面的liveUuid就是判断直播的重要的东西

是可以直接就一点直播的内容给下载下来的

image-20210910172248159

1
2
3
4
5
6
7
8
9
10
11
12
GET /r.png?f=b&uid=8b95c60b-3b5f-40f9-b44f-76abaa27f883&userNick=614223570&times=1&_t=82441376729&tag=6.0.26-Release.9039987&api=https://lv.dingtalk.com/config/getH5LiveConfig&issucess=true&delay=2565&msg=200&detail=success&type=retcode&sampling=1&monitorType=prodCommonXflush&monitorGroupType=live&logBizType=ddVideoLogSdk&spm=dd.live.public.share&sdkType=dingRetcodeSdk HTTP/1.1
Host: retcode.taobao.com
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 dingtalk-win/1.0.0 nw(0.14.7) DingTalk(6.0.26-Release.9039987) Mojo/1.0.0 Native AppType(release) Channel/201200
Accept: image/avif,image/webp,image/apng,image/*,*/*;q=0.8
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: no-cors
Sec-Fetch-Dest: image
Referer: https://h5.dingtalk.com/group-live-share/index.htm?type=0&cid=42337584319&liveUuid=fe97ec3a-96ac-498e-a6c3-885ff4498980&anchorId=614223570
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9

1
https://lv.dingtalk.com/interaction/createLike?uuid=liveUuid&count=要刷的数量

自己写了一个多线程get请求简单的脚本,下面这个脚本大概1秒就千万赞

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import threading
import requests

def thread_func():
r = requests.get('https://lv.dingtalk.com/interaction/createLike?uuid=9659bdb5-69ec-46e3-9a35-f9beb531623d&count=99999')


threads = []
a=0
for _ in range(1000): # 线程
a = a+1
t = threading.Thread(target=thread_func)
threads.append(t)
for t in threads:
t.start()

image-20210909185437891

最笨的方法

这个方法只能刷大概几万,就是用Pythonpyautogui库进行模拟鼠标点击,而且还不能多线程进行点击

pyautogui这个库大部分都是写一些自动化的脚步,比如游戏辅助,自动化刷办公,只要是鼠标键盘操作的都可以实现

他的基本的使用

屏幕操作

获得屏幕分辨率

1
print(pyautogui.size())

image-20210909193426775

image-20210909193532129

屏幕截图

1
2
a = pyautogui.screenshot()
a.save('要截图的名字')

image-20210909193913485

image-20210909193932278

位置定位

locateOnScreen方法可以获得图片的位置

1
number7_location = pyautogui.locateOnScreen('要定位的图片')

演示

下面我就获得我的电脑的wifi的这个地方的位置

image-20210909194333942

先叫这个图给截图下来

image-20210909194459481

1
2
3
4
5
import pyautogui 

number7_location = pyautogui.locateOnScreen('a.png') # locateOnScreen获得图片的位置
button7location = pyautogui.center(number7_location) # 叫x,y输出出来
print(button7location) # 返回屏幕所在位置

image-20210909194927385

鼠标操作

  • 鼠标位置

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    print(pyautogui.position()) #获得当前的鼠标的位置if __name__ == '__main__':
    banner_1 = r"""
    ___ _ _ ___
    | __| _| | |___/ __| __ __ _ _ _ _ _ ___ _ _
    | _| || | | |___\__ \/ _/ _` | ' \| ' \/ -_) '_|
    |_| \_,_|_|_| |___/\__\__,_|_||_|_||_\___|_|
    """

    def choose_color_2(cb):

    i = random.choice(range(4))

    if i == 0:
    return "\033[1;32m{}\033[0m".format(cb)
    elif i == 1:
    return "\033[1;31m{}\033[0m".format(cb)
    elif i == 2:
    return "\033[1;33m{}\033[0m".format(cb)
    elif i == 3:
    return "\033[1;36m{}\033[0m".format(cb)

    image-20210909195243167

  • 鼠标点击

    1
    pyautogui.click(点击的位置x是int类型的,点击的位置y是int类型的)
    1
    pyautogui.click(点击的位置x是int类型的,点击的位置y是int类型的,button='left') # 单击左键
    1
    pyautogui.click(点击的位置x是int类型的,点击的位置y是int类型的,button='middle')  # 单击中间
    1
    pyautogui.click(点击的位置x是int类型的,点击的位置y是int类型的,button='right')  # 单击右键
    1
    pyautogui.doubleClick(点击的位置x是int类型的,点击的位置y是int类型的)  # 指定位置,双击左键
    1
    pyautogui.middleClick(点击的位置x是int类型的,点击的位置y是int类型的)  # 指定位置,双击中键
    1
    pyautogui.rightClick(点击的位置x是int类型的,点击的位置y是int类型的)   # 指定位置,双击右键
  • 鼠标控制拖动事件

    • 按当指定位置拖动动

      1
      pyautogui.dragTo(点击的位置x是int类型的,点击的位置y是int类型的,duration=拖动需要的时)  
      演示

    • 按当前鼠标位置拖动

      1
      pyautogui.dragTo(点击的位置x是int类型的,点击的位置y是int类型的,duration=拖动需要的时间) 
      演示

  • 鼠标点击释放

    1
    2
    pyautogui.mouseDown()   # 鼠标的按下
    pyautogui.mouseUp() # 鼠标的放开

下面是我写的简单的一个点赞的脚本

代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import pyautogui

for i in range(50):


number7_location = pyautogui.locateOnScreen('f.png') # 传入按钮的图片

if number7_location!="None":

try:
button7location=pyautogui.center(number7_location)
print(button7location) # 返回屏幕所在位置

for i in range(20):

pyautogui.doubleClick(button7location)
except TypeError:
print("没有找到位置!")
演示