Question

In: Computer Science

Create a Python script in IDLE or Kali Python3 CLI to create the following Python Program:...

Create a Python script in IDLE or Kali Python3 CLI to create the following Python Program: Your program will create a username of your choice using a Kali Linux command "useradd -m mark", then set the password for that user using the Kali Linux Command "echo "mark:10101111" | chpasswd". Then you create a dictionary file using the Kali Linux command "crunch 8 8 01 > mylist.txt" Your python script should crack the password for that user and display on the screen. Hint: Use tool john the ripper in your Kali Linux command line: "john --wordlist=/home/kali/mylist.txt /home/kali/myhash.txt" Please submit the following: 1. Source Code of Python script 2. Screen shot of your output of either IDLE or Python3 Linux CLI showing your polygon.

Solutions

Expert Solution

Answer

here is your answer, here i executed linux command in python using os.system(). Here first i created a directory to do all the works together. Here we need to create a user called mark. And then create the passwor for user mark. Then we need to use the password cracker john the ripper. Note that if we created a user.It will create an entry in /etc/passwd file for that user.We need to crack that password.

So here is the full code, all commands are given in your problem.

import os
#executing linux commands
os.system('useradd -m mark1')
os.system('echo "mark:10101111" | chpasswd')
os.system('crunch 8 8 01 > mylist.txt')
os.system('unshadow /etc/passwd /etc/shadow > myhash.txt ')
os.system('john --wordlist=/root/pythondi/mylist.txt myhash.txt') #change with it based on your directory
os.system('john --show myhash.txt')

output

here we used unshadow command, So every user can execute the script on newly created hash.

Any doubt please comment

Thanks in advance


Related Solutions

In IDLE - Python 3, do the following: 1. Create File --> New 2. Enter the...
In IDLE - Python 3, do the following: 1. Create File --> New 2. Enter the code below in the new file (you may omit the comments, I included them for explanation #Python Code Begin x = int(input("Enter a number: ")) y = int(input("Enter another number: ")) print ("Values before", "x:", x, "y:", y) #add code to swap variables here #you may not use Python libraries or built in swap functions #you must use only the operators you have learned...
create a Python script that prompts the user for a title, description, and filename of your...
create a Python script that prompts the user for a title, description, and filename of your Python program and add the following to the bottom of the existing homepage: Add the post title with an emphasis Add the post description beneath the post title Create a hyperlink to the Python file using the filename input Create another hyperlink to the page you will create in the Web Showcase assignment
In this task, you will create a Python script in which you will practice reading files...
In this task, you will create a Python script in which you will practice reading files in Python and writing them to a new output file. Construct a text file called Py4_Task3_input.txt that has the following lines: 4 Sandwiches 04 July 2020 Pasta 31 October 2014 Hot Dogs 15 November 2005 Tacos 25 December 1986 The first line of the file represents the number of lines in the data file. Write a loop that reads in each additional line (one...
Using Python create a script called create_notes_drs.py. In the file, define and call a function called...
Using Python create a script called create_notes_drs.py. In the file, define and call a function called main that does the following: Creates a directory called CyberSecurity-Notes in the current working directory Within the CyberSecurity-Notes directory, creates 24 sub-directories (sub-folders), called Week 1, Week 2, Week 3, and so on until up through Week 24 Within each week directory, create 3 sub-directories, called Day 1, Day 2, and Day 3 Bonus Challenge: Add a conditional statement to abort the script if...
java script coding to create a math test program with 5 questions.
java script coding to create a math test program with 5 questions.
Write the following Python script: Imagine you live in a world without modules in Python! No...
Write the following Python script: Imagine you live in a world without modules in Python! No numpy! No scipy! Write a Python script that defines a function called mat_mult() that takes two lists of lists as parameters and, when possible, returns a list of lists representing the matrix product of the two inputs. Your function should make sure the lists are of the appropriate size first - if not, your program should print “Invalid sizes” and return None. Note: it...
The Objectives are to: Use IDLE IDE for Python. Develop a few simple Python programs and...
The Objectives are to: Use IDLE IDE for Python. Develop a few simple Python programs and show they will translate and run. Experience error messages when you enter bad syntax the interpreter cannot understand. Discussion: The best way to learn Python (or any programming language) is to write & run Python programs. In this lab you will enter two programs, and run them to produce the output. Then deliberately insert syntax errors to see what kinds of error messages you...
create a program using IDLE where you will gather input from the user using a loop....
create a program using IDLE where you will gather input from the user using a loop. The user needs to provide you with a list of test scores for two categories (two different classrooms). Test scores must be integer values between 0 and 10. You need to process each score so that you can output the following: Number of test scores entered for classroom A. Number of test scores entered for classroom B. Average of test scores entered for classroom...
create a program using IDLE where you will gather input from the user using a loop....
create a program using IDLE where you will gather input from the user using a loop. The user needs to provide you with a list of test scores for two categories (two different classrooms). Test scores must be integer values between 0 and 10. You need to process each score so that you can output the following: Number of test scores entered for classroom A. Number of test scores entered for classroom B. Average of test scores entered for classroom...
I am having a trouble with a python program. I am to create a program that...
I am having a trouble with a python program. I am to create a program that calculates the estimated hours and mintutes. Here is my code. #!/usr/bin/env python3 #Arrival Date/Time Estimator # # from datetime import datetime import locale mph = 0 miles = 0 def get_departure_time():     while True:         date_str = input("Estimated time of departure (HH:MM AM/PM): ")         try:             depart_time = datetime.strptime(date_str, "%H:%M %p")         except ValueError:             print("Invalid date format. Try again.")             continue        ...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT