流媒体NetFlix解锁检测脚本 / A script used to determine whether your network can watch native Netflix movies or not

Overview

netflix-verify

流媒体NetFlix解锁检测脚本,使用Go语言编写

在VPS网络正常的情况下,哪怕是双栈网络也可在几秒内快速完成IPv4/IPv6的解锁判断

鸣谢

  1. 感谢 @CoiaPrant 指出对于地域检测更简便的方法
  2. 感谢 @XmJwit 解决了IPV6 Only VPS无法下载脚本的问题

功能实现

  • 解锁情况判断
  • 地域信息显示
  • 双栈网络测试

由于1.0 Beta版本存在很多问题,而网上大多数都是本项目1.0版本的一键运行命令,请使用下方2.01最新稳定版,请相互转告

相关名词解释

  1. 不提供服务 - 所在的地区NF没开通,连自制剧也看不了
  2. 宽松版权 - 有些NF拍摄的影片不是特别注重版权,所以限制放的很开
  3. 解锁自制剧 - 代表可以看由NF自己拍摄的影片
  4. 解锁非自制剧 - 代表可以看NF买下的第三方版权影片
  5. 地域解锁 - NF在不同的地区可以看的片源都是不同的,有些影片只能在特定区观看

一般通俗意义上来说,需要能看非自制剧才算真正意义上的NF解锁

使用方法

1、部署 golang 环境,执行 go run nf.go 运行本小应用

2、懒人一键运行包(使用编译好的二进制文件执行本小程序)

主下载链接:

wget -O nf https://github.com/sjlleo/netflix-verify/releases/download/2.01/nf_2.01_linux_amd64 && chmod +x nf && clear && ./nf

备用下载链接(支持IPV6):

wget -O nf https://cdn.jsdelivr.net/gh/sjlleo/netflix-verify/CDNRelease/nf_2.01_linux_amd64 && chmod +x nf && clear && ./nf

效果演示图

07e78b00ec35bc32e9434be6937f585d.png

第三方 Linux Shell脚本

这是一个由 @CoiaPrant 开发的shell版本的脚本,支持双栈的检测

https://github.com/CoiaPrant/Netflix_Unlock_Information/

Comments
  • 2.6版本macOS11.2.3运行出错

    2.6版本macOS11.2.3运行出错

    $./nf_2.6_darwin_amd64

    报错信息如下:

    0x11687a0
    0x1168960
    0x1168a00
    0x1168ae0
    0x1168c20
    0x1168ca0
    0x1168dc0
    0x1169180
    0x11692c0
    0x11694c0
    0x11695e0
    0x1169600
    0x11699c0
    0x1169a40
    0x1169c80
    0x1169fc0
    0x116a5a0
    0x116a760
    0x116a800
    

    fatal error: invalid runtime symbol table runtime: panic before malloc heap initialized

    runtime stack:

    bug solved 
    opened by goodryb 9
  • 这个是否是报错?

    这个是否是报错?

    ➜ Desktop uname -m arm64 ➜ Desktop wget -O nf https://github.com/sjlleo/netflix-verify/releases/download/v3.1.0/nf_linux_arm64 && chmod +x nf && ./nf --2022-08-12 15:42:55-- https://github.com/sjlleo/netflix-verify/releases/download/v3.1.0/nf_linux_arm64 正在连接 127.0.0.1:7890... 已连接。 已发出 Proxy 请求,正在等待回应... 302 Found 位置:https://objects.githubusercontent.com/github-production-release-asset-2e65be/341551718/037a03f6-18cc-4546-9699-6fb2f07c743d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220812%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220812T074256Z&X-Amz-Expires=300&X-Amz-Signature=6654de622295f7c5b2ba8d7f87ee7247db91c2a39c89474996ca00085fb90389&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=341551718&response-content-disposition=attachment%3B%20filename%3Dnf_linux_arm64&response-content-type=application%2Foctet-stream [跟随至新的 URL] --2022-08-12 15:42:56-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/341551718/037a03f6-18cc-4546-9699-6fb2f07c743d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220812%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220812T074256Z&X-Amz-Expires=300&X-Amz-Signature=6654de622295f7c5b2ba8d7f87ee7247db91c2a39c89474996ca00085fb90389&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=341551718&response-content-disposition=attachment%3B%20filename%3Dnf_linux_arm64&response-content-type=application%2Foctet-stream 正在连接 127.0.0.1:7890... 已连接。 已发出 Proxy 请求,正在等待回应... 200 OK 长度:4325376 (4.1M) [application/octet-stream] 正在保存至: “nf”

    nf 100%[=======================================================================================================================>] 4.12M 4.55MB/s 用时 0.9s

    2022-08-12 15:42:58 (4.55 MB/s) - 已保存 “nf” [4325376/4325376])

    zsh: exec format error: ./nf

    duplicate invalid 
    opened by jinzGit 3
  • 无法正确测试vps的ipv4

    无法正确测试vps的ipv4

    好几台机器 测试显示

    模式:详细信息模式 [IPv4测试] NetFlix不为您测试的出口IP提供服务

    但用其他脚本测试显示可以解锁 bash <(curl -sSL "https://raw.githubusercontent.com/xb0or/nftest/main/netflix.sh")

    恭喜 你的IP可以打开Netflix 并解锁全部流媒体 区域: NFVDID=BQFMAAEBEHFUSNU78GFBAYVKKIYZYYHAVB2CZGCJ8RQNQHNGD7P8UJ20MMM3VP5RS3JDOTOMNFG9FXUPGHR4ZCBHNL3ZBSNVQYACEYS7KK73DDOP7NDATW%3D%3D;

    if UnblockTest(areaAvailableID, ipv4) { 某些判断出了点问题

    opened by jinwyp 3
  • V2.51解锁判断不准

    V2.51解锁判断不准

    实测老版本是准确的,IPV6解锁了非自制剧。


    ** NetFlix 解锁检测小工具 v2.5 By @sjlleo ** [IPV4测试] NetFlix在您测试的出口IP所在的地区提供服务,宽松版权的自制剧可以解锁 ->> 正在检查是否完整支持自制剧 <<- 支持解锁全部的自制剧 ->> 正在检查支持的NetFlix地区 <<- 不支持解锁非自制剧

    [IPV6测试] NetFlix在您测试的出口IP所在的地区提供服务,宽松版权的自制剧可以解锁 ->> 正在检查是否完整支持自制剧 <<- 支持解锁全部的自制剧 ->> 正在检查支持的NetFlix地区 <<- 支持解锁非自制剧 原生IP地域解锁信息:香港区 NetFlix


    而V2.51则显示: ** NetFlix 解锁检测小工具 v2.51 By @sjlleo ** 模式:简洁信息模式 [IPV4测试] 您的出口IP不能解锁Netflix,仅支持自制剧的观看

    [IPV6测试] 您的出口IP不能解锁Netflix,仅支持自制剧的观看


    bug good first issue solved 
    opened by ymcoming 3
  • 报错为:./nf: not found

    报错为:./nf: not found

    [email protected]:~# wget -O nf https://github.com/sjlleo/netflix-verify/releases/download/v3.1.0/nf_linux_amd64 && chmod +x nf && ./nf --2022-09-03 23:17:36-- https://github.com/sjlleo/netflix-verify/releases/download/v3.1.0/nf_linux_amd64 Resolving github.com... 20.205.243.166 Connecting to github.com|20.205.243.166|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/341551718/77bf6b17-9454-4694-9169-4066a1fd09b6?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220903%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220903T151736Z&X-Amz-Expires=300&X-Amz-Signature=06a0205c62c9cc87e14fac67883f4bf4d7b831481e418bb692b46e354f905bad&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=341551718&response-content-disposition=attachment%3B%20filename%3Dnf_linux_amd64&response-content-type=application%2Foctet-stream [following] --2022-09-03 23:17:36-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/341551718/77bf6b17-9454-4694-9169-4066a1fd09b6?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220903%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220903T151736Z&X-Amz-Expires=300&X-Amz-Signature=06a0205c62c9cc87e14fac67883f4bf4d7b831481e418bb692b46e354f905bad&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=341551718&response-content-disposition=attachment%3B%20filename%3Dnf_linux_amd64&response-content-type=application%2Foctet-stream Resolving objects.githubusercontent.com... 185.199.108.133, 185.199.109.133, 185.199.111.133, ... Connecting to objects.githubusercontent.com|185.199.108.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 4550656 (4.3M) [application/octet-stream] Saving to: 'nf'

    nf 100%[===============================================================================================>] 4.34M 21.8MB/s in 0.2s

    2022-09-03 23:17:37 (21.8 MB/s) - 'nf' saved [4550656/4550656]

    -ash: ./nf: not found

    opened by crzwong 2
  • 程序识别可以观看,但实际无法登录

    程序识别可以观看,但实际无法登录

    返回结果: NetFlix 解锁检测小工具 v3.0 By @sjlleo [IPv4] 您的出口IP完整解锁Netflix,支持非自制剧的观看 NF所识别的IP地域信息:法国

    [IPv6] 您的网络可能没有正常配置IPv6,或者没有IPv6网络接入

    ip:141.145.194.xx

    登录时,提示密码错误,已确定账户没有问题

    opened by nfmd 2
  • OpenWRT 终端无法通过 wget 保存文件至本地

    OpenWRT 终端无法通过 wget 保存文件至本地

    • 运行环境 : x86 openwrt Linux 5.4.199 x86_64
    • 执行的操作 : ./nf
    • 部分报错 : Length: 4550656 (4.3M) [application/octet-stream] Saving to: 'nf'

    2022-08-02 02:09:58 (3.49 MB/s) - 'nf' saved [4550656/4550656] bash: ./nf: No such file or directory

    invalid question 
    opened by meroshyxoqo4 2
  • 提供3合1检测脚本(Netflix + YoutubeCheck + DisneyPlus)

    提供3合1检测脚本(Netflix + YoutubeCheck + DisneyPlus)

    您好,我想问下作者能不能提供3合1检测脚本,Netflix + YoutubeCheck + DisneyPlus 和 IPV4 + IPV6 我提供了类似一个这样的脚本,均采用作者的项目 image 因为有时候很懒惰一个一个复制指令 😂

    [ Netflix-Youtube-DisneyPlus-Check-Availability.zip ](url)

    enhancement 
    opened by samleong123 2
  • 我能提供一些半解锁的机器的信息给您

    我能提供一些半解锁的机器的信息给您

    通过对不同的设备和梯子进行测试,发现了如下规律: 环境说明: 1.梯子(都是使用新加坡线路) 梯子A: 使用dns解锁的方式访问新加坡奈飞,用不了几天就会挂(看不了自制剧,在奈飞的账号里可以看到流媒体地址变成了香港) 梯子B:使用直连ip的方式访问新加坡奈飞,这个没问题 2.设备

    1. AppleTV4K 梯子A正常时,一切正常(可看非自制),梯子被封后就只能看自制了,即便切换上述梯子B后也无法恢复正常,和您对于半解锁的描述一模一样(尝试过重启恢复换账号等一系列操作),只有等几天后使用正常梯子才能恢复
    2. PC 和梯子相关,梯子被封的话就无法看非自制了(自制剧一直没问题),但是切换到上述梯子B后就一切正常了
    3. Sony TV 同上2
    4. 手机&电脑 同上2
    5. PS5&NS 同上2

    我也知道您这边需要的是原生vps的机器,但是实在是全网都没人讨论关于半解锁的问题,这个appletv的表现让我很不爽,常常就是几天看不了,如需我提供什么信息请联系我,感谢!

    opened by jlynnc 1
  • 仅IPV6 机子无法从Github下载,故提供V6+V4代理地址

    仅IPV6 机子无法从Github下载,故提供V6+V4代理地址

    如标题 仅IPV6 机子无法从Github下载,提示 No route to host (IPV6地址也一样) wget -O nf https://github.com/sjlleo/netflix-verify/releases/do wnload/2.52/nf_2.52_linux_amd64 && chmod +x nf && clear && ./nf --2021-03-09 05:52:32-- https://github.com/sjlleo/netflix-verify/releases/downl oad/2.52/nf_2.52_linux_amd64 Resolving github.com (github.com)... 2001:67c:27e4:64::8c52:7903, 140.82.121.3 Connecting to github.com (github.com)|2001:67c:27e4:64::8c52:7903|:443... failed : No route to host. Connecting to github.com (github.com)|140.82.121.3|:443... failed: Network is un reachable. [email protected]:~# wget -O nf https://github.com/sjlleo/netflix-verify/releases/do wnload/2.52/nf_2.52_linux_amd64 && chmod +x nf && clear && ./nf --2021-03-09 05:53:00-- https://github.com/sjlleo/netflix-verify/releases/downl oad/2.52/nf_2.52_linux_amd64 Resolving github.com (github.com)... 2001:67c:2b0:db32:0:1:8c52:7903, 140.82.121 .3 Connecting to github.com (github.com)|2001:67c:2b0:db32:0:1:8c52:7903|:443... co nnected. HTTP request sent, awaiting response... 302 Found Location: https://github-releases.githubusercontent.com/341551718/0c682400-802c- 11eb-9fbd-c6b27edd9ba3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWN JYAX4CSVEH53A%2F20210309%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210309T045 301Z&X-Amz-Expires=300&X-Amz-Signature=2ced6196b29af356f237cf150e643559fb7aa532e 076838c1bd7c9791459abee&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=341 551718&response-content-disposition=attachment%3B%20filename%3Dnf_2.52_linux_amd 64&response-content-type=application%2Foctet-stream [following] --2021-03-09 05:53:01-- https://github-releases.githubusercontent.com/341551718 /0c682400-802c-11eb-9fbd-c6b27edd9ba3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Cre dential=AKIAIWNJYAX4CSVEH53A%2F20210309%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Da te=20210309T045301Z&X-Amz-Expires=300&X-Amz-Signature=2ced6196b29af356f237cf150e 643559fb7aa532e076838c1bd7c9791459abee&X-Amz-SignedHeaders=host&actor_id=0&key_i d=0&repo_id=341551718&response-content-disposition=attachment%3B%20filename%3Dnf _2.52_linux_amd64&response-content-type=application%2Foctet-stream Resolving github-releases.githubusercontent.com (github-releases.githubuserconte nt.com)... 2001:67c:27e4:64::b9c7:6d9a, 2001:67c:27e4:64::b9c7:6e9a, 2001:67c:27 e4:64::b9c7:6f9a, ... Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|2001:67c:27e4:64::b9c7:6d9a|:443... failed: No route to host. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|2001:67c:27e4:64::b9c7:6e9a|:443... failed: No route to host. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|2001:67c:27e4:64::b9c7:6f9a|:443... failed: No route to host. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|2001:67c:27e4:64::b9c7:6c9a|:443... failed: No route to host. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|185.199.110.154|:443... failed: Network is unreachable. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|185.199.111.154|:443... failed: Network is unreachable. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|185.199.108.154|:443... failed: Network is unreachable. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|185.199.109.154|:443... failed: Network is unreachable. [email protected]:~# wget -O nf https://github.com/sjlleo/netflix-verify/releases/do wnload/2.52/nf_2.52_linux_amd64 && chmod +x nf && clear && ./nf --2021-03-09 05:53:05-- https://github.com/sjlleo/netflix-verify/releases/downl oad/2.52/nf_2.52_linux_amd64 Resolving github.com (github.com)... 2001:67c:27e4:64::8c52:7903, 140.82.121.3 Connecting to github.com (github.com)|2001:67c:27e4:64::8c52:7903|:443... failed : No route to host. Connecting to github.com (github.com)|140.82.121.3|:443... failed: Network is un reachable. wget -O nf https://github.com/sjlleo/netflix-verify/releases/do wnload/2.52/nf_2.52_linux_amd64 && chmod +x nf && clear && ./nf --2021-03-09 05:53:51-- https://github.com/sjlleo/netflix-verify/releases/downl oad/2.52/nf_2.52_linux_amd64 Resolving github.com (github.com)... 2001:67c:2b0:db32:0:1:8c52:7903, 140.82.121 .3 Connecting to github.com (github.com)|2001:67c:2b0:db32:0:1:8c52:7903|:443... co nnected. HTTP request sent, awaiting response... 302 Found Location: https://github-releases.githubusercontent.com/341551718/0c682400-802c- 11eb-9fbd-c6b27edd9ba3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWN JYAX4CSVEH53A%2F20210309%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210309T045 301Z&X-Amz-Expires=300&X-Amz-Signature=2ced6196b29af356f237cf150e643559fb7aa532e 076838c1bd7c9791459abee&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=341 551718&response-content-disposition=attachment%3B%20filename%3Dnf_2.52_linux_amd 64&response-content-type=application%2Foctet-stream [following] --2021-03-09 05:53:52-- https://github-releases.githubusercontent.com/341551718 /0c682400-802c-11eb-9fbd-c6b27edd9ba3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Cre dential=AKIAIWNJYAX4CSVEH53A%2F20210309%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Da te=20210309T045301Z&X-Amz-Expires=300&X-Amz-Signature=2ced6196b29af356f237cf150e 643559fb7aa532e076838c1bd7c9791459abee&X-Amz-SignedHeaders=host&actor_id=0&key_i d=0&repo_id=341551718&response-content-disposition=attachment%3B%20filename%3Dnf _2.52_linux_amd64&response-content-type=application%2Foctet-stream Resolving github-releases.githubusercontent.com (github-releases.githubuserconte nt.com)... 2001:67c:27e4:64::b9c7:6d9a, 2001:67c:27e4:64::b9c7:6e9a, 2001:67c:27 e4:64::b9c7:6f9a, ... Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|2001:67c:27e4:64::b9c7:6d9a|:443... failed: No route to host. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|2001:67c:27e4:64::b9c7:6e9a|:443... failed: No route to host. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|2001:67c:27e4:64::b9c7:6f9a|:443... failed: No route to host. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|2001:67c:27e4:64::b9c7:6c9a|:443... failed: No route to host. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|185.199.111.154|:443... failed: Network is unreachable. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|185.199.108.154|:443... failed: Network is unreachable. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|185.199.109.154|:443... failed: Network is unreachable. Connecting to github-releases.githubusercontent.com (github-releases.githubuserc ontent.com)|185.199.110.154|:443... failed: Network is unreachable. 故此原因,拷贝了一份截至现在日期最新的release,套上了CF 链接:https://files.samsam123.tk/Netflix%E4%B8%80%E9%94%AE%E6%B5%8B%E8%AF%95%E8%84%9A%E6%9C%AC%20by%20%40sjlleo 一键指令:wget -O nf https://files.samsam123.tk/Netflix%E4%B8%80%E9%94%AE%E6%B5%8B%E8%AF%95%E8%84%9A%E6%9C%AC%20by%20%40sjlleo && chmod +x nf && clear && ./nf 感谢作者提供脚本!

    enhancement 
    opened by samleong123 1
  • 我按我自己的需求改了一下,增加了socks5连接,增加了shell返回值方便用于多节点循环检测

    我按我自己的需求改了一下,增加了socks5连接,增加了shell返回值方便用于多节点循环检测

    我没用过go语言,是在网上左扒点右扒点凑出来的,运行有点慢。 很少用github,不知道如何提交什么的,所以直接把代码贴上来了。

    package main
    
    import (
    	"crypto/tls"
    	"fmt"
    	"net/http"
    	"net/url"
    	"os"
    	"strconv"
    	"strings"
    	"time"
    	"flag"
    	"golang.org/x/net/proxy"
    )
    
    const Netflix = "https://www.netflix.com/title/"
    var quiet = flag.Bool("quiet",false, "安静模式,仅把结果返回 shell")
    var socks = flag.String("socks5","127.0.0.1:1081", "socks5 代理")
    
    func RequestIP(requrl string, socks string) (string, int) {
    	// create a socks5 dialer
    	dialer, err := proxy.SOCKS5("tcp", socks, nil, proxy.Direct)
    	if err != nil {
    		return "Error", -1
    	}
    
    	urlValue, err := url.Parse(requrl)
    	if err != nil {
    		return "Error", -1
    	}
    	host := urlValue.Host
    	client := &http.Client{
    		Transport: &http.Transport{
    			TLSClientConfig: &tls.Config{ServerName: host},
    			// goodryb pull
    			Dial: dialer.Dial,
    		},
    		CheckRedirect: func(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse },
    		Timeout:       5 * time.Second,
    	}
    	req, err := http.NewRequest("GET", requrl, nil)
    	if err != nil {
    		//return errors.New(strings.ReplaceAll(err.Error(), requrl, requrl))
    		return "Error", -1
    	}
    	req.Host = host
    	req.Header.Set("USER-AGENT", "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36")
    	resp, err := client.Do(req)
    	if err != nil {
    		//return errors.New(strings.ReplaceAll(err.Error(), requrl, requrl))
    		return "Error", -1
    	}
    	defer resp.Body.Close()
    
    	Header := resp.Header
    
    	// 响应时间
    	delay, err := strconv.Atoi(Header["X-Netflix.proxy.execution-Time"][0])
    	if err != nil {
    		// 作最大响应时长处理
    		delay = -1
    	}
    
    	if Header["X-Robots-Tag"] != nil {
    		if Header["X-Robots-Tag"][0] == "index" {
    			return "us", delay
    		}
    	}
    
    	if Header["Location"] == nil {
    		return "Ban", delay
    	} else {
    		return strings.Split(Header["Location"][0], "/")[3], delay
    	}
    }
    
    func UnblockTest(MoiveID int, socks string) bool {
    	testURL := Netflix + strconv.Itoa(MoiveID)
    	reCode, _ := RequestIP(testURL,socks)
    	if strings.Contains(reCode, "Ban") {
    		return false
    	} else {
    		return true
    	}
    }
    
    func ShellPrint(text string) {
    	if !*quiet {
    		fmt.Print(text)
    	}
    }
    
    func FindCountry(Code string) string {
    	countryName := []string{"美国", "阿富汗", "奥兰群岛", "阿尔巴尼亚", "阿尔及利亚", "美属萨摩亚", "安道尔", "安哥拉", "安圭拉", "南极洲", "安提瓜和巴布达", "阿根廷", "亚美尼亚", "阿鲁巴", "澳大利亚", "奥地利", "阿塞拜疆", "巴哈马", "巴林", "孟加拉国", "巴巴多斯", "白俄罗斯", "比利时", "伯利兹", "贝宁", "百慕大", "不丹", "玻利维亚", "波黑", "博茨瓦纳", "布维岛", "巴西", "英属印度洋领地", "文莱", "保加利亚", "布基纳法索", "布隆迪", "柬埔寨", "喀麦隆", "加拿大", "佛得角", "开曼群岛", "中非", "乍得", "智利", "中国", "圣诞岛", "科科斯(基林)群岛", "哥伦比亚", "科摩罗", "刚果(布)", "刚果(金)", "库克群岛", "哥斯达黎加", "科特迪瓦", "克罗地亚", "古巴", "塞浦路斯", "捷克", "丹麦", "吉布提", "多米尼克", "多米尼加", "厄瓜多尔", "埃及", "萨尔瓦多", "赤道几内亚", "厄立特里亚", "爱沙尼亚", "埃塞俄比亚", "福克兰群岛(马尔维纳斯)", "法罗群岛", "斐济", "芬兰", "法国", "法属圭亚那", "法属波利尼西亚", "法属南部领地", "加蓬", "冈比亚", "格鲁吉亚", "德国", "加纳", "直布罗陀", "希腊", "格陵兰", "格林纳达", "瓜德罗普", "关岛", "危地马拉", "格恩西岛", "几内亚", "几内亚比绍", "圭亚那", "海地", "赫德岛和麦克唐纳岛", "梵蒂冈", "洪都拉斯", "香港", "匈牙利", "冰岛", "印度", "印度尼西亚", "伊朗", "伊拉克", "爱尔兰", "英国属地曼岛", "以色列", "意大利", "牙买加", "日本", "泽西岛", "约旦", "哈萨克斯坦", "肯尼亚", "基里巴斯", "朝鲜", "韩国", "科威特", "吉尔吉斯斯坦", "老挝", "拉脱维亚", "黎巴嫩", "莱索托", "利比里亚", "利比亚", "列支敦士登", "立陶宛", "卢森堡", "澳门", "前南马其顿", "马达加斯加", "马拉维", "马来西亚", "马尔代夫", "马里", "马耳他", "马绍尔群岛", "马提尼克", "毛利塔尼亚", "毛里求斯", "马约特", "墨西哥", "密克罗尼西亚联邦", "摩尔多瓦", "摩纳哥", "蒙古", "黑山", "蒙特塞拉特", "摩洛哥", "莫桑比克", "缅甸", "纳米比亚", "瑙鲁", "尼泊尔", "荷兰", "荷属安的列斯", "新喀里多尼亚", "新西兰", "尼加拉瓜", "尼日尔", "尼日利亚", "纽埃", "诺福克岛", "北马里亚纳", "挪威", "阿曼", "巴基斯坦", "帕劳", "巴勒斯坦", "巴拿马", "巴布亚新几内亚", "巴拉圭", "秘鲁", "菲律宾", "皮特凯恩", "波兰", "葡萄牙", "波多黎各", "卡塔尔", "留尼汪", "罗马尼亚", "俄罗斯联邦", "卢旺达", "圣赫勒拿", "圣基茨和尼维斯", "圣卢西亚", "圣皮埃尔和密克隆", "圣文森特和格林纳丁斯", "萨摩亚", "圣马力诺", "圣多美和普林西比", "沙特阿拉伯", "塞内加尔", "塞尔维亚", "塞舌尔", "塞拉利昂", "新加坡", "斯洛伐克", "斯洛文尼亚", "所罗门群岛", "索马里", "南非", "南乔治亚岛和南桑德韦奇岛", "西班牙", "斯里兰卡", "苏丹", "苏里南", "斯瓦尔巴岛和扬马延岛", "斯威士兰", "瑞典", "瑞士", "叙利亚", "台湾", "塔吉克斯坦", "坦桑尼亚", "泰国", "东帝汶", "多哥", "托克劳", "汤加", "特立尼达和多巴哥", "突尼斯", "土耳其", "土库曼斯坦", "特克斯和凯科斯群岛", "图瓦卢", "乌干达", "乌克兰", "阿联酋", "英国", "美国本土外小岛屿", "乌拉圭", "乌兹别克斯坦", "瓦努阿图", "委内瑞拉", "越南", "英属维尔京群岛", "美属维尔京群岛", "瓦利斯和富图纳", "西撒哈拉", "也门", "赞比亚", "津巴布韦"}
    	countryCode := []string{"us", "af", "ax", "al", "dz", "as", "ad", "ao", "ai", "aq", "ag", "ar", "am", "aw", "au", "at", "az", "bs", "bh", "bd", "bb", "by", "be", "bz", "bj", "bm", "bt", "bo", "ba", "bw", "bv", "br", "io", "bn", "bg", "bf", "bi", "kh", "cm", "ca", "cv", "ky", "cf", "td", "cl", "cn", "cx", "cc", "co", "km", "cg", "cd", "ck", "cr", "ci", "hr", "cu", "cy", "cz", "dk", "dj", "dm", "do", "ec", "eg", "sv", "gq", "er", "ee", "et", "fk", "fo", "fj", "fi", "fr", "gf", "pf", "tf", "ga", "gm", "ge", "de", "gh", "gi", "gr", "gl", "gd", "gp", "gu", "gt", "gg", "gn", "gw", "gy", "ht", "hm", "va", "hn", "hk", "hu", "is", "in", "id", "ir", "iq", "ie", "im", "il", "it", "jm", "jp", "je", "jo", "kz", "ke", "ki", "kp", "kr", "kw", "kg", "la", "lv", "lb", "ls", "lr", "ly", "li", "lt", "lu", "mo", "mk", "mg", "mw", "my", "mv", "ml", "mt", "mh", "mq", "mr", "mu", "yt", "mx", "fm", "md", "mc", "mn", "me", "ms", "ma", "mz", "mm", "na", "nr", "np", "nl", "an", "nc", "nz", "ni", "ne", "ng", "nu", "nf", "mp", "no", "om", "pk", "pw", "ps", "pa", "pg", "py", "pe", "ph", "pn", "pl", "pt", "pr", "qa", "re", "ro", "ru", "rw", "sh", "kn", "lc", "pm", "vc", "ws", "sm", "st", "sa", "sn", "rs", "sc", "sl", "sg", "sk", "si", "sb", "so", "za", "gs", "es", "lk", "sd", "sr", "sj", "sz", "se", "ch", "sy", "tw", "tj", "tz", "th", "tl", "tg", "tk", "to", "tt", "tn", "tr", "tm", "tc", "tv", "ug", "ua", "ae", "gb", "um", "uy", "uz", "vu", "ve", "vn", "vg", "vi", "wf", "eh", "ye", "zm", "zw"}
    	for i, v := range countryCode {
    		if strings.Contains(Code, v) {
    			return countryName[i]
    		}
    	}
    	return Code
    }
    
    func main() {
    	// 节点得分[0xFFFF,0] 0x[XX 解锁情况][XX 响应时长]
    	var ret int
    	// Test Patterns
    	var areaAvailableID = 80018499
    	// 性爱自习室
    	var SelfMadeAvailableID = 80197526
    	// 绝命毒师
    	var NonSelfMadeAvailableID = 70143836
    
    	flag.Parse()
    	
    	// 拼接非自制剧的URL
    	testURL := Netflix + strconv.Itoa(NonSelfMadeAvailableID)
    	ipv4CountryCode, delay := RequestIP(testURL, *socks)
    
    	/***
    	 * 检查CountryCode返回值:
    	 * Error 代表该网络访问失败
    	 * Ban 代表无法解锁这个ID种类的影片
    	 * 此处如果显示值不为Error则都应该继续检测
    	***/
    	if strings.Contains(ipv4CountryCode, "Error") {
    		// 网络错误
    		ret = 0
    		ShellPrint("网络错误[0]")
    	} else {
    		if !strings.Contains(ipv4CountryCode, "Ban") {
    			// 支持非自制剧解锁(不再需要检测自制剧解锁)
    			ret = 4
    			ShellPrint("\033[0;32m完整解锁[4] (" + strconv.Itoa(delay) + ")\033[0m")
    		} else {
    			// 不支持非自制剧解锁
    			// 进一步检测区域及自制剧解锁
    			if UnblockTest(areaAvailableID, *socks) {
    				// 所在地区支持NF
    				if UnblockTest(SelfMadeAvailableID, *socks) {
    					// 支持自制剧
    					ret = 3
    					ShellPrint("\033[0;31m仅自制剧解锁[3] (" + strconv.Itoa(delay) + ")\033[0m")
    				} else {
    					// 不支持自制剧
    					ret = 2
    					ShellPrint("\033[0;33m仅非强版权自制剧解锁[2] (" + strconv.Itoa(delay) + ")\033[0m")
    				}
    			} else {
    				// 所在地区不支持NF
    				ret = 1
    				ShellPrint("\033[0;36m此区域不支持服务[1] (" + strconv.Itoa(delay) + ")\033[0m")
    			}
    		}
    		// 输出节点国家码
    		//ShellPrint(" " + FindCountry(ipv4CountryCode) + strings.ToUpper("(" + strings.Split(ipv4CountryCode,"-")[0]) + ")")
    	}
    	ShellPrint("\n")
    	//--------------------------------
    	if delay < 0 || delay > 0xFFF {
    		// 作最大响应时长处理
    		delay = 0xFF
    	} else {
    		delay = delay >> 4
    	}
    	// 响应时间越大得分越低
    	ret = ret * 256 + (0xFF - delay)
    	//--------------------------------
    	os.Exit(ret)
    }
    
    enhancement good first issue 
    opened by zppan 0
Releases(v3.1.0-1)
Owner
A College Student
null
A simple business indicator tool that uses a sliding window to detect whether the indicator exceeds the threshold

melon A simple business indicator tool that uses a sliding window to detect whether the indicator exceeds the threshold Usage //create the metric //th

believe 4 Jul 11, 2021
This utility can be used for converting BSE Mutual fund scheme

go-mf-scheme-master-generator This utility can be used for converting BSE Mutual

null 0 Jan 21, 2022
Magma: Gives network operators an open, flexible and extendable mobile core network solution

Connecting the Next Billion People Magma is an open-source software platform tha

nikhilc 0 Dec 24, 2021
tenv detects environment variable not using t.Setenv

tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17

sivchari 14 Nov 8, 2022
Fast, lightweight and NOT reliable tool for downloading tons of images.

image-download-tool Fast, lightweight and NOT reliable tool for downloading tons of images. How to use Run .exe with --help flag Create json file with

Denis 3 May 12, 2022
DO NOT use `named return values` in Go

namedreturn DO NOT use named return values in Go namedreturn finds a named return value, you must remove it.

Tomochika Hara 3 Dec 17, 2021
Simple unpacking script for Ezuri ELF Crypter

ezuri_unpack A simple unpacking script for the Ezuri ELF Crypter. Based on the analysis done by Ofer Caspi and Fernando Martinez of AT&T Alien Labs

Marius Genheimer 16 Aug 15, 2022
Script Based Alerting Manager

A Project in active development. Features may have breaking changes at any time before v1.0.0 version Telegram Group Balerter is a scripts based alert

Balerter 278 Nov 3, 2022
Go API backed by the native Dart Sass Embedded executable.

This is a Go API backed by the native Dart Sass Embedded executable. The primary motivation for this project is to provide SCSS support to Hugo. I wel

Bjørn Erik Pedersen 27 Sep 17, 2022
Go library for decoding generic map values into native Go structures and vice versa.

mapstructure mapstructure is a Go library for decoding generic map values to structures and vice versa, while providing helpful error handling. This l

Mitchell Hashimoto 6.3k Nov 22, 2022
Goridge is high performance PHP-to-Golang codec library which works over native PHP sockets and Golang net/rpc package.

Goridge is high performance PHP-to-Golang codec library which works over native PHP sockets and Golang net/rpc package. The library allows you to call Go service methods from PHP with a minimal footprint, structures and []byte support.

Spiral Scout 1.1k Nov 17, 2022
a decision & trigger framework backed by Google's Common Expression Language used in graphikDB

a decision & trigger framework backed by Google's Common Expression Language used in graphikDB

null 62 Nov 15, 2022
This is an open source project for commonly used functions for the Go programming language.

Common Functions This is an open source project for commonly used functions for the Go programming language. This package need >= go 1.3 Code Conventi

ᴜɴᴋɴᴡᴏɴ 738 Nov 4, 2022
sigbypass4xx is a utility to automate well-know techniques used to bypass access control restrictions.

sigbypass4xx sigbypass4xx is a utility to automate well-know techniques used to bypass access control restrictions. Resources Usage Installation From

Signed Security 8 Nov 9, 2022
Package strnaming is used to Convert string to camelCase, snake_case, kebab-case.

strnaming Package strnaming is used to Convert string to camelCase, snake_case, kebab-case. Contents strnaming Contents API Examples Install Quick sta

null 2 Oct 24, 2021
MNA - stands for mobile number assignment - a small zero external dependency golang library that is used to identify mobile number assignment in tanzania

MNA - stands for mobile number assignment - a small zero external dependency golang library that is used to identify mobile number assignment in tanzania

TECHCRAFT TECHNOLOGIES LIMITED 8 Nov 29, 2021
Golang code-generators used to implement Kubernetes-style API types.

code-generator Golang code-generators used to implement Kubernetes-style API types. Purpose These code-generators can be used in the context of Custom

Kubernetes 1.3k Nov 18, 2022
Source Repo for utilities used in Atlas

Atlas-Utilities Source Repo for utilities used in Atlas filepicker Simple file picker in Go using go-common-file-dialog This returns the path of a fil

AtlasOS 38 Nov 22, 2022
Hotswap provides a solution for reloading your go code without restarting your server, interrupting or blocking any ongoing procedure.

Hotswap provides a solution for reloading your go code without restarting your server, interrupting or blocking any ongoing procedure. Hotswap is built upon the plugin mechanism.

Edwin 151 Nov 23, 2022