首页 > 其他分享 >【安卓逆向】迷谷音乐的音乐接口分析

【安卓逆向】迷谷音乐的音乐接口分析

时间:2024-05-06 23:56:28浏览次数:24  
标签:name song url 安卓 音乐 迷谷 headers print id

闲来无事,逆向一下音乐软件吧

软件挂上Justtrustme模块,charles代理挂上,开始搜索,抓包

不是哥们,歌曲url摆我脸上,加密都不加密一下的吗,直接python开梭

import requests
import time

timestamp = int(time.time() * 1000)

url = "http://app.c.nf.migu.cn/MIGUM2.0/strategy/listen-url/v2.4"
headers = {
    "gsm": "",
    "randomsessionkey": "000000",
    "mgm-user-agent": "Redmi Note 8 Pro",
    "User-Agent": "Mozilla/5.0 (Linux; U; Android 9; zh-cn; Redmi Note 8 Pro Build/PPR1.180610.011) AppleWebKit/533.1 (KHTML, like Gecko) Version/5.0 Mobile Safari/533.1",
    "channel": "0146931",
    "language": "Chinese",
    "ua": "Android_migu",
    "mode": "android",
    "appId": "music",
    "brand": "Redmi",
    "recommendstatus": "1",
    "version": "7.41.8",
    "mgm-Network-type": "04",
    "mgm-network-operators": "01",
    "mgm-Network-standard": "01",
    "Accept-Language": "zh-CN,zh;q=0.8",
    "subchannel": "",
    "HWID": "",
    "OAID": "",
    "platform": "Redmi Note 8 Pro",
    "userLevel": "4",
    "osVersion": "Android 9",
    "pkgName": "cmccwm.mobilemusic",
    "verify": "verify",
    "logId": "1714996870709",
    "os": "Android 9",
    "token": "848401000134020058526B4D355130553052446734516B457952454977517A524740687474703A2F2F70617373706F72742E6D6967752E636E2F6E303030312F4039393538623562663737343234333833393630616436313830643562333939610300040104811E0400063232303032340500164E6A51784F5756695A5455794F5463794E4749795977FF0020EA2D08CF840A637AF791B10AA53E279ED55F6E55C300D44A10A3F6E21FA5E6E9",
    "Connection": "keep-alive",
    "Host": "app.c.nf.migu.cn",
    "Accept-Encoding": "gzip",
    "signVersion": "V004",
    "sign": "06689DDC2858127819B58D6A4F1634B8",
    "timestamp": str(timestamp),
    "aversionid": "DF94878D9AA2AB8F639A8BA4D0AC9D74C8C6858D999DA7BA6AC284A18B80986EC596B8898EA9D3BD6B948F9D8C819D7399DFD0D397A4A39197C3BCA286829E7397C586BADDECEE896B93859E8A8195739796828991A5EE8969928BA68D82A07597988B8B",
    "Pragma": "no-cache",
    "Cache-Control": "no-cache",
}

params = {
    "albumId": "1140538141",
    "lowerQualityContentId": "600910000008056506",
    "netType": "01",
    "resourceType": "2",
    "songId": "5460",
    "toneFlag": "PQ",
}

response = requests.get(url, headers=headers, params=params).json()

#print(response)

singer_name = response["data"]["song"]["singerList"][0]["name"]
song_name = response["data"]["song"]["songName"]
song_url = response["data"]["url"]
print("歌手==>>", singer_name)
print("歌名==>>", song_name)
print("歌曲地址==>>", song_url)

输出结果

经过一通分析,接口信息分析完毕:

import requests
import time

timestamp = int(time.time() * 1000)


def get_song_info(url,headers):
    res=requests.get(url,headers=headers).json()
    #print(res)
    #获取全部歌曲信息
    for item in res["data"]["contents"][0]["contents"]:
        song_name = item["txt"]
        content_id = item["resId"]
        abbum_name = item["txt3"] #专辑名
        album_id = item["songItem"]["albumId"]
        song_id = item["songItem"]["songId"]
        print("专辑名:", abbum_name)
        print("专辑id==>>", album_id)
        print("歌曲名:", song_name)
        print("内容id==>>", content_id)
        print("歌曲id==>>", song_id)
        params = {
        "albumId": str(album_id),
        "lowerQualityContentId": str(content_id),
        "netType": "01",
        "resourceType": "2",
        "songId": str(song_id),
        "toneFlag": "PQ",
        }
        get_song_data(url_song,headers,params)
        

def get_song_data(url,headers,params):
    response=requests.get(url,headers=headers,params=params).json()
    #print(response)
    singer_name = response["data"]["song"]["singerList"][0]["name"]
    song_name = response["data"]["song"]["songName"]
    song_url = response["data"]["url"]
    print("歌手==>>", singer_name)
    print("歌名==>>", song_name)
    print("歌曲地址==>>", song_url)



#url = "http://app.c.nf.migu.cn/MIGUM2.0/strategy/listen-url/v2.4"
headers = {
    "gsm": "",
    "randomsessionkey": "000000",
    "mgm-user-agent": "Redmi Note 8 Pro",
    "User-Agent": "Mozilla/5.0 (Linux; U; Android 9; zh-cn; Redmi Note 8 Pro Build/PPR1.180610.011) AppleWebKit/533.1 (KHTML, like Gecko) Version/5.0 Mobile Safari/533.1",
    "channel": "0146931",
    "language": "Chinese",
    "ua": "Android_migu",
    "mode": "android",
    "appId": "music",
    "brand": "Redmi",
    "recommendstatus": "1",
    "version": "7.41.8",
    "mgm-Network-type": "04",
    "mgm-network-operators": "01",
    "mgm-Network-standard": "01",
    "Accept-Language": "zh-CN,zh;q=0.8",
    "subchannel": "",
    "HWID": "",
    "OAID": "",
    "platform": "Redmi Note 8 Pro",
    "userLevel": "4",
    "osVersion": "Android 9",
    "pkgName": "cmccwm.mobilemusic",
    "verify": "verify",
    "logId": "1714996870709",
    "os": "Android 9",
    "token": "848401000134020058526B4D355130553052446734516B457952454977517A524740687474703A2F2F70617373706F72742E6D6967752E636E2F6E303030312F4039393538623562663737343234333833393630616436313830643562333939610300040104811E0400063232303032340500164E6A51784F5756695A5455794F5463794E4749795977FF0020EA2D08CF840A637AF791B10AA53E279ED55F6E55C300D44A10A3F6E21FA5E6E9",
    "Connection": "keep-alive",
    "Host": "app.c.nf.migu.cn",
    "Accept-Encoding": "gzip",
    "signVersion": "V004",
    "sign": "06689DDC2858127819B58D6A4F1634B8",
    "timestamp": str(timestamp),
    "aversionid": "DF94878D9AA2AB8F639A8BA4D0AC9D74C8C6858D999DA7BA6AC284A18B80986EC596B8898EA9D3BD6B948F9D8C819D7399DFD0D397A4A39197C3BCA286829E7397C586BADDECEE896B93859E8A8195739796828991A5EE8969928BA68D82A07597988B8B",
    "Pragma": "no-cache",
    "Cache-Control": "no-cache",
}

# params = {
#     "albumId": "1000001920",
#     "lowerQualityContentId": "600902000006889102",
#     "netType": "01",
#     "resourceType": "2",
#     "songId": "3790946",
#     "toneFlag": "PQ",
# }
url_song = "http://app.c.nf.migu.cn/MIGUM2.0/strategy/listen-url/v2.4"
for num in range(1,8):
    url_song_info=f"https://app.c.nf.migu.cn/bmw/singer/song/v1.0?pageNo={num}&singerId=112&type=1"
    params=get_song_info(url_song_info,headers)
#print(response)
#get_song_data(url,headers,params)

等我有时间再完善一下脚本

标签:name,song,url,安卓,音乐,迷谷,headers,print,id
From: https://www.cnblogs.com/GGbomb/p/18175994

相关文章

  • 【安卓逆向】MotionNinja会员功能的解锁分析
    这次的要分析的软件是......
  • 读天才与算法:人脑与AI的数学思维笔记16_音乐图灵测试
    1.      艾米1.1.        人工智能作曲家1.1.1.          分析机可能会生成任意复杂程度、精细程度的科学的音乐作品1.1.1.1.           阿达·洛夫莱斯1.1.2.          巴赫的作品是大多数作曲家开始学习创作的起点,也是......
  • 响应式动漫音乐/个人博客杂志主题国漫FM模板
    国漫FM主题V1.8是以Ajax加以CSS动画的方式,很好的将优雅的设计感和极度精简的代码同时表现了出来,进而缔造出这样一款十分经典的名为Alwaysforyou的WordPress博客主题。正如作者自己所言:如果你想让你的WordPress博客看起来个性十足。FM主题为响应式格子布局(瀑布流),是一款......
  • 详解安卓架构入门
    准备首先进入安卓架构入门的代码仓库:AndroidArchitectureStarterTemplates:https://github.com/android/architecture-templates先看看介绍,简单分析一下:架构入门的模板UI界面非常简陋Navigation导航协程和FlowHilt依赖注入Hilt虚假数据进行UI测试提供了两个......
  • 一款非常强大的从电影中提取人声、提取音乐、提取特效声的AI工具
    NovaVSS是以VSS领域最顶级的人工智能算法为基础,搭载了经大量电影电视数据训练、调优后的AI模型的新一代音视频音轨分离工具。是行业内专门分离电影、电视音轨的新一代最强音视频音轨分离工具,是非常好用的从电影中提取人声、提取背景音乐、提取特效声工具NovaVSS用途从电影电......
  • react native cli 替换安卓应用图标
    1.拿到需要替换的logo图标,最好是1024×1024尺寸。2.根据原图生成不同尺寸的logo:有很多类似功能的网站,这里我使用的是图标工厂图标工厂地址:图标生成网站首先上传图片然后可以配置一些其他选项如圆角等等:上传后会看到预览效果:3.替换项目中的logo图标:找到图标位置:项......
  • flutter中调安卓的方法
    安卓packagecom.example.xcx_dashan_app;importio.flutter.embedding.android.FlutterActivity;importandroid.annotation.SuppressLint;importandroid.content.Intent;importandroid.os.Bundle;importio.flutter.embedding.engine.FlutterEngine;importandroid......
  • Suno:一键生成原创音乐的AI!还不赶紧体验一下?
    最近一两年,AI的发展是飞速的,从AI聊天到AI绘画,再到AI视频,一次一次的刷新我们的认知,最近AI一键生成音乐也出来了。不知道大家有没有刷到过。 今天盘哥就来把它分享给大家,你也可以一键生成专属于自己的音乐。 01-Suno(网站)它就是一个可以一键生成音乐的AI网站,我测试的时候是......
  • 安卓移动端monkey自动化测试
    monkey是安卓平台的一个命令行工具,用来对应用程序进行随机的自动化测试,主要是用来检测程序的稳定性、发现崩溃crash和程序无反应(ANR)的问题,由于monkey发的是随机事件,所以可以使用monkey来对应用程序做压力测试,验证程序的可靠性。前期步骤:需要用usb将电脑和安卓设备连接到一起,打开......
  • 安卓逆向训练
    Simplecheck点开a函数,是一个check函数编写脚本a=[0,0x8BBD6FE,205327308,0x59E0C2D,138810487,408218567,0x4A42485,0x443BE85,0x21929A0A,559010506,449018203,576200653,307283021,0x1BDF218B,314806739,0x1459AAFB,0x1459AAFB,0x1C039BBC,0x18E61B76,......