zoukankan      html  css  js  c++  java
  • mitmproxy fiddler 抓包 填坑

    使用mitmproxy抓[DY]包填坑:
        参考资料:
            https://www.cnblogs.com/lsdb/p/10106655.html
            https://github.com/mitmproxy/mitmproxy
            https://docs.mitmproxy.org/stable/api/events.html
            https:cnblogs.com/findyou/p/3491014.html

    手机条件:

        1、root

        2、下载豌豆荚,下载15.0.0版本的DY(其他版本暂未尝试是否可行)

    抓https安装证书:
        参考:
            https://www.cnblogs.com/lsdb/p/10106655.html
            https://docs.mitmproxy.org/stable/howto-install-system-trusted-ca-android/
        证书采用上述参考资料安装后,可以抓取百度类的https请求,但无法抓取DY的。需要对证书进行二次处理,并放指定位置。
        证书处理:
            gitbash/linux中执行:hashed_name=`openssl x509 -inform PEM -subject_hash_old -in FiddlerRoot.cer | head -1` && cp FiddlerRoot.cer $hashed_name.0
            将生成:$hashed_name.0文件
            将文件拷贝到手机目录:adb push xxxxxxxx.0 /system/etc/security/cacerts/
            如果报:adb: error: failed to copy 'c8750f0d.0' to '/system/etc/security/cacerts/c8750f0d.0': remote couldn't create file: Permission denied
              解决:
                  1、确定手机已经root过了
                  2、进入手机:adb shell
                  3、执行:su(这时候$会变#,否则说明没有root,必须先root)
                  4、手机通过数据线连接,把文件拷贝进设备
                  5、pc端拷贝文件:cp sdcard/c8750f0d.0 /system/etc/security/cacerts
                  6、重启手机(完)

    使用fiddler抓包:(MIT控制台看起来不直观,日志太多了,又不好操作,先用fiddler来看,然后用mit来拦截做业务处理)
        参考资料:
            https:cnblogs.com/findyou/p/3491014.html(安装与配置)
            https:cnblogs.com/chenxi188/p/11917840.html(证书导出)
        从fiddler导出来的证书是cert的,需要转换成pem:
            gitbash执行:openssl x509 -inform DER -in FiddlerRoot.cer -out FiddlerRoot.cer.pem
            拷贝到系统证书目录:cp sdcard/269953fb.0 /system/etc/security/cacerts
        配置fiddler:
            Tools > Options > HTTPS > CertEnroll engine[蓝色链接] > Clear server certs on exit(勾选上)
            运行about:config
                增加变量和值:fiddler.certmaker.validdays 5(证书有效期)
        重启fiddler(完)

  • 相关阅读:
    【Leetcode】23. Merge k Sorted Lists
    【Leetcode】109. Convert Sorted List to Binary Search Tree
    【Leetcode】142.Linked List Cycle II
    【Leetcode】143. Reorder List
    【Leetcode】147. Insertion Sort List
    【Leetcode】86. Partition List
    jenkins 配置安全邮件
    python 发送安全邮件
    phpstorm 同步远程服务器代码
    phpUnit 断言
  • 原文地址:https://www.cnblogs.com/Denny_Yang/p/15634222.html
Copyright © 2011-2022 走看看