Ethical Hacking Introduction to Python
Submitted by Souvick Moulick (Department :BCA,Batch : 2017-2020)
University Roll No :15201217017
When you work with Python, you should be aware of the different units of data that you will use in your code. These variables and identifiers are held in the computer’s memory, and its value can be changed by making a modification to a value that is already present in the variable. This Article is an introduction to python and the different types of variables that you can use when writing a program in Python. You will also learn how these variables can be used to convert your designs into working codes using Python. This is when you begin real programming or scripting.
What is Ethical Hacking?
Hacking has been a part of computing for almost five decades and it is a very broad
discipline, which covers a wide range of topics. The first known event of hacking had taken
place in 1960 at MIT and at the same time, the term "Hacker" was originated.
Hacking is the act of finding the possible entry points that exist in a computer system or a
computer network and finally entering into them. Hacking is usually done to gain
unauthorized access to a computer system or a computer network, either to harm the systems or to steal sensitive information available on the computer.
Hacking is usually legal as long as it is being done to find weaknesses in a computer or network system for testing purpose. This sort of hacking is what we call Ethical Hacking.
Python Keywords
Python is a general-purpose scripting language that has gained immense popularity amongst professionals and beginners for its simplicity and powerful libraries. Python is insanely versatile and can be used for almost any kind of programming. From building small scale scripts that are meant to do banal task to large scale system applications – Python can be used anywhere and everywhere. In fact, NASA actually uses Python for programming their equipment and space machinery. Python can also be used to process text, display numbers or images, solve scientific equations, and save data. In short, Python is used behind the scenes to process a lot of elements you might need or encounter on your devices.
Why use Python for Ethical Hacking?
Without developing some of the basic scripting skills, aspiring hacker will be condemned to realm of the script kiddie. This actually means you will be limited to using the tools that are developed by someone else, which actually decrease your probability of success and increases your probability being detected by antivirus (AV) software, intrusion detection systems (IDS), or law enforcement. With some scripting skills, you can elevate to a professional hacker.
Python has some very important features which make it very useful for hacking, but probably most importantly, it has some pre-built libraries which provide some great functionality. Python comes with over 1,000 modules and many more are available in different other repositories.
So python is:
Simple: Simple is better than Complex and Complex is better than complicated.
Can be both simple and powerful.
Free, Open Source and a High-level Language.
Object Oriented Language and Interpreted Language.
Has a rich set of libraries.If you want to excel you skills in Python language learning Black hat Python is your best bet.Apart from Python, there are many other languages like C and C++ which are very useful to become an efficient hacker. Since C is a low level language and a very powerful language.. it will be an excellent addition to your profile.
Understanding the Naming Convention
Let us talk about the words that you can use and those you cannot use. Every variable name must always begin with an underscore or a letter. Some variables can contain numbers, but they cannot start with one. If the interpreter comes across a set of variables that begin with a number instead of quotation marks or a letter, it will only consider that variable as a number. You should never use anything other than an underscore, number or letter to identify a variable in your code. You must also remember that Python is a case-sensitive language; therefore false and False are two different entities. The same can be said for variable, variable and Variable. As a beginner, you must make a note of all the variables you use in your code. This will also help you find something easier in your code.
Recognizing Different Types of Variables
The interpreter in python recognizes different types of variables – sequences or lists, numbers, words or string literals, Booleans and mappings. These variables are often used in Python programs. A variable None has a type of its own called None-Type. Before we look at how words and numbers can be used in Python, we must first look at the dynamic typing features in Python. I hope this article gives you a basic understanding of the introduction of python programming.
Dictionary Attack
On the other side, a dictionary attack typically receives its passwords from a file containing a pre-generated list of passwords which are most likely to be successful. This is why it’s common for the dictionary to be used in a dictionary attack. However, that doesn’t mean the words have to be human readable words. They can contain only digits or even special characters if that were appropriate.