Clarles----断点替换之修改Response数据
2020-10-20 本文已影响0人
晓伟很努力
第一步:
打开将要访问的网址,通过Charles抓到想要修改数据的接口

第二步:
点击右键勾选Breakpoints
再打上断点鼠标右键到Breakpoints---再复制url

第三步:
点击Charles工具中Proxy-Breakpoints进行打断点
1:

2:
弹出Breakpoints Settings 弹层

如果不想用原有的网址,可以进行删除,换上自己想用的
第四步:
双击Location中的想要打断点的接口,弹出Edit Breakpoints
第五步:
将Query中的内容删除,输入*
如果修改Request数据,就将Request勾选
如果修改Response数据,就将Response勾选

第六步:
此时重新访问该接口,Charles自动跳转到Breakpoints页面

第七步:
此时修改Response数据,点击Edit Response,切换底部tab至Text,修改所需要的数据
第八步:
修改数据后,点击Execute,查看访问的页面,数据将会显示已修改的Response数据

这是显示修改成功的数据

Clarels-----断点替换之修改本地文件
第一步:
选中抓取的包

第二步:
右键单击save response保存在本地

第三步:
保存在桌面
随便起名字

第四步:
桌面打开文件123456.txt,就是刚才保存的那个文件

第五步:
替换掉以前的文件

第六步:
回到charles 选中抓取的包,右键点击map local

第七步:
点击ok
进网页看结果图

Clarles之弱网测试
第一步:
打开charles工具,选择proxy,点击proxy中的Throttle settings,打开网络设置页面 ,再首先勾选Enable Throttling,在Throttling preset中可以选择工具默认配置的一些网络状况

第二步:

第三步:
如果测试中只需要只对部分域名的请求进行网络控制的话,勾选only for selected hosts选项,添加hosts

第四步:
最后点击ok完成

e