Skip to content

Commit

Permalink
feat: get the best m3u8 without binding device and account (maybe)
Browse files Browse the repository at this point in the history
  • Loading branch information
WorldObservationLog committed Jun 1, 2024
1 parent c04ce9c commit 6cff403
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions m3u8_sv.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
setTimeout(function () {
Java.performNow(function () {
Java.use("com.apple.android.music.common.MainContentActivity");
var SVPlaybackLeaseManagerProxy;
Java.choose("com.apple.android.music.playback.SVPlaybackLeaseManagerProxy", {
onMatch: function (x) {
SVPlaybackLeaseManagerProxy = x
},
onComplete: function (x) {}
});
var HLSParam = Java.array('java.lang.String', ["HLS"])
function getM3U8(adamID) {
var MediaAssetInfo = SVPlaybackLeaseManagerProxy.requestAsset(parseInt(adamID), HLSParam, false)
if (MediaAssetInfo === null) {
return -1
}
return MediaAssetInfo.getDownloadUrl()
}
rpc.exports = {"getm3u8": getM3U8}
})
}, 8000)
2 changes: 1 addition & 1 deletion src/adb.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def hyper_decrypt(self, ports: list[int]):
self.fridaDevice = frida.get_device_manager().get_device(self.device.serial)
self.pid = self.fridaDevice.spawn("com.apple.android.music")
self.fridaSession = self.fridaDevice.attach(self.pid)
with open("m3u8.js", "r") as f:
with open("m3u8_sv.js", "r") as f:
m3u8_script = f.read()
self.m3u8Script = self.fridaSession.create_script(m3u8_script)
self.m3u8Script.load()
Expand Down

0 comments on commit 6cff403

Please sign in to comment.