Whenever you need some additional functionality in Python, you turn to the import keyword to pull in extras from Python modules. You've used common ones like the math module plenty of times.
Now, you will learn how to create your own Python modules and packages to compartmentalize your code. Modules are sort of like classes in that they make your code modular. While classes make code modular within a program and serve as the blueprints for objects, modules make all of your code modular across all programs and are utilities to be used just as they are.
Through the use of modules, you can create your own toolbox with all sorts of parts and pieces that you commonly use. Modules can include anything from variables and constants to functions and even classes. Because of this versatility, you can set yourself up to have everything that you need at the beginning of any project.
Polymorphism is yet another important aspect of Object Oriented Programming. No Warcraft fans, it doesn't have anything to do with turning people into sheep. That'd be much cooler. Instead, Polymorphism allows methods and functions to use classes with similar functionality in the same way.
Polymorphism cuts down on the amount of code that you need to write by eliminating redundancy in a logical and meaningful way. It relies on you, the programmer, to be clever in your design and harness similarities in objects.
What Is Polymorphism?
Polymorphism is one of those things that's hard to define in a single word or phrase. The term takes slightly different forms in different programming languages, making it a bit harder to pin down concisely. Generally speaking, and in Python, it's the ability of multiple different objects derived from different classes to be used in the same way.
To use the example of cars that this guide has been working with, imagine that you need to write a function that calls the move_forward method on any type of car that it's passed. Every object created from the original "Car" class or any of the subclasses that extend it should have a move_forward method, even if it's been overridden to do something slightly differently in some of the subclasses. This means that through polymorphism, you can write a single function that takes a "Car" object and calls move_forward. Since all of the objects instantiated from the subclasses of "Car" are still technically "Car" objects and have all of its original properties in some form or another, this will work.
Please note that the specification of a single superclass to use as an object type is not entirely necessary in Python. Python is not strongly typed, so you don't have to explicitly define which variable types a method or function takes. In languages like Java, this plays a role in how polymorphism behaves. However, in Python, it's a good idea to think of it along these lines to ensure that the objects that you pass will all have the method or property being used.
Hashcat is a robust password cracking tool that can help you recover lost passwords, audit password security, benchmark, or just figure out what data is stored in a hash.
There are a number of great password cracking utilities out there, but Hashcat is known for being efficient, powerful, and full featured. Hashcat makes use of GPUs to accelerate hash cracking. GPUs are much better and handling cryptographic work than CPUs are, and they can be utilized in much greater numbers than CPUs. Hashcat also supports a very wide range of popular hashes, to ensure that it can handle deciphering nearly any password.
Please note that misuse of this program can be illegal. Only test on systems that you own or have written permission to test on. Don't share or post hashes or results publicly. Hashcat should be used for password recovery and professional security audits.
Encrypting everything online is becoming more important by the day. Email is no different. For Linux users, the process is actually very simple with three common open source tools; Mozilla Thunderbird, Enigmail, and GNU PGP(GPG.) Through the use of these three tools, you can send and receive encrypted messages easily, and protect yourself and the people you're communicating with from attackers and privacy invasions.
Gathering The Pieces
The first thing that you will need in order to begin encrypting your emails is GPG. Since GPG is part of the GNU Project and is a common tool for generating encryption keys, it's likely to be in any distro's repositories. Use your package manager to install it.
Transferring files between computers can be a pain. FTP is somewhat clunky and old, and using online services isn't direct and is less than ideal for handling sensitive files. Git works well for code and text, but isn't the best for binary files and requires a repository to be configured. So, what's a good solution for sending files directly between computers? SFTP.
SFTP is a secure file transfer protocol that makes use of SSH to send files between computers. It is encrypted and direct. It allows you to use an existing service to send files, thereby reducing your attack surface, and it eliminates the need to rely on potentially vulnerable passwords for file transfers.