drblgn / rabbit_wasm

rabbitstream wasm extractor
MIT License
19 stars 12 forks source link

Unable to extract Sources or tracks #1

Closed ibz096 closed 6 months ago

ibz096 commented 6 months ago

Environment

uname -rv output:

5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024

Node Version:

v18.17.1

Output

When running: npx ts-node rabbit.ts The program does not return sources or track as per the below output:

{
"sources": [],
"tracks": []
}

This occurs regardless if the xrax value in main is modified or not

steveyout commented 6 months ago

i get the same issue too

drblgn commented 6 months ago

could you send me the embed you are trying to extract ? just tested again with an embed from flixhq seems to be working fine in my environment. The xrax values change over time please keep that in mind.

I'll try it in my windows setup to see if it's related to running it in wsl

Edit: Just tested it in wsl2 with your node version and it seems to be working. Ok i think i might know what the issue is are you trying to open the getSources url from your browser ? that will not work. The program only decodes the sources part and prints that out. I will change it so that it logs out the full response and the decoded source link.

Ok done. Can you try again and post the output ?

steveyout commented 6 months ago

could you send me the embed you are trying to extract ? just tested again with an embed from flixhq seems to be working fine in my environment. The xrax values change over time please keep that in mind.

I'll try it in my windows setup to see if it's related to running it in wsl

Edit: Just tested it in wsl2 with your node version and it seems to be working. Ok i think i might know what the issue is are you trying to open the getSources url from your browser ? that will not work. The program only decodes the sources part and prints that out. I will change it so that it logs out the full response and the decoded source link.

Ok done. Can you try again and post the output ?

i only got an empty array and tested with different ids

steveyout commented 6 months ago

the decode output is an empty array

steveyout commented 6 months ago
Response from getSources:
{
  sources: 'U2FsdGVkX1/6/KzQM5UM4cge6Z+A3fRcG214+UYnuLbl/hP7PvXOcCQvXyX9eG3zXUbuOkDG9zANLmxh+97bT1f2d7zxr0tKAzkyl16V3nBNwzO3IsoSiHCT/ueUCN7E0DVI7gL/otfjFyzKC9ebyy0sCHS7Mrg6r6RNzl8xbPLYIsRA9viZqf35F1cr0CYxNnccAsPPUeoeSt3hJ9BwCijV1uQ4YZxF2AZAIqLcGHjGj7xZVrWgIoSNwt50i0kHQqzAXKP+QQDrzvS2WtZPNubb29D29LvM6UpZ1pLWmlLlstqjejNDn4OEKlv+TamiCwUi+lCqoywfCmV9ACF1ig+z0HrmrWuQlGuSAt2pCdTlsqAI2MfaayNagvcksComVSJaHsKabv8onJQ7r7Nusl8gg7MAjUUcIpJt9qBsMC4u1W/puGcxVE9zofw4PWqABlSExsALYjr9sj3WuCeNhA==',
  tracks: [
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/dut-9.vtt',
      label: 'Dutch',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/eng-2.vtt',
      label: 'English',
      kind: 'captions',
      default: true
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/eng-3.vtt',
      label: 'English - SDH',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/fre-6.vtt',
      label: 'French',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/ger-4.vtt',
      label: 'German',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/ita-7.vtt',
      label: 'Italian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/jpn-8.vtt',
      label: 'Japanese',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/pol-10.vtt',
      label: 'Polish',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/por-11.vtt',
      label: 'Portuguese - Brazilian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/spa-5.vtt',
      label: 'Spanish - Latin American',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/swe-12.vtt',
      label: 'Swedish',
      kind: 'captions'
    }
  ],
  t: 1,
  server: 29
}

 Decoded sources:
[]
ibz096 commented 6 months ago

@drblgn So I might not be understanding here, but I pull the embed from: https://rabbitstream.net/v2/embed-4/WkZJd14dCzvG?z=

So from the above URL i paste in WkZJd14dCzvG into the main function parameter/argument

Main function in rabbit.ts:

main('WkZJd14dCzvG');

Command:

npx ts-node rabbit.ts

Output:

{
  sources: 'U2FsdGVkX19b/Oq+2fVvMJmEi+wqexo92UsXim6j5QDo0ijh9fi4n72mfLPBYUtny0BKkOmXKY68EOtitoNNaTjr9c6Vzcet4voqfNZYOkJRRonGGLFreq2x0gfU0YIS3/SlMG3StxgutWAsQ9cL4F2OpsZPiZ2sqZhjJbpYqyg0ucnmv+XohoV9tqOrgovdrnmtYMflGKPnGtodygy1hdJRTNIDSlr1eg3oobo6EyIjE9L2TziUUIgvLZKAQxmELa5TFWewzsIgAhd7jh21CPAeQ4qWhjhr26M957Nb7cPzqHOjHwqJvDjqxz3fmj+4q1JD7XfWfc17AAkQMvWfJGaHtYza52WZd/vUmqEUZKXksmWNsQXcPExJdveAdDp/GVhOi7SqTGpdBTcGV4FlC/IjNf/HesbQZjDovyFz3fWQrFMD+2C7EKIdk3LZCaypKBTfh5F5SwrqrmMlptJyFQ==',
  tracks: [
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/dut-9.vtt',
      label: 'Dutch',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/eng-2.vtt',
      label: 'English',
      kind: 'captions',
      default: true
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/eng-3.vtt',
      label: 'English - SDH',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/fre-6.vtt',
      label: 'French',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/ger-4.vtt',
      label: 'German',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/ita-7.vtt',
      label: 'Italian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/jpn-8.vtt',
      label: 'Japanese',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/pol-10.vtt',
      label: 'Polish',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/por-11.vtt',
      label: 'Portuguese - Brazilian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/spa-5.vtt',
      label: 'Spanish - Latin American',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/51/b8/51b8dc7ef0494c6229ed90245d8f0f51/swe-12.vtt',
      label: 'Swedish',
      kind: 'captions'
    }
  ],
  t: 1,
  server: 29
}

 Decoded sources:
[]
drblgn commented 6 months ago

WkZJd14dCzvG

nope you are using it correctly. i am not sure why it's not giving you the decoded sources. there is no error output right ? I can't test the embed you gave me because the xrax values change over time. but we can test together if you add me on discord. Discord Username: drblgn

ps: I have only tested this with flixhq embed. so if you are trying to use it with another site can you send me the link on discord ?

drblgn commented 6 months ago

so just tested it with vpn enabled. The issue seems to stem from the cookie element. If you can extract your own cookie and try it it would be great help. i'll try to find out how the cookie is calculated so that people don't have to extract their own cookies.

ps: working on a solution for cookies rn. but if you are able to extract your cookie that starts with 1P_JAR and change the document.cookie element to it, it should work

ibz096 commented 6 months ago

So I updated '1P_JAR' in the code and it successfully decoded the url as per below

{
  sources: 'U2FsdGVkX18K62dnBnLDiOKhnRFjMqAMYHoDBjSKE5irC/Bh2gGG6Wm7E4cpEYifUcPcggLQTSuv8cx9UW1JkR1DVEAvOFLCNBeFpv1VYMsnxNiFvIYSy7JVzea9+MTkasxMyIZiZNN6TIjfSGhR6/Rh24mUnzJ3DkCglcrQQUhY3JTAWvhIlhjvk7zB2qMUpp1wLrR6VV8Hxd4r5IM/3PB4TzazjZKb/PHrnrN6TWiVAAHnA38ZQWUl2RAUupX0s7G81pAZeQD1cXRntkQ/T2HBYW59uqzfnEpe+RLvdiM4tzsYaEJSg7FNRen0UtPCdLkT5qfcAbLK9iriKhyBEcOFodF5UhG4OKQEcPigYcPBtkCG4etdHcg5DznqcbCniRDvvAtRVFEPBz2ip8dfabwhgru2wq7hBqR/TpTDF8vtWtQdIxQhdyvUu4lc9k2P8kBTxr0Bohoqi5dFFNCEieBCJb3RK/2pMyUDRuvZR9OcPI8dJ/LoqaqbHqXiSBDA',
  tracks: [
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/ara-5.vtt',
      label: 'Arabic - Arabic',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/bul-6.vtt',
      label: 'Bulgarian - Bulgarian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/chi-7.vtt',
      label: 'Chinese - Chinese Simplified',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/chi-8.vtt',
      label: 'Chinese - Chinese Traditional',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/chi-9.vtt',
      label: 'Chinese - Chinese Yue',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/cze-10.vtt',
      label: 'Czech - Czech',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/dan-11.vtt',
      label: 'Danish - Danish',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/dut-12.vtt',
      label: 'Dutch - Dutch',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/eng-3.vtt',
      label: 'English - English',
      kind: 'captions',
      default: true
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/eng-2.vtt',
      label: 'English - English [Forced]',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/eng-4.vtt',
      label: 'English - English [SDH]',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/est-13.vtt',
      label: 'Estonian - Estonian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/fin-15.vtt',
      label: 'Finnish - Finnish',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/fre-16.vtt',
      label: 'French - French',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/fre-17.vtt',
      label: 'French - French Canadian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/ger-18.vtt',
      label: 'German - German',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/gre-19.vtt',
      label: 'Greek - Greek',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/heb-20.vtt',
      label: 'Hebrew - Hebrew',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/hin-21.vtt',
      label: 'Hindi - Hindi',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/hun-22.vtt',
      label: 'Hungarian - Hungarian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/ind-23.vtt',
      label: 'Indonesian - Indonesian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/ita-24.vtt',
      label: 'Italian - Italian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/jpn-25.vtt',
      label: 'Japanese - Japanese',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/kor-26.vtt',
      label: 'Korean - Korean',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/lav-28.vtt',
      label: 'Latvian - Latvian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/lit-29.vtt',
      label: 'Lithuanian - Lithuanian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/may-30.vtt',
      label: 'Malay - Malay',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/nor-31.vtt',
      label: 'Norwegian - Norwegian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/pol-32.vtt',
      label: 'Polish - Polish',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/por-33.vtt',
      label: 'Portuguese - Portuguese',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/por-34.vtt',
      label: 'Portuguese - Portuguese Brazilian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/rus-35.vtt',
      label: 'Russian - Russian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/slo-36.vtt',
      label: 'Slovak - Slovak',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/slv-37.vtt',
      label: 'Slovene - Slovenian',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/spa-14.vtt',
      label: 'Spanish - European Spanish',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/spa-27.vtt',
      label: 'Spanish - Latin America Spanish',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/swe-38.vtt',
      label: 'Swedish - Swedish',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/tam-39.vtt',
      label: 'Tamil - Tamil',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/tel-40.vtt',
      label: 'Telugu - Telugu',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/tha-41.vtt',
      label: 'Thai - Thai',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/tur-42.vtt',
      label: 'Turkish - Turkish',
      kind: 'captions'
    },
    {
      file: 'https://cc.2cdns.com/0c/68/0c6881b524b5ca5337277cf53f9e65db/ukr-43.vtt',
      label: 'Ukrainian - Ukrainian',
      kind: 'captions'
    }
  ],
  t: 1,
  server: 29
}

 Decoded sources:
[
  {
    file: 'https://x.pollllop.com/_v11/3354e115532b1c1ad1e56fbfd7b11ca932a9f5a3880dc9d66e4719c379ae3a0a9bbb20a80ca444930183bd36501a93f92c6b051b9a986db0fb17f430c8639b90683fc48be63021372f559cd9a3fc2eff87a7761bd42eb1cb33f432b4dc869c027f489d9670fd78085d3c6942a19b734a08947c66b98856d4bb90b349ccfb28ae6c8a277347997b76a8970397bcd5b65e/playlist.m3u8',
    type: 'hls'
  }
]
drblgn commented 6 months ago

just updated the script to automatically find the cookie. try it if it works i will close the issue.

ibz096 commented 6 months ago

It works. I was able to get the decoded sources.