• charles


    注册码

    //2018-08-14亲测可用
    // Charles 4.2目前是最新版,可用。
    Registered Name: https://zhile.io
    License Key: 48891cf209c6d32bf4

    map local 劫持请求,到本地文件

    1,劫持:get请求页面到本地html面
    2,劫持:xhr请求到本地json文件

    跨域问题

    创建一个xml文件,命名kuayu.xml,内容为下面代码

    <?xml version='1.0' encoding='UTF-8' ?>
    <?charles serialisation-version='2.0' ?>
    <rewriteSet-array>
      <rewriteSet>
        <active>true</active>
        <name>kuayu</name>
        <hosts>
          <locationPatterns>
            <locationMatch>
              <location>
                <host>*</host>
              </location>
              <enabled>true</enabled>
            </locationMatch>
          </locationPatterns>
        </hosts>
        <rules>
          <rewriteRule>
            <active>true</active>
            <ruleType>3</ruleType>
            <matchHeader>Access-Control-Allow-Origin</matchHeader>
            <matchValue>*</matchValue>
            <matchHeaderRegex>false</matchHeaderRegex>
            <matchValueRegex>false</matchValueRegex>
            <matchRequest>false</matchRequest>
            <matchResponse>true</matchResponse>
            <newHeader>Access-Control-Allow-Origin</newHeader>
            <newValue>*</newValue>
            <newHeaderRegex>false</newHeaderRegex>
            <newValueRegex>false</newValueRegex>
            <matchWholeValue>false</matchWholeValue>
            <caseSensitive>false</caseSensitive>
            <replaceType>2</replaceType>
          </rewriteRule>
          <rewriteRule>
            <active>true</active>
            <ruleType>1</ruleType>
            <matchHeader></matchHeader>
            <matchValue></matchValue>
            <matchHeaderRegex>false</matchHeaderRegex>
            <matchValueRegex>false</matchValueRegex>
            <matchRequest>false</matchRequest>
            <matchResponse>true</matchResponse>
            <newHeader>Access-Control-Allow-Headers</newHeader>
            <newValue>Authorization,Accept,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,cityid,minsys,productid,didi-header-hint-content,didi-header-hint-code,Cityid,Productid</newValue>
            <newHeaderRegex>false</newHeaderRegex>
            <newValueRegex>false</newValueRegex>
            <matchWholeValue>false</matchWholeValue>
            <caseSensitive>false</caseSensitive>
            <replaceType>2</replaceType>
          </rewriteRule>
          <rewriteRule>
            <active>true</active>
            <ruleType>1</ruleType>
            <matchHeader></matchHeader>
            <matchValue></matchValue>
            <matchHeaderRegex>false</matchHeaderRegex>
            <matchValueRegex>false</matchValueRegex>
            <matchRequest>false</matchRequest>
            <matchResponse>true</matchResponse>
            <newHeader>Access-Control-Request-Method</newHeader>
            <newValue>GET, POST, OPTIONS</newValue>
            <newHeaderRegex>false</newHeaderRegex>
            <newValueRegex>false</newValueRegex>
            <matchWholeValue>false</matchWholeValue>
            <caseSensitive>false</caseSensitive>
            <replaceType>2</replaceType>
          </rewriteRule>
          <rewriteRule>
            <active>true</active>
            <ruleType>2</ruleType>
            <matchHeader>Access-Control-Allow-Origin</matchHeader>
            <matchValue></matchValue>
            <matchHeaderRegex>false</matchHeaderRegex>
            <matchValueRegex>false</matchValueRegex>
            <matchRequest>false</matchRequest>
            <matchResponse>true</matchResponse>
            <newHeaderRegex>false</newHeaderRegex>
            <newValueRegex>false</newValueRegex>
            <matchWholeValue>false</matchWholeValue>
            <caseSensitive>false</caseSensitive>
            <replaceType>2</replaceType>
          </rewriteRule>
          <rewriteRule>
            <active>true</active>
            <ruleType>1</ruleType>
            <matchHeader></matchHeader>
            <matchValue></matchValue>
            <matchHeaderRegex>false</matchHeaderRegex>
            <matchValueRegex>false</matchValueRegex>
            <matchRequest>false</matchRequest>
            <matchResponse>true</matchResponse>
            <newHeader>Access-Control-Allow-Origin</newHeader>
            <newValue>*</newValue>
            <newHeaderRegex>false</newHeaderRegex>
            <newValueRegex>false</newValueRegex>
            <matchWholeValue>false</matchWholeValue>
            <caseSensitive>false</caseSensitive>
            <replaceType>2</replaceType>
          </rewriteRule>
        </rules>
      </rewriteSet>
    </rewriteSet-array>
    

    将文件导入,如下

    Charles抓https显示unknown解决方法

    https://www.jianshu.com/p/5dba37629643

  • 相关阅读:
    8086汇编--1--通用寄存器和简单汇编指令
    写在前面的吐槽!
    汇编/Debug学习计划
    开篇-引文
    看懂别人的代码,和自己能写代码是两回事
    内存管理
    Flink基本原理及应用场景
    IDEA Maven Dependencies标红报错
    Spark Streaming流式处理
    Kafka
  • 原文地址:https://www.cnblogs.com/leee/p/9476339.html
Copyright © 2020-2023  润新知