Python in Action: Using Python to Become an Elite Hacker cover

Python in Action: Using Python to Become an Elite Hacker

No rating yet
Word count
325 words
Chapters
11
Series
Security Technology Series
ISBN
9787121277139

Tags

Summary

This book is the Chinese translation of Violent Python, written for security practitioners who need to quickly write specialized tools for specific scenarios. It is organized around real-world cases: it starts with setting up a development environment and installing third-party libraries, briefly reviews Python variables, strings, lists, dictionaries, conditional statements, exception handling, functions, iteration, file I/O, and the sys/os modules, and then builds hands-on familiarity through two starter programs (a UNIX password cracker and a Zip file password cracker). It then moves into penetration testing: writing a TCP full-connect port scanner, multithreaded scanning, grabbing application banners, and working with nmap code; using Pexpect to interact with SSH, using Pxssh to brute-force passwords, and building an SSH botnet from weak private keys; building an anonymous FTP scanner, batch password attempts, injecting malicious code into webpages, and collaborating with Metasploit to carry out SMB attacks and proof-of-concept exploits. The forensics and interception part covers electronic forensics, network traffic analysis, and wireless security, introducing topics such as information gathering and antivirus evasion. Every example is presented as a runnable script, emphasizing “achieving the required functionality with very little code,” making it suitable for security engineering practice and classroom cases.

Editor's review

这不是一本“Python 入门书”,也不是一本罗列工具的速查手册,而是把 Python 当作安全工程师的万能螺丝刀。作者 TJ O'Connor 用真实的攻防与取证场景串起知识点:写端口扫描器、用 Pxssh 试口令、搭 SSH 僵尸网络、跟 Metasploit 对话、从内存镜像里找线索。每段代码都能跑起来,读者看到的是“问题—思路—脚本—结果”的完整闭环,比读十篇原理文章更能建立攻防直觉。 中译本由崔孝晨、武晓音等翻译,术语处理稳妥,代码保持原貌,方便对照实操。需要注意的是,书中案例基于较早期的 Python 2 生态和当年的目标环境,今天直接照抄会遇到语法、依赖与系统差异;建议在隔离的虚拟机或靶场中学习,把脚本当作方法示范而非现成武器。对于想从“会用 Python”跨越到“能用 Python 解决安全实际问题”的读者,这本书依然是一条高效的路径。

Who it's for

A good fit for

  • 已掌握 Python 基本语法、想进入安全领域的开发者
  • 渗透测试、红队与安全运维从业者
  • 电子取证与应急响应人员,需要快速写分析脚本
  • 信息安全专业师生,寻找可运行的课程案例与实验素材

Not a good fit for

  • 完全没有编程基础的读者,书中不系统讲解 Python 语法
  • 只想读概念、不愿动手敲代码和调试环境的人
  • 期望得到最新漏洞利用技巧与当代工具链的读者

Reading tips

  1. 在隔离虚拟机或合法靶场中动手复现,切勿对未授权系统执行书中脚本。
  2. 遇到 Python 2 语法或依赖问题时,先理解意图,再改写为 Python 3 版本。
  3. 按“章节主题 + 自己写的脚本 + 结果对比”做笔记,形成个人工具库。
  4. 与《Violent Python》英文原版对照阅读,重点看注释与代码组织方式。

About the publisher

Publishing House of Electronics Industry China · Founded in 1982

The Publishing House of Electronics Industry is a comprehensive publisher distinguished by its focus on electronic information and related fields. Judging from the more than 3,000 titles in its catalogue, its publishing covers programming and design, artificial intelligence, computer science, finance and economics, photography, and social sciences, attending both to cutting-edge technology and to general readers. Representative titles include Factor Investing: Methods and Practice, x86 Assembly Language: From Real Mode to Protected Mode, The RISC-V Reader, Artificial Intelligence: Speech Recognition, Understanding and Practice, Phased Array Radar Technology, Radar Target Characteristics, and 100 Go Mistakes and How to Avoid Them, most of which centre on technical methods and engineering practice. Its authors include Shi Chuan, Li Zhong, Wang Xiaobo, David Patterson, Andrew Waterman, and Yu Zihao, among others from China and abroad. Owing to limited public information, no further publishing features are elaborated here.

Contents

  1. Chapter 1 Getting Started: Using Python for Penetration Testing, Preparing the Development Environment, Installing Third-Party Libraries
  2. Chapter 1 The Python Language: Variables, Strings, Lists, Dictionaries, Networking, Conditional Statements, Exceptions, Functions, Iteration, File I/O, sys and OS Modules
  3. Chapter 1 The First Programs: UNIX Password Cracker and Zip File Password Cracker
  4. Chapter 2 Penetration Testing with Python: Writing a Port Scanner (TCP Full-Connect Scan, Banner Grabbing, Threaded Scanning)
  5. Chapter 2 Using NMAP Port Scanning Code
  6. Chapter 2 Building an SSH Botnet with Python: Pexpect and SSH Interaction, Pxssh Brute Force, Exploiting Weak Private Keys
  7. Chapter 2 Mass-Harvesting “Bots” via FTP and the Web: Anonymous FTP Scanning, Ftplib Brute Force, Web Injection
  8. Chapter 2 Using Metasploit to Attack Windows SMB Services, Writing Scripts to Execute Processes Remotely
  9. Chapter 2 Writing Your Own 0day Proof-of-Concept Code: Stack-Based Buffer Overflow Attack
  10. Chapter 3 Forensic Investigation with Python (Introduction: Solving the BTK Murder Case Through Electronic Forensics)
  11. Subsequent Chapters: Network Traffic Analysis, Wireless Security, Website Information Gathering, Virus Antivirus Evasion and Chapter Summary, References

FAQ

这本书和《Violent Python》是什么关系?
本书即《Violent Python: A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers》的中文译本,由电子工业出版社 2016 年出版,列入“安全技术大系”丛书。
书中的代码现在还能直接运行吗?
书中代码基于较早期的 Python 2 环境与当年的目标系统,直接运行常有语法和依赖问题。建议先读懂逻辑,再改写为 Python 3 并在隔离靶场中验证。
零基础能读吗?
不太适合。第 1 章仅用很短篇幅回顾 Python 基础语法,随后立刻进入扫描器、爆破与取证脚本,读者最好已能独立写函数、处理文件和网络请求。
书里讲的内容是否涉及违法?
书中技术属于安全测试与取证知识,但必须在授权范围内使用。对自有实验环境、合法靶场或受委托的系统测试是正当用途,未经授权攻击他人系统属违法行为。

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.

Top rated in the same category