{"id":20017345,"url":"https://github.com/devlarley/wingfox-downloader","last_synced_at":"2025-05-04T22:31:56.967Z","repository":{"id":249798235,"uuid":"832588563","full_name":"DevLARLEY/wingfox-downloader","owner":"DevLARLEY","description":"Hooks lib_player.js to download videos protected by WASM and AES.","archived":false,"fork":false,"pushed_at":"2024-10-09T13:22:15.000Z","size":15425,"stargazers_count":9,"open_issues_count":2,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T13:49:56.491Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevLARLEY.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-23T10:22:59.000Z","updated_at":"2025-02-23T10:44:05.000Z","dependencies_parsed_at":"2024-07-23T12:30:42.297Z","dependency_job_id":"7ea6c009-6f74-49af-bb02-06f052869db2","html_url":"https://github.com/DevLARLEY/wingfox-downloader","commit_stats":null,"previous_names":["devlarley/wingfox-downloader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevLARLEY%2Fwingfox-downloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevLARLEY%2Fwingfox-downloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevLARLEY%2Fwingfox-downloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevLARLEY%2Fwingfox-downloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevLARLEY","download_url":"https://codeload.github.com/DevLARLEY/wingfox-downloader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252408413,"owners_count":21743117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T08:15:38.961Z","updated_at":"2025-05-04T22:31:51.953Z","avatar_url":"https://github.com/DevLARLEY.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WingFox Downloader\r\nA hooked version of the lib_player.js, that allows for YUV frame extraction.\r\n\r\n## Requirements\r\n+ [Python 3.12](https://www.python.org/)\r\n+ [NodeJS 14.14.0](https://nodejs.org/) or above\r\n+ [ffmpeg](https://ffmpeg.org/)\r\n\r\n## Tested Operating Systems\r\n+ Windows\r\n+ Linux (Ubuntu)\r\n\r\n## Installation\r\n+ Install the `requirements.txt` file\r\n\r\n## Protection Levels\r\nVideos have to be either decrypted using AES or the built-in WASM decrypter.\r\nWASM will be used if the key is 32 bytes in length and AES when it's 16 bytes in length. \\\r\nIf a video protected using AES, then it's highly likely that the headers of each video fragment are also encrypted using AES.\r\nBig thanks to Novia for posting [this](https://forum.videohelp.com/attachments/80815-1721376096/QQ%E6%88%AA%E5%9B%BE20240719160116.png).\r\n\r\nThere are also two different versions of lib_players. A normal one and one called 'next'. \r\nThe only difference is that the 'next' version also includes the demuxer in WASM, so I had to copy over the JavaScript implementation of the demuxer for the normal version, hence the file called `demuxer.js`.\r\n\r\n\r\n## main.py\r\nBased on [https://github.com/gyozaaaa/the-fox-that-drank-redbull/blob/master/wingfox.py](https://github.com/gyozaaaa/the-fox-that-drank-redbull/blob/master/wingfox.py) \\\r\nUsage:\r\n```ruby\r\nusage: python main.py [-h] --id ID --cookie COOKIE [--output OUTPUT] [--subtitles] [--debug]\r\n\r\nAuthor: github.com/DevLARLEY Credits: github.com/gyozaaaa\r\n\r\noptions:\r\n  -h, --help       show this help message and exit\r\n  --id ID          WingFox Video ID Example: wingfox.com/p/\u003ccourse_id\u003e/\u003cvideo_id\u003e Shall be obtained from the 'get_video_url' request if not present in the URL\r\n  --cookie COOKIE  WingFox yiihuu_s_c_d/PHPSESSID Cookie\r\n  --output OUTPUT  Output file name\r\n  --subtitles      Save subtitles\r\n  --debug, --d     Print debug information\r\n```\r\n\r\nCombines all steps mentioned here to download a video based on a video_id.\r\n\r\n\r\n## decrypt_1.js / decrypt_2.js\r\nThese scripts hook the lib_player library which contains the WASM decrypter. \r\nThey are able to decrypt a single fragment of the manifest.\r\n\r\nTheir usage:\r\n````ruby\r\nUsage: node decrypt.js \u003cinput_fragment\u003e \u003coutput_fragment\u003e \u003ckey\u003e \u003civ\u003e \u003ctoken\u003e \u003cmh/seed_const\u003e \u003cfragment_index\u003e\r\n- input_fragment: Input fragment name\r\n- output_fragment: Output fragment name\r\n- key: 32 byte key\r\n- iv: 16 byte iv\r\n- token: Video token, Example: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee-ff\r\n- seed_const: Video seed, Example: 130\r\n- fragment_index: Index of fragment in manifest, starting at 0\r\n````\r\n\r\n+ Key: Obtained by appending /playsafe/v12/ or /playsafe/v13/ depending on the lib_player version to the Key URI path inside the manifest\r\n+ IV: Contained in the manifest\r\n+ Token: Obtained from this endpoint: `https://www.wingfox.com/polyv/polyv_get_token.php?video_id={video_id}`\r\n+ Seed: Obtained from the JSON metadata endpoint at: `https://player.polyv.net/secure/{vid}.json` \\\r\n\r\nSee `main.py` for more info.\r\n\r\n## N_m3u8DL-RE-WingFox\r\nA modified version of N_m3u8DL-RE to download (and decrypt, if needed) the manifest.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlarley%2Fwingfox-downloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevlarley%2Fwingfox-downloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlarley%2Fwingfox-downloader/lists"}