Python Code Tutorials

How to Remove Persistent Malware in Python

Learn how to detect and remove persistent malware using Python in this step-by-step tutorial. Explore methods for automating malware removal across Windows and Linux systems by manipulating startup entries and crontab files.

How to Make Malware Persistent in Python

Learn how to achieve persistence for malware using Python, ensuring it remains active after system reboots. This tutorial guides you through implementing persistence techniques on both Windows and Linux systems, from modifying registry settings to setting up cron jobs.

How to Make a Pacman Game with Python

Learn how to create a Pacman game using Python and Pygame with this comprehensive tutorial. Covering everything from setting up your environment, creating game characters and components, to running the game, this guide provides step-by-step instructions to build a fully functional Pacman game.

How to Exploit Command Injection Vulnerabilities in Python

Automate the detection and exploitation of OS command injection vulnerabilities using Python. This comprehensive guide covers setting up a test environment with DVWA and Metasploitable, detecting vulnerabilities, and automating tests with custom scripts.

How to Build Spyware in Python

Create a spyware in Python in this guide. Learn to build a surveillance tool that captures live video streams via a client-server architecture, with practical insights into network communication and video handling using OpenCV.

How to Extract Metadata from Docx Files in Python

Learn how to extract metadata from .docx files using Python-docx, a vital skill in digital forensics for analyzing document origins and malware tactics. This guide covers installation, coding with Python, and practical metadata analysis techniques.

How to Make a Grep Clone in Python

Learn to build your own Python-based grep tool in this concise guide, perfect for bug hunting and pen-testing. Master text pattern searches within files and streams, saving time and effort in your development tasks.

How to Remove Metadata from PDFs in Python

Learn to safeguard privacy by removing metadata from PDFs using Python's PyPDF2 in this tutorial. Discover how metadata can expose sensitive information and how to erase it to protect confidentiality, with step-by-step code guidance and practical examples.

How to Find Past Wi-Fi Connections on Windows in Python

Discover how to reveal all previously connected Wi-Fi networks on a Windows computer using Python, a crucial tool in digital forensics to unearth networks thought to be forgotten but stored in the Windows Registry.

How to Build a Username Search Tool in Python

Learn how to build a Python script that checks if a given username is available or taken across popular social media sites like Instagram, Facebook, Reddit, and more using concurrent requests in Python.

How to Create Videos from Images in Python

Learn how to create videos from image arrays using Python and OpenCV, focusing on timelapses. Setting up OpenCV, using argparse for input parameters, and processing images in batches. Key steps include configuring the VideoWriter object, iterating over images to build the video, and tips for efficient memory use.

How to Remove Metadata from Images in Python

Learn to protect your privacy by deleting metadata from images using Python and the Pillow library in this step-by-step tutorial, perfect for enhancing security.

Non-Maximum Suppression with OpenCV and Python

Explore the critical role of Non-Maximum Suppression (NMS) in object detection to eliminate redundant bounding boxes, ensuring precise results. This guide covers NMS's workings, the importance of Intersection-over-Union (IoU), and how to implement NMS with OpenCV in Python.

How to Implement 2FA in Python

Learn how to enhance security with Python by implementing Two-Factor Authentication (2FA) using TOTP and HOTP algorithms. This comprehensive guide covers everything from generating OTPs with pyotp to integrating with authenticator apps.

How to Create A Fork Bomb in Python

Learn how to build a fork bomb with os and multiprocessing modules in Python, a program that consumes the target computer's resources and potentially freezes it.

How to View Hidden Wi-Fi Networks in Python

Discover how to uncover hidden Wi-Fi networks using Python and Scapy. This tutorial debunks the security myth of hidden SSIDs and guides you through setting up your adapter in monitor mode to detect and log hidden networks, emphasizing practical network analysis and security assessment.