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

Ex. 1.Create a Python script . Write a program that goes through a tupple of numbers...
Ex. 1.Create a Python script . Write a program that goes through a tupple of numbers representing the temperatures taken at regular intervals in a day, at least 6 of them. The program should store this tupple in a variable, and then computing the average temperature. For that, use a for loop going over the temperature and adding all the values to a variable sum, initialized as 0. Then at the end, divide the sum by their count, and output...
Python Create a Python script file called hw3.py. Ex. 1. Write a program that inputs numbers...
Python Create a Python script file called hw3.py. Ex. 1. Write a program that inputs numbers from the user until they enter a 0 and computes the product of all these numbers and outputs it. Hint: use the example from the slides where we compute the sum of a list of numbers, but initialize the variable holding the product to 1 instead of 0. print("Enter n") n = int(input()) min = n while n != 0: if n < min:...
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 reads in the contents of CityPop.csv and stores the data in...
Create a python script that reads in the contents of CityPop.csv and stores the data in a container. Task 2 will expect that your program can find cities by name within the container, so think about that as you set up your data container. Briefly describe how you store the data in comments. *It won't let me post the CSV file
Need the following program in Python: Create a program that calculates the estimated duration of a...
Need the following program in Python: Create a program that calculates the estimated duration of a trip in hours and minutes. This should include an estimated date/time of departure and an estimated date/time of arrival. Arrival Time Estimator Enter date of departure (YYYY-MM-DD): 2016-11-23 Enter time of departure (HH:MM AM/PM): 10:30 AM Enter miles: 200 Enter miles per hour: 65 Estimated travel time Hours: 3 Minutes: 5 Estimated date of arrival: 2016-11-23 Estimated time of arrival: 01:35 PM Continue? (y/n):...
using python3 Write a Python program that lets a user search through the 'data.txt' file for...
using python3 Write a Python program that lets a user search through the 'data.txt' file for a given first name, last name, or email address, and print all the matches/results. Prompt the user for which field to search, (f) for first name, (l) for last name, or (e) for email data.txt entries are all formatted as: first_name, last_name, email, separated by TABS Your program should not read the entire file into memory, it should read line by line, and only...
IN PYTHON create a python program that accepts input from the user in the following sequence:...
IN PYTHON create a python program that accepts input from the user in the following sequence: 1. Planet Name 2. Planet Gravitational Force(g) for data, use the planets of our solar system. The data input is to be written in 2 separate lists, the names of which are: 1. planetName 2. planet GravitationalForce(g) A third list is required that will store the weight of a person with mass of 100kg, the formula of which is: W=mg(where m is mass of...
In Kali Linux Write a script that ask the user to enter an IP address and...
In Kali Linux Write a script that ask the user to enter an IP address and a port number, then use the provided entries from the user to perform a query on your local network and determine if the given port is open on the provide network. Need to submit solutions for both below. 1.A short report showing the functionality of your code 2. your bash script
Create and Compile a Python Script without using Numpy that Generate an nxn matrix using Python...
Create and Compile a Python Script without using Numpy that Generate an nxn matrix using Python Script (ie n=user input) Ask (user input ) and (randomly generated) row and column location Assign Q to (known row and column location ) and 0 to all others location Please show compile script working as well
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
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT