{"id":19168017,"url":"https://github.com/tisfeng/modify_videos_md5","last_synced_at":"2025-04-09T07:08:16.155Z","repository":{"id":49523840,"uuid":"483489034","full_name":"tisfeng/modify_videos_md5","owner":"tisfeng","description":"批量修改视频文件的 md5 哈希，可简单用于上传网盘防审查和谐。 Batch modify the md5 hash of video files, which can be easily used for uploading online disk to prevent censorship and harmony. ","archived":false,"fork":false,"pushed_at":"2025-01-26T08:38:20.000Z","size":41,"stargazers_count":87,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T04:09:31.639Z","etag":null,"topics":["anti-censorship","bash-script","hash","md5"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tisfeng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-20T03:09:25.000Z","updated_at":"2025-03-31T17:23:03.000Z","dependencies_parsed_at":"2023-01-20T09:29:55.863Z","dependency_job_id":null,"html_url":"https://github.com/tisfeng/modify_videos_md5","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tisfeng%2Fmodify_videos_md5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tisfeng%2Fmodify_videos_md5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tisfeng%2Fmodify_videos_md5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tisfeng%2Fmodify_videos_md5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tisfeng","download_url":"https://codeload.github.com/tisfeng/modify_videos_md5/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994121,"owners_count":21030050,"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":["anti-censorship","bash-script","hash","md5"],"created_at":"2024-11-09T09:40:49.556Z","updated_at":"2025-04-09T07:08:16.137Z","avatar_url":"https://github.com/tisfeng.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 批量修改视频文件的 md5\n\n## 简介\n\n批量修改视频文件的 md5 哈希，可简单用于上传网盘防审查和谐。\n\n[modify-file-hash](https://github.com/tisfeng/modify-file-hash) 是该项目的一个 `Raycast` 扩展版本，除了修改文件哈希，还支持对文件进行 zip 加密压缩和提取，使用更方便，推荐使用。\n\n## 缘起\n\n在把一些电影上传到阿里云盘做备份时，发现也会被和谐，尤其各类小电影更是频频遭重，很烦。穷则思变，推测这类网络审查的原理之一是检测视频文件的 md5 或 sha1 哈希值，于是就有了通过修改视频 md5 来骗过审查的想法。(另一种方式是将视频加密压缩，麻烦但也更可靠)\n\n之前没接触过脚本，临时去学了一下 [Bash 脚本教程](https://wangdoc.com/bash/intro.html)，然后在谷歌和 `GitHub Copilot` 的帮助下编写了人生第一个 shell 脚本。\n\n![](https://tva1.sinaimg.cn/large/e6c9d24egy1h1ioyvdjpbj21c00u040d.jpg)\n\n## 使用\n\n**把 `modify_videos_md5.sh` 脚本放到视频文件所在的目录下，然后 `终端` 进入该目录，执行以下脚本，即可修改目录下所有视频文件的 md5。 另外，该脚本可多次使用，且每次执行都会修改所有视频文件的 md5。**\n\n```bash\n# 在视频文件所在的目录下运行\nbash modify_videos_md5.sh\n```\n\n![](https://tva1.sinaimg.cn/large/e6c9d24egy1h1iv9r7db9j21ac0u0n13.jpg)\n\nPS：由于一些网盘具有秒传功能，这个的实现也是靠比对文件哈希值，因此建议只修改可能会被审查和谐的视频文件，其他学习资料就不要多此一举了。。\n\n（其中 `restore_videos_md5.sh` 用于恢复当前目录下所有文件的 md5，需与 `modify_videos_md5.sh` 搭配使用。）\n\n\n\n## 后续 😅\n\n额，最近阿里云盘的审查技术似乎升级了，突然账号就被封了。。。阿里不讲武德，不是和谐视频，竟直接封号，这样谁还敢把资料放你云盘上？莫名其妙哪一天账号就没了，谁还敢跟你玩。 另外看了一下，同样的一份视频在百度网盘还好好的 😓。\n\n总之，不推荐使用这种简单方式抵抗审查了，非要用的话，还是加密压缩吧。或直接上 NAS，一劳永逸。\n\n![image-20221024110433492](https://raw.githubusercontent.com/tisfeng/ImageBed/main/uPic/image-20221024110433492-1666580673.png)\n\n## 原理\n\n核心代码其实就一行，在文件末尾追加字符：\n\n```bash\n# 将字符串追加到文件末尾，例如 echo 'a' \u003e\u003e video.mp4\necho -n \"#1024\" \u003e\u003e $file\n```\n\n\n\n## 参考\n\n[如何改变一段视频文件的MD5? - Yang的回答 - 知乎](https://www.zhihu.com/question/25378331/answer/80903615)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftisfeng%2Fmodify_videos_md5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftisfeng%2Fmodify_videos_md5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftisfeng%2Fmodify_videos_md5/lists"}