chengying-6.0登入接口逆向

芒果11个月前技术文章421


版本更新
首先是登入的加密
url:http://172.16.121.70/login
参数
1. username:
2. password:
614bb9438210c6972fbe5fa1875d56bebe28fd3d86ea76830afc4e79cfc7159c328285c19db0f4789db01ea644989f6fce5aae5304dc04b332743d2967808fcfae0a0ef35c7435b81423b90a425d1fba36ea2b04584e9440d030e7ca56fe0cc7e14819b562a5edd38d96527514f65a8cff9c388303f9fd12463fdf184ea8e95c
对应加密位置
后面改成了
(e.password, i)

image.png

由于t中的数据是一个请求过来的 所以可以直接搜索
关于public_key可以直接搜索
BEGIN public key

5DA9A621-77D0-4B67-88F6-3581E7B53090.png

可以看出"sm2" === i为false 所以可以配置
也可以看出是rsa加密



比较简单直接上代码吧
def getPwd(t):
    n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
    r = "0123456789abcdefghijklmnopqrstuvwxyz"  # 这里需要替换为实际的函数或方法
    i = ""
    s = 0
    o = 0
    for e in range(len(t)):
        if t[e] == "=":
            break
        h = n.index(t[e])
        if h >= 0:
            if s == 0:
                i += r[h >> 2]
                o = 3 & h
                s = 1
            elif s == 1:
                i += r[o << 2 | h >> 4]
                o = 15 & h
                s = 2
            elif s == 2:
                i += r[o]
                i += r[h >> 2]
                o = 3 & h
                s = 3
            else:
                i += r[o << 2 | h >> 4]
                i += r[15 & h]
                s = 0
    return i
def encrypt_password(publicKey, password):
    rsakey = RSA.importKey(publicKey)
    cipher = PKCS1_v1_5.new(rsakey)
    cipher_text = base64.b64encode(cipher.encrypt(password.encode('utf-8')))
    pwd = getPwd(cipher_text.decode('utf-8'))
    return pwd 


相关文章

Hdfs3.x新特性详解

Hdfs3.x新特性详解

HDFS Disk Balancer(磁盘均衡器)HDFS Disk Balancer与HDFS Balancer的区别?两者都是实现负载均衡功能HDFS Balancer是之前Hadoop2.x中本...

Mac安装Hadoop文档-保姆级操作(二)

Mac安装Hadoop文档-保姆级操作(二)

配置hadoop进入hadoop的目录:cd /opt/homebrew/Cellar/hadoop/3.3.6/libexec/etc/hadoop修改core-site.xml<config...

单节点Kafka部署并开启Kerberos配置

安装Kerberosserver节点安装kerberos相关软件yum install -y krb5-server krb5-workstation krb5-libs修改配置文件krb5.conf...

Debezium抽取SQL Server同步kafka

Debezium抽取SQL Server同步kafka

ebezium SQL Server连接器捕获SQL Server数据库模式中发生的行级更改。官方2.0文档:https://debezium.io/documentation/reference/2...

 大数据集群监控配置操作指导(二)node_exporter+mysql_exporter部署

大数据集群监控配置操作指导(二)node_exporter+mysql_exporter部署

2.node_exporter监控集群服务器(所有集群服务器)wget https://github.com/prometheus/node_exporter/releases/download/v1...

ubuntu安装mysql

执行sudo apt install mysql-server启动mysqlsudo systemctl start mysql查看状态sudo systemctl status mysql查看默认密...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。