PRO-C223: What Is Our GOAL For This CLASS?
PRO-C223: What Is Our GOAL For This CLASS?
Understanding concepts:
PRO-C223
Cyber Security:
Cyber security refers to the technologies, processes, and practices designed to
protect networks, devices, programs, and data from attack, damage, or unauthorized
access.
Brute Force Attack:
A brute force attack uses trial-and-error to guess user passwords. In brute force attack, a
list of commonly used passwords is used against a user account or protected documents,
such as 123456, password123, qwerty, abc123 or it runs an algorithm against an encrypted
password.
2. The zipfile module :Python has an inbuilt module named zipfile that can be used to
access zip files. Open the terminal and install the dependencies
● Import zipfile
● Import time to check the time to decode the password
● Get the folder path using input
● Initialize zipfile object
● Write the if statement to check if the folder is password protected or not, if not
then print the message.
● Else start the timer, initialize a variable result with ‘0’ will indicate Failure,
while ‘1’ will indicate Success
● Initialize a variable c to keep the count of passwords tried
● Build a character array including all numbers, lowercase letters
● Print “Brute Force started”
PRO-C223
● If no four-character password is found, print the password not found along with the
time and number of times it was tried.
● Else password found, print the duration and display the number of times the password
has been tried along with congratulation message
● Else its password protected then initialize the variable wordlist. File,open the
file “wordlist.txt”, ”r” represents read mode and ignore errors if any.
● Intilalize the body variable as a reference to wordListFile content.lower()
function will convert and read all characters in lower case only.
● Use split() function to fetch different passwords on different lines and store it
in an array with name words.
● Apply a for loop on words which will iterate till the length of the array
“words”.
● Initialize the current value of array in variable “word”.
● pdfReader.decrypt(word) function will try to decrypt the password encrypted
file using the current value of word as password.
● The result of the same will be stored in the variable result.
● If the function is able to decrypt the file successfully it will return the value of
result as 1 and the break keyword will break the for loop,
● Else the value of result will be 0 and it will continue to the next word in array
words.
● Print the value of the result.
PRO-C223
5. While running the program needs to get a folder path. Right click on the folder whose
password you want to decode, check the location, copy the location path followed by
the folder name.
Hence we cracked the password.
What’s NEXT?
In the next class we will be learning about phishing.