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

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
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...
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
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
What would these commands look like in Kali Linux? In Kali Linux: a) Create a user...
What would these commands look like in Kali Linux? In Kali Linux: a) Create a user (username= YOUR-FIRSTNAME). b) Create a file (filename=test) and use chmod command to add the write permission for Others. c) Use setfacl to remove write permission to YOUR-FIRSTNAME user. Use getfacl to check the file's permissions. d) Remove YOUR-FIRSTNAME user. Deliverable(Screenshots from each section if possible please)
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT