Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

搜索阿里云的AK误报较多 #6

Closed
ucstone opened this issue Jan 4, 2021 · 3 comments
Closed

搜索阿里云的AK误报较多 #6

ucstone opened this issue Jan 4, 2021 · 3 comments

Comments

@ucstone
Copy link
Contributor

ucstone commented Jan 4, 2021

"LTAI4FiNGpMhj9Q9cL9ygtAC"
"getLongConnUdtDataHeadV2"
"MediaControllerImplApi21"
"isRemotePM25QueryEnabled"
"isBase64BodyViaWebsocket"
"resolveJsr305CustomState"
"MediaControllerImplApi24"
搜索阿里云的误报较多,有啥好的解决方法嘛?

@ucstone
Copy link
Contributor Author

ucstone commented Jan 4, 2021

exclude_str = ["get", "and", "set", "config", "create", "access", "is", "check", "load", "class", "method", "function",
               "zone", "sha", "des", "aes", "rsa", "dsa", "can", "clear", "long", "task", "thread", "process", "api",
               "async", "sync", "size", "tag", "uuid", "impl", "int", "parser", "conf", "param", "rate", "audio",
               "push", "short", "full", "byte", "state", "info", "util", "java", "cert", "sign", "req", "with", "for",
               "cons", "data", "password", "open", "close", "calc", "code", "track", "group", "time"
               ]

def duplicate(exclude_str, full_list):
    result = []

    for a in range(0, len(full_list)):
        res = []
        # print(a, end='\t')
        for ex in exclude_str:
            res.append(operator.contains(full_list[a].lower(), ex))
        if len(set(res)) == 1:
            print(full_list[a])
            result.append(full_list[a])
    return result

用最沙雕的方法,维持检索ak的准确率。

@TheKingOfDuck
Copy link
Owner

早期的ak格式和现在的差异比较大,以前除了长度基本没啥特征,现在的看到LTA开头的这个基本就是了 长度好像固定16来着? 没注意了,目前的正则是匹配固定长度加字母数字这种,师傅有兴趣可以直接提交pr,我这边合并就行呀

@ucstone
Copy link
Contributor Author

ucstone commented Jan 5, 2021

我还没注意到这个特征,
早期AK id是24位,有LTA特征,利用这个特征比较好匹配了,就没有了误报的问题;
key的话用我这个方法来排除误报,
等我pull下代码,本地改改在PR把。
我是直接复制你的代码集成到我的项目里了。

@ucstone ucstone closed this as completed Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants