Python is fast becoming the programming language of choice for hackers, reverse engineers, and software testers because it's easy to write quickly, and it has the low-level support and libraries that make hackers happy. But until now, there has been no real manual on how to use Python for a variety of hacking tasks. You had to dig through forum posts and man pages, endlessly tweaking your own code to get everything working. Not anymore.
Gray Hat Python explains the concepts behind hacking tools and techniques like debuggers, trojans, fuzzers, and emulators. But author Justin Seitz goes beyond theory, showing you how to harness existing Python-based security tools - and how to build your own when the pre-built ones won't cut it.
You'll learn how to:
Automate tedious reversing and security tasks
Design and program your own debugger
Learn how to fuzz Windows drivers and create powerful fuzzers from scratch
Have fun with code and library injection, soft and hard hooking techniques, and other software trickery
Sniff secure traffic out of an encrypted web browser session
Use PyDBG, Immunity Debugger, Sulley, IDAPython, PyEMU, and more
The world's best hackers are using Python to do their handiwork. Shouldn't you?
This book offers Python programmers one place to look when they need help remembering or deciphering the syntax of this open source language and its many powerful but scantily documented modules. This comprehensive reference guide makes it easy to look up the most frequently needed information--not just about the Python language itself, but also the most frequently used parts of the standard library and the most important third-party extensions.
Ask any Python aficionado and you'll hear that Python programmers have it all: an elegant object-oriented language with readable and maintainable syntax, that allows for easy integration with components in C, C++, Java, or C#, and an enormous collection of precoded standard library and third-party extension modules. Moreover, Python is easy to learn, yet powerful enough to take on the most ambitious programming challenges. But what Python programmers used to lack is a concise and clear reference resource, with the appropriate measure of guidance in how best to use Python's great power. Python in a Nutshell fills this need.
Python in a Nutshell, Second Edition covers more than the language itself; it also deals with the most frequently used parts of the standard library, and the most popular and important third party extensions. Revised and expanded for Python 2.5, this book now contains the gory details of Python's new subprocess module and breaking news about Microsoft's new IronPython project. Our "Nutshell" format fits Python perfectly by presenting the highlights of the most important modules and functions in its standard library, which cover over 90% of your practical programming needs. This book includes:
A fast-paced tutorial on the syntax of the Python language
An explanation of object-oriented programming in Python
Coverage of iterators, generators, exceptions, modules, packages, strings, and regular expressions
A quick reference for Python's built-in types and functions and key modules
Reference material on important third-party extensions, such as Numeric and Tkinter
Information about extending and embedding Python
Python in a Nutshell provides a solid, no-nonsense quick reference to information that programmers rely on the most. This book will immediately earn its place in any Python programmer's library.
Praise for the First Edition:
"In a nutshell, Python in a Nutshell serves one primary goal: to act as an immediately accessible goal for the Python language. True, you can get most of the same core information that is presented within the covers of this volume online, but this will invariably be broken into multiple files, and in all likelihood lacking the examples or the exact syntax description necessary to truly understand a command." --Richard Cobbett, Linux Format
"O'Reilly has several good books, of which Python in a Nutshell by Alex Martelli is probably the best for giving you some idea of what Python is about and how to do useful things with it." --Jerry Pournelle, Byte Magazine
About this product: This book is designed to be used as the primary textbook in a college-level first course in computing. It takes a fairly traditional approach, emphasizing problem solving, design, and programming as the core skills of computer science. However, these ideas are illustrated using a non-traditional language, namely Python.
Although I use Python as the language, teaching Python is not the main point of this book. Rather, Python is used to illustrate fundamental principles of design and programming that apply in any language or computing environment. In some places, I have purposely avoided certain Python features and idioms that are not generally found in other languages. There are already many good books about Python on the market; this book is intended as an introduction to computing.
Features include the following: *Extensive use of computer graphics. *Interesting examples. *Readable prose. *Flexible spiral coverage. *Just-in-time object coverage. *Extensive end-of-chapter problems.
This book offers a highly accessible introduction to natural language processing, the field that supports a variety of language technologies, from predictive text and email filtering to automatic summarization and translation. With it, you'll learn how to write Python programs that work with large collections of unstructured text. You'll access richly annotated datasets using a comprehensive range of linguistic data structures, and you'll understand the main algorithms for analyzing the content and structure of written communication.
Packed with examples and exercises, Natural Language Processing with Python will help you:
Extract information from unstructured text, either to guess the topic or identify "named entities"
Analyze linguistic structure in text, including parsing and semantic analysis
Access popular linguistic databases, including WordNet and treebanks
Integrate techniques drawn from fields as diverse as linguistics and artificial intelligence
This book will help you gain practical skills in natural language processing using the Python programming language and the Natural Language Toolkit (NLTK) open source library. If you're interested in developing web applications, analyzing multilingual news sources, or documenting endangered languages -- or if you're simply curious to have a programmer's perspective on how human language works -- you'll find Natural Language Processing with Python both fascinating and immensely useful.
We are visual animals. But before we can see the world in its true splendor, our brains, just like our computers, have to sort and organize raw data, and then transform that data to produce new images of the world. Beginning Python Visualization: Crafting Visual Transformation Scripts talks about turning many types of small data sources into useful visual data. And you will learn Python as part of the bargain.
What you’ll learn
Write ten lines of code and present visual information instead of data soup.
Set up an open source environment ready for data visualization.
Forget Excel: use Python.
Learn numerical and textual processing.
Draw graphs and plots based on textual and numerical data.
Learn how to deal with images.
Who is this book for?
IT personnel, programmers, engineers, and hobbyists interested in acquiring and displaying data from the Web, sensors, economic trends, and even astronomical sources.
About the Apress Beginning Series
The Beginning series from Apress is the right choice to get the information you need to land that crucial entry–level job. These books will teach you a standard and important technology from the ground up because they are explicitly designed to take you from “novice to professional.” You’ll start your journey by seeing what you need to know—but without needless theory and filler. You’ll build your skill set by learning how to put together real–world projects step by step. So whether your goal is your next career challenge or a new learning opportunity, the Beginning series from Apress will take you there—it is your trusted guide through unfamiliar territory!
About this product: Dive Into Python is a Python book for experienced programmers. Whether you're an experienced programmer looking to get into Python or grizzled Python veteran who remembers the days when you had to import the string module, Dive Into Python is your 'desert island' Python book. If you've never programmed before, Python is an excellent language to learn modern programming techniques. But this book should not be your starting point. Get "How to Think Like a Computer Scientist: Learning with Python" by Allen Downey, Jeffrey Elkner, Chris Meyers and learn the basics. Then dive into this book. Dive Into PYTHON was written by Mark Pilgram and is distributed under the GNU Free Documentation License. * Money raised from the sale of this book supports the development of free software and documentation.
An easy and convenient approach to testing your powerful Python projects
Covers everything you need to test your code in Python
Easiest and enjoyable approach to learn Python testing
Write, execute, and understand the result of tests in the unit test framework
Packed with step-by-step examples and clear explanations
In Detail
Automated testing moves much of the labor of testing off the developer and makes it easier as well as quicker to find bugs and fix them. Automated tests run faster, increase test coverage, and lower costs. However, testing is neither an easy process nor remotely exciting for most developers. But with the right techniques and tools, testing can become a simple and gratifying part of the development process.
With this helpful guide - from an expert - in your hand, testing will not be a tiresome topic for you anymore. You will learn how to test your Python projects in the easiest way, making other parts of the development process easier and more enjoyable.
This book covers the tools and techniques of automated testing and test-driven development. Starting from the very basics, the chapters introduce new tools and techniques in simple, accessible language with step-by-step examples. You will explore how to make testing easier and more accurate with Python's doctest module and learn test-driven development using the unittest framework. You will also learn how to keep your units separate from each other and discover a simple and easy way to integrate Mocker and unittest. Next, we cover integration testing and web application testing.
Automated testing gives developers better feedback, faster and more often. Bugs get found sooner and fixed better, with less effort. By the end of this book, you will have all of the skills needed to benefit from automated testing.
What you will learn from this book
Make testing easy and convenient with Python's doctest module, which lets you put your tests right into your doc strings
Drive development using unit testing and learn how it can make the process quicker
Explore the assorted features Mocker provides to help you keep units separate from each other and customize it to suit your needs
Embed your tests in a controlled and temporary environment using test fixtures
Simplify the integration of unittest and Mocker using Python Mocker's MockerTestCase
Automatically find and execute tests using Nose - a unittest-based testing framework for Python that makes writing and running tests easier
Write tests for web applications using Twill and integrate it's capabilities as a library into Python testing code
Create integration tests and run them to see if your programs work correctly in concert with each other
Run Nose automatically when your version control software detects changes in the source code
Set up the Buildbot automated continuous integration system to run your tests repeatedly over many different environments
Chapter 1 introduces Python test-driven development and various testing methods.
Chapter 2 covers the doctest tool and teaches you how to use it.
Chapter 3 introduces the ideas of unit testing and test-driven development, and applies doctest to create unit tests.
Chapter 4 covers mock objects and the Python Mocker tool.
Chapter 5 introduces the unittest framework and discusses when it is preferred over doctest.
Chapter 6 introduces the Nose test runner, and discusses project organization.
Chapter 7 walks through a complete test-driven development process.
Chapter 8 applies the knowledge gained from previous chapters to web applications, and introduces the Twill tool.
Chapter 9 teaches how to build up from unit tests to tests of a complete software system.
Chapter 10 introduces code coverage and continuous integration, and teaches how to tie automated testing into version control systems.
Approach
The book begins with the very foundations of automated testing, and expands on them until the best-practice tools and techniques are fully covered. New concepts are illustrated with step-by-step hands-on exercises. Testing will be easier and more enjoyable with this beginner's guide.
Who this book is written for
If you are a Python developer and want to write tests for your applications, this book will get you started and show you the easiest way to learn testing.
You need to have sound Python programming knowledge to follow along. An awareness of software testing would be good, but no formal knowledge of testing is expected nor do you need to have any knowledge of the libraries discussed in the book.
About this product: Beginning Python: Using Python 2.6 and Python 3.1 introduces this open source, portable, interpreted, object-oriented programming language that combines remarkable power with clear syntax. This book enables you to quickly create robust, reliable, and reusable Python applications by teaching the basics so you can quickly develop Web and scientific applications, incorporate databases, and master systems tasks on various operating systems, including Linux, MAC OS, and Windows. You’ll get a comprehensive tutorial that guides you from writing simple, basic Python scripts all the way through complex concepts, and also features a reference of the standard modules with examples illustrating how to implement features in the various modules. Plus, the book covers using Python in specific program development domains, such as XML, databases, scientific applications, network programming, and Web development.
About this product: Mark Pilgrim's Dive Into Python 3 is a hands-on guide to Python 3 (the latest version of the Python language) and its differences from Python 2. As in the original book, Dive Into Python, each chapter starts with a real, complete code sample, proceeds to pick it apart and explain the pieces, and then puts it all back together in a summary at the end. Dive Into Python 3 is a Python book for experienced programmers. Whether you're an experienced programmer looking to get into Python 3 or grizzled Python veteran who remembers the days when you had to import the string module, Dive Into Python 3 is your 'desert island' Python 3 book. If you've never programmed before, Python 3 is an excellent language to learn modern programming techniques. But this book should not be your starting point. Get "How to Think Like a Computer Scientist: Learning with Python" by Allen Downey, Jeffrey Elkner, Chris Meyers and learn the basics. Then dive into this book. Dive Into PYTHON 3 was written by Mark Pilgram, and this edition is distributed under the terms of the Creative Commons Attribution Share-Alike License 3.0. * Money raised from the sale of this book supports the development of free software and documentation. About the Author: By day, Mark Pilgrim is a developer advocate for open source and open standards. By night, he is a husband and father who lives in North Carolina with his wife, his two sons, and his big slobbery dog. He spends his copious free time sunbathing, skydiving, and making up autobiographical information.
About this product: From the 1970s cult TV show, Monty Python’s Flying Circus, to the current hit musical Spamalot, the Monty Python comedy troupe has been at the center of popular culture and entertainment. The Pythons John Cleese, Graham Chapman, Eric Idle, Terry Jones, Michael Palin, and Terry Gilliam are increasingly recognized and honored for their creativity and enduring influence in the worlds of comedy and film. Monty Python and Philosophy extends that recognition into the world of philosophy. Fifteen experts in topics like mythology, Buddhism, feminism, logic, ethics, and the philosophy of science bring their expertise to bear on Python movies such as Monty Python’s Life of Brian and Flying Circus mainstays such as the Argument Clinic, the Dead Parrot Sketch, and, of course, the Bruces, the Pythons’ demented, song-filled vision of an Australian philosophy department. Monty Python and Philosophy follows the same hit format as the other titles in this popular series and explains all the philosophical concepts discussed in laymen’s terms.