HTTP Packet Capture in Practice cover

HTTP Packet Capture in Practice

Rating 4.1
Word count
81K words
Chapters
164
ISBN
9787115481191

Tags

Summary

HTTP packet capture uses the Fiddler capture tool to capture HTTP packets and then resend, edit, and otherwise manipulate them. HTTP packet capture has a wide range of uses, mainly in Web development and debugging, software automated testing, API automated testing, performance testing, and web crawling. It is also used to check network security. Packet capture is also often used for data interception and other purposes. This book revolves around packet capture. It has 22 chapters, focusing on the HTTP protocol, how to use Fiddler to capture HTTP packets, how to analyze HTTP, and how to use tools such as JMeter to send HTTP packets to achieve automated software testing. The book is richly illustrated with abundant examples and comes with accompanying video tutorials, making it easy for readers to follow along and practice. This book is suitable for front-end developers, test engineers, online fault support personnel, API developers, and Web developers, as well as anyone interested in automated testing.

Editor's review

HTTP Packet Capture in Practice is precisely positioned: it is not a textbook that comprehensively introduces the HTTP protocol, but a practical, hands-on guide focused on the specific skill of packet capture. The author, Xiao Jia, clearly understands the pain points of frontline network debugging and security testing, and the book consistently follows the principle of 'from practice, to practice.'

In terms of structure, the book starts with the most basic network protocol concepts and the installation and configuration of capture tools (such as Wireshark and Fiddler), then gradually moves into HTTP/HTTPS protocol details, request and response analysis, viewing common data formats (JSON, XML), and on to advanced breakpoint debugging, performance analysis, and security testing scenarios. This step-by-step arrangement is very friendly to beginners and helps readers build a clear path of skill development. The book's greatest highlight is its many illustrations (screenshots) and scenarios closely tied to real development, testing, and operations work, which turn abstract protocols into visual, actionable data flows.

For those working in Web front-end and back-end development, test engineers, operations engineers, and beginners in network security, mastering packet capture is like acquiring an 'X-ray lens' that lets you see directly what the application and the server are actually saying to each other. This is crucial for debugging APIs, analyzing performance bottlenecks, troubleshooting online problems, understanding third-party service interactions, and even conducting basic security vulnerability probing. The value of this book is that it systematically and scenario-by-scenario teaches how to use this 'X-ray lens' effectively, rather than merely explaining the principles of the lens.

Of course, the book's depth lies more in 'practical tool application and protocol analysis.' Readers who wish to study the new features of HTTP/2 and HTTP/3 or the implementation of the underlying network stack in depth may need to supplement it with more theoretical works. But for the core goal of 'packet capture,' this book is solid in content and detailed in steps—an excellent practical guide to keep at hand and consult as needed.

Who it's for

A good fit for

  • Web front-end and back-end developers who need to debug APIs and network requests
  • Software test engineers, especially those engaged in API testing, performance testing, and security testing
  • Operations engineers who need to troubleshoot network service faults and performance issues
  • Beginners interested in network security and packet capture analysis

Not a good fit for

  • Readers seeking in-depth coverage of HTTP protocol RFC standards and academic theory
  • Network experts expecting extensive packet capture analysis of non-HTTP protocols (such as the underlying TCP/IP)

Reading tips

  1. Read and practice simultaneously; be sure to install Wireshark or Fiddler locally and follow the book's examples step by step
  2. Focus on the sections on HTTPS capture configuration and data decryption, which are common difficulties in real work
  3. Connect the book's example scenarios to your own work projects and try using packet capture to analyze and solve a small real problem you encounter

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. 版权信息
  2. 内容提要
  3. 前言
  4. 第1章 HTTP协议和Fiddler抓包
  5. 1.1 HTTP协议介绍
  6. 1.2 Fiddler的介绍
  7. 1.3 HTTP协议报文的结构
  8. 1.4 Fiddler抓包的原理
  9. 第2章 HTTPS协议和Fiddler抓包
  10. 2.1 HTTP协议是不安全的
  11. 2.2 Web通信如何做到安全
  12. 2.3 什么是HTTPS
  13. 2.4 Fiddler如何捕获HTTPS会话
  14. 第3章 HTTP协议请求方法和状态码
  15. 3.1 URL详解
  16. 3.2 HTTP请求方法
  17. 3.3 HTTP状态码
  18. 第4章 HTTP协议Header介绍
  19. 4.1 HTTP Header介绍
  20. 4.2 Fiddler查看HTTP请求Header
  21. 4.3 Fiddler查看HTTP响应Header
  22. 4.4 Fiddler查看和复制Header
  23. 第5章 Web网页抓包和Fiddler修改包
  24. 5.1 网页是如何打开的
  25. 5.2 Web页面简单的性能测试
  26. 5.3 使用Fiddler来查看响应
  27. 5.4 Fiddler下断点,修改HTTP报文
  28. 第6章 HTTP协议中的缓存
  29. 6.1 缓存的概念
  30. 6.2 缓存的优点
  31. 6.3 Fiddler可以方便地查看缓存的Header
  32. 6.4 如何判断缓存新鲜度
  33. 6.5 通过最后修改时间来判断缓存新鲜度
  34. 6.6 与缓存有关的Header
  35. 6.7 ETag
  36. 6.8 浏览器不使用缓存
  37. 6.9 直接使用缓存,不去服务器验证
  38. 6.10 如何设置IE不使用缓存
  39. 6.11 公有缓存和私有缓存的区别
  40. 第7章 HTTP协议压缩和URL Encode
  41. 7.1 HTTP压缩的过程
  42. 7.2 URL Encode介绍
  43. 7.3 Fiddler中的TextWizard
  44. 第8章 Fiddler使用技巧
  45. 8.1 Fiddler和其他抓包软件的比较
  46. 8.2 Fiddler抓不到包应该怎么解决
  47. 8.3 如何找到想抓的包
  48. 8.4 Fiddler异常退出后无法上网
  49. 8.5 Fiddler排序
  50. 8.6 Fiddler中查询会话
  51. 8.7 Fiddler中保存抓到的包
  52. 8.8 Fiddler中编辑会话
  53. 8.9 过滤会话
  54. 8.10 常用快捷键
  55. 8.11 QuickExec命令行的使用
  56. 8.12 Fiddler比较会话的不同
  57. 8.13 Fiddler插件
  58. 第9章 Fiddler前端快速调试
  59. 9.1 如何在服务器上调试JavaScript文件
  60. 9.2 Fiddler AutoResponder的工作原理
  61. 9.3 Fiddler在线调试JavaScript文件
  62. 9.4 浪漫的程序员
  63. 9.5 替换网页中的图片
  64. 第10章 Fiddler的Script用法
  65. 10.1 Fiddler Script介绍
  66. 10.2 Fiddler Script Editor
  67. 10.3 CustomRules.js中的主要方法
  68. 10.4 Fiddler定制菜单
  69. 10.5 修改Session在Fiddler的显示样式
  70. 10.6 修改HTTP请求
  71. 10.7 修改HTTP响应
  72. 10.8 读写txt文件
  73. 10.9 使用正则表达式
  74. 10.10 保存Session
  75. 10.11 读取Session,并且使用Fiddler来发送
  76. 第11章 深入理解Cookie机制
  77. 11.1 HTTP协议是无状态的
  78. 11.2 会话机制
  79. 11.3 Cookie机制
  80. 11.4 Cookie是什么
  81. 11.5 Cookie的作用
  82. 11.6 抓包观察上海科技馆网站的登录
  83. 11.7 Cookie的属性
  84. 11.8 Cookie的分类
  85. 11.9 Cookie保存在哪里
  86. 11.10 使用和禁用Cookie
  87. 11.11 网站自动登录的原理
  88. 11.12 Cookie和文件缓存的区别
  89. 11.13 Cookie泄露隐私
  90. 第12章 Fiddler实现Cookie劫持攻击
  91. 12.1 截获Cookie冒充别人身份
  92. 12.2 Cookie劫持的原理
  93. 12.3 Cookie劫持实例介绍
  94. 12.4 网站退出的作用
  95. 第13章 HTTP基本认证
  96. 13.1 什么是HTTP基本认证
  97. 13.2 摘要认证
  98. 第14章 Fiddler手机抓包
  99. 14.1 环境准备
  100. 14.2 Fiddler截获手机原理图
  101. 14.3 截获手机发出的HTTP包有什么作用
  102. 14.4 手机抓包
  103. 14.5 设置过滤
  104. 14.6 如何卸载证书
  105. 14.7 手机抓包提醒
  106. 第15章 Fiddler发送HTTP请求
  107. 15.1 Fiddler Composer发送HTTP请求
  108. 15.2 Fiddler重新发送HTTP请求
  109. 15.3 安全测试之重放攻击
  110. 15.4 查找和登录相关的Cookie
  111. 第16章 Fiddler实现弱网测试
  112. 16.1 什么是弱网
  113. 16.2 弱网环境带来的问题
  114. 16.3 弱网测试的目的
  115. 16.4 弱网的场景
  116. 16.5 Fiddler模拟网络延迟
  117. 16.6 精确控制网速
  118. 16.7 Fiddler模拟网络中断
  119. 16.8 实例:Fiddler返回500状态码
  120. 16.9 Fiddler模拟网络超时
  121. 第17章 自动化测试和接口测试
  122. 17.1 自动化测试分类
  123. 17.2 分层的自动化测试理念
  124. 17.3 Web自动化测试的两种思路
  125. 17.4 什么是接口测试
  126. 17.5 接口测试工具
  127. 17.6 Web原理
  128. 17.7 Web自动化测试原理
  129. 17.8 性能测试的原理
  130. 17.9 APP的后台测试
  131. 17.10 如何学习Web自动化测试和性能测试
  132. 第18章 JMeter工具使用介绍
  133. 18.1 JMeter介绍
  134. 18.2 JMeter的下载和运行
  135. 18.3 创建测试任务
  136. 18.4 添加HTTP请求
  137. 18.5 实例:密码用MD5加密
  138. 第19章 JMeter天气接口自动化测试
  139. 19.1 天气查询的例子
  140. 19.2 天气查询网站抓包
  141. 19.3 抓包分析
  142. 19.4 获取城市地区代码
  143. 19.5 处理JMeter中HTTP响应乱码
  144. 19.6 添加验证点
  145. 19.7 使用用户自定义变量
  146. 19.8 正则表达式提取城市地区代码
  147. 19.9 获取天气
  148. 第20章 JMeter中BeanShell的用法
  149. 20.1 什么是BeanShell
  150. 20.2 操作变量
  151. 20.3 JMeter有哪些BeanShell
  152. 20.4 BeanShell调用自己写的jar包进行MD5加密
  153. 第21章 自动登录禅道和自动开Bug
  154. 21.1 HTTP Cookie管理器
  155. 21.2 HTTP请求默认值
  156. 21.3 禅道介绍和部署
  157. 21.4 禅道操作和抓包分析
  158. 第22章 JMeter给网站做压力测试
  159. 22.1 案例介绍
  160. 22.2 压力测试的目的
  161. 22.3 抓包分析Mozy网站的登录过程
  162. 22.4 抓包分析
  163. 22.5 实现Mozy登录
  164. 22.6 简单的压力测试

FAQ

Does this book require a strong network foundation?
No. The book starts from scratch, and basic computer operating knowledge is enough to get started. It explains the necessary network concepts in plain language and is better suited to learning by doing.
Are the tools and examples in the book still applicable now (after 2023)?
The core tools (Wireshark, Fiddler/Charles) and the basic principles of HTTP/HTTPS are stable, and the book's capture methodology and most analytical approaches remain fully applicable. Some tool interfaces may have changed slightly with version updates, but the functional logic is the same.
How is this book different from reading official tool documentation or online tutorials?
The book provides a systematic learning path and carefully designed practical cases, avoiding the blind spots that come from scattered knowledge. It organically links tool use, protocol knowledge, and troubleshooting scenarios, making it more efficient than consulting documentation alone and helping knowledge stick better.

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

肖佳 Author

Xiao Jia is a Chinese author of technical books. Public information about the author is limited, and what can be confirmed centers mainly on the published work: the library holds one title by this author, HTTP Packet Capture in Practice, commonly classified under programming and design. Judging from the title and category, the author focuses on the practical application and debugging skills of network protocols rather than abstract theory or general introductory concepts. Packet capture is an important means of diagnosing network problems in development and operations, involving the observation of requests and responses, the interpretation of protocol details, and skilled use of tools. Such a subject usually requires the author to understand how HTTP works and to explain the steps clearly enough for readers to practice as they read and apply the skills in real scenarios. Because of limited material, the author's education, career, and research focus cannot be verified and are not speculated upon here. On the evidence of this single work, the writing tends toward the practical, emphasizing operable technical points, and is suitable for readers who wish to use packet capture to understand network communication and improve troubleshooting skills.

More by the same author

Top rated in the same category