Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
violent-python3 — Source code for the book "Violent Python" by TJ O'Connor. The code has been fully converted to Python 3, reformatted to comply with PEP8 standards and refactored to eliminate dependency issues involving the implementation of deprecated libraries. | Kitploit
Tools/GitHubGitHub/eonraider/violent-python3
OSINT (Open Source Intelligence)ReconnaissanceBluetooth SecurityPassword AttacksExploitationForensicsWeb SecurityNetwork SecurityWireless SecurityPenetration TestingLearning & Education
1.0k179352 months agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
GitHub
eonraider/violent-python3

violent-python3

Source code for the book "Violent Python" by TJ O'Connor. The code has been fully converted to Python 3, reformatted to comply with PEP8 standards and refactored to eliminate dependency issues involving the implementation of deprecated libraries.

View Repository

Python 3 "Violent Python" Source Code

Source code for the book "Violent Python" by TJ O'Connor. The code has been fully converted to Python 3, reformatted to comply with PEP8 standards and refactored to eliminate dependency issues involving the implementation of deprecated libraries.

A conversion similar to this one has been made available by myself on the source code of the book "Black Hat Python", by Justin Seitz. Check it out here if you haven't done it yet.

Usage

Simply make a new directory (DIR) for the project, create a new virtual environment or venv for it (recommended), clone this repository using git clone and install the requirements using pip install.

user@host:~/DIR$ git clone https://github.com/EONRaider/violent-python3
user@host:~/DIR$ python3 -m venv venv
user@host:~/DIR$ source venv/bin/activate
(venv) user@host:~/DIR$ pip install -r requirements.txt

Notes

  • The directories and files have been named in a way that they can be easily related to the content that is presented at each chapter.
  • The frequent use of string concatenation by the author has been replaced by string interpolation in order to allow greater readability and conform to a more modern standard.
  • Names of files, variables, functions, classes and methods now conform to PEP 8 naming standards.
  • The now deprecated optparse library has been replaced for argparse throughout the entire source code. All argument parsing is now contained under the __main__ execution scope for each file. All CLI arguments that were mandatory for the execution of scripts but were treated as optional in the original code are now implemented as positional. A usage prompt is now available for all scripts that use argparse by supplying a -h argument to the CLI. Leaving the responsibilities of both boundary and controller object to the CLI parser is definitely not the best choice in terms of software architecture, but was left as-is due to the necessity of conformity to the original coder's intent.
  • All occurrences of PEP 8: E722 do not use bare except violations have been refactored with more specific exception clauses.
  • The author has a habit of opening files/databases and leaving them in this state instead of calling the close() method on the open file/database objects. For this reason all instances of file and database manipulation have been refactored by using context managers.
  • The use of comments making reference to the encoding to be used by the interpreter (namely, # -*- coding: utf-8 -*-) was eliminated due to the standardization of UTF-8 as the default encoding for Python 3 (replacing ASCII from Python 2).
  • Though completely inadequate from the perspective of best-practices, the use of global variables was left untouched in preference to producing heavy deviations from the original code's logic.
  • The code included in Chapter 5 of the book has been refactored even though in practical terms it can be, at best, historical. Much of its functionality depends not only on very specific cases outlined as examples by the author but also exploit vulnerabilities that ceased to be realistic in the last few years (such as sniffing traffic from 802.11 wireless networks that still rely on the WEP security algorithm for traffic encryption or, worst, that maintain no security at all) or the absurd expectation of acquisition of a specific UAV model by the reader if he intends to see the code at work. To avoid stating straight away that the effort invested in reading this chapter is nearly pointless, I might add that some utility can be extracted from the code related to the sniffing of probing and beacon requests, though.
  • The code on Chapter 6 that makes reference to Google and Twitter proved too outdated in the way they handle current APIs to be worth the trouble of refactoring. If you're interested in dealing with them, perform the refactoring and issue a pull request to this repository.
Download Tool