CIS256_4
.docx
keyboard_arrow_up
School
ECPI University, Greensboro *
*We aren’t endorsed by this school
Course
256
Subject
Computer Science
Date
Jan 9, 2024
Type
docx
Pages
2
Uploaded by corada5995
CIS256 — 4.6 — Redirecting Folders with Group Policy Corey Adams PS C:\Users\Administrator> Invoke-Pester C:\Scripts\GPl6-Redirecting_Folders_with_Group_P Run only scripts that you trust. Wlhile scripts from the internet can be useful, thi script can potentially harm your computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run C:\Scripts\GP1l6-Redirecting_Folders_with_Group_Policy.test.psl? [D] Do not rur [R] CUTLIET TS N T TC TV T R | I-Io:l.p (d.fault b H ing Folders with Grol Adams-VM-Host D981042-F735-D475-CEF3-6598A85DCRCC Monday, September 19, 2022 1:4 ' 63799192080910322 Folder Redirection Policy | Verifying Charlotte MFM olic 637991920809884500 o
637991920809884500 2 7C3E10670F36F32980B19FA3DF60815A052D179FAD5B01647B2444497C86BC20 C:\Scripts\GP16-Redirecting Folders_with_Group_Policy.test.ps Tests completed in 6.56s ests Passed: 9, Failed : PS C:\Users\Administrator> g
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Lab4: Network Security with Cryptography - Implementation
Objective: This lab will be able to implement cryptography
Task1: In Lab2, you identified the top tools that can provide
1. Confidentiality
2. Integrity
3. Authentication
Implement any 1 of it (one on Windows and another on Linux) and encrypt a file.
Provide 5 different tools that can serve this purpose
Tool Name
Operating
Name of the
Are you using
symmetric or
Name of the
Algorithm you
plain text file
Asymmetric
you used for
used for
Encryption
encryption?
encryption
What is the
key you used
arrow_forward
Bash Shell Scripting – Simple File System Navigation
Write a bash shell script with the following capabilities:
Create a bash script ~/test1.sh with any text editor.
Write a bash script that does the following:
Echo your current directory to the screen.
Change directory to your home directory.
Change directory to a child directory within your home directory.
List all of the files that end with .c within the child directory.
Navigate back to your home directory.
Run your script after doing a chmod 777 on the script.
Take a screenshot of the console output.
arrow_forward
Brute Attack on FTP server (KALI -LINUX)
The file you downloaded contains the 100 most common passwords. Load the file in the Metasploit framework by setting the PASS_FILE variable. When you run the command, after some time, you will see a connection error and it says ‘scan complete’ but in reality, it is not. Why do you think that the first few scans went unsuccessful and then the connection error appears? Verify your answer using a log file generated at the victim’s machine. Furthermore, explain how you can circumvent this problem and show at least one working solution.
Upload the log file generated at the victim's machine which shows the first few scans went unsuccessful and then the connection error appears.
Also, include your answer and explain how you can avoid this problem.
arrow_forward
Securing a network from attacks means a network administrator is watching traffic and user activity. Change detection (CD) is a method used to track changes in your network. CD can detect files accessed during off hours to more complex algorithmic detections added to software applications that manage this process.
This program is going to manage user login times and attempt to detect any change in a users typical login attempts. It will use an input file to store data and read the file using the csv.reader( ) method. The file will contain a list of login_names, followed by login_time separated by commas.
Write a program that first reads in the name of an input file, reads the information stored in that file and determines if the user login has occurred at off hour times. The company employees work from 9 am to 5 pm so any other time would be an off hour login attempt. If the login attempt is made after hours, store the user name and login time in a dictionary with the user name as the…
arrow_forward
Bash Shell Scripting – Simple File Manipulation
Write a bash shell script with the following capabilities:
Create a bash script ~/test2.sh with any text editor.
Write a bash script that does the following:
Change directory to your home directory.
Create a child directory called mycode.
Change to the mycode directory.
Copy all files that end with .c that you have developed in this course to the mycode directory.
Navigate up a directory.
Create a new child directory called mycode2.
Copy all files from the mycode directory to the mycode2 directory.
Rename the mycode directory to deadcode.
Remove the deadcode directory and all its files.
Run your script after doing a chmod 777 on the script.
Take a screenshot of the console output.
arrow_forward
Book reference: Windows PowerShell Step by Step 3rd Edition - Ed WilsonChapter 18
11. What is one troubleshooting method of using the suspend option while stepping through a script?
12. What is the use of the –Strict parameter in the Set-PSDebug cmdlet?
13. What is a key difference between the Set-PSDebug cmdlet the Set-StrictMode cmdlet.
arrow_forward
Bash Shell Scripting – Misc. Commands
Write a bash shell script with the following capabilities:
Create a bash script ~/test3.sh with any text editor.
Write a bash script that does the following:
Declare a local variable to save your name.
Declare another variable that stores your age.
Echo both variables to the screen.
Take a screenshot of the console output.
Create a bash script ~/test4.sh with any text editor.
Write a bash script that does the following:
echo "File Name: $0"
echo "First Parameter : $1"
echo "Second Parameter : $2"
echo "Quoted Values: $@"
echo "Quoted Values: $*"
echo "Total Number of Parameters : $#"
Take a screenshot of the console output.
Run your scripts after doing a chmod 777 on the script.
Open a terminal window and run the following commands:
which gcc
man gcc
arrow_forward
shell scripting
arrow_forward
How can I fix this error when I run the script?
arrow_forward
QUESTION 2: A Backup Script
Write a script called: backup SWITCH FILES DEST MESSAGE
Example: ./backup -D ~/source/*.c ~/backup
Where:
SWITCH is optional: -D for deleting original files after backup. If not
present, the original files to be backed-up are not deleted.
FILES is the path, using wild cards, of the files to be backed-up.
DEST is the path to the backup directory.
MESSAGE is a multiword description about the backup. It will be added to a log
file.
Use vi to create the script.
The script must do the following in the order presented:
1. Make sure the script is running under Bash.
2.
Verify that the script has the correct number of arguments. If it does not the script
must terminate with the following error message: "You have the incorrect number
of arguments. The correct syntax is: ./backup SWITCH FILES DEST MESSAGE.
Please try again."
3. Verify that the DEST directory exists. If it does exist, then do nothing. If it does
not exist, then create the directory.
4. Using the TAR…
arrow_forward
Q4 Using the Linux Shell write a script that takes two files as arguments and determine if they are hard links of each other by comparing inode values. Test with two files with the name inode, a file against itself, two different files and a file against a symbolic link to itself.
arrow_forward
Downloads/
ht 8 (File X
English
localhost:8888/notebooks/Downloads/CSE110%20Lab%20Assignment%208%20(File%201_0%20%26%20Exception).ipynb
Cjupyter CSE110 Lab Assignment 8 (File I_O & Exception) Last Checkpoint: 6 hours ago (unsaved changes)
Logout
File
Edit
View
Insert
Cell
Kernel
Widgets
Help
Trusted
Python 3 O
• Run
с
Code
Task 10
Write a python program that finds the corresponding energy values from a list of frequency values which are taken as input from the user, using the formula,
E = h * f, where h is a constant of value: 1050
Exceptions to handle:
• Make sure all elements in the lists are numbers
Example 1:
Input:
[2,3]
Output:
[2100, 3150]
====
Example 2:
Input:
[2,boss]
Output:
Wrong input type
In [ ]: #to do
OneDrive
Screenshot saved
Task 11
The screenshot was added to your
OneDrive.
Imagine Salman Khan is going to the sets of a new movie. He decides to cycle everyday on his way to the sets. For that he uses a distan
finds the distance based on the present day's date, which is…
arrow_forward
Downloads/
ht 8 (File X
English
localhost:8888/notebooks/Downloads/CSE110%20Lab%20Assignment%208%20(File%201_0%20%26%20Exception).ipynb
Cjupyter CSE110 Lab Assignment 8 (File I_O & Exception) Last Checkpoint: 6 hours ago (unsaved changes)
Logout
File
Edit
View
Insert
Cell
Kernel
Widgets
Help
Trusted
Python 3 O
• Run
Code
Task 9
Write a python program that will take a string input from the user. Your task is to count the number of vowels and consonants in the string.
Using try, if the number of vowels is greater than or equal to the number of consonants, then raise a runtime error. Print 'Number of vowels greater/equal to
consonants. Please paraphrase.'.
Otherwise, print 'The sentence will work.'.
Note: a,e,i,o,u are called vowels and all the other 21 english alphabets are consonants.
=====:
Example 1:
Input:
'his age is 10'
Output:
Number of vowels greater/equal to consonants. Please paraphrase.
Example 2:
Input:
'he is 10 years old'
Output:
The sentence will work.
In [ ]: #to do
Task…
arrow_forward
Downloads/
ht 8 (File X
English
localhost:8888/notebooks/Downloads/CSE110%20Lab%20Assignment%208%20(File%201_0%20%26%20Exception).ipynb
Cjupyter CSE110 Lab Assignment 8 (File I_O & Exception) Last Checkpoint: 6 hours ago (unsaved changes)
Logout
File
Edit
View
Insert
Cell
Kernel
Widgets
Help
Trusted
Python 3 O
> Run
Code
Task 6
Given a list named my_list.
my_list = [10, 20, 30, 40, 60, 100, 2, 5]
Write a python program that takes the position as an input from the user and prints the element of that position from the list.
If the user's input position is not in the range, return an exception stating "Index out of range".
If the user's input position is not an Ingeter number, return an exception stating "For position, please enter an Integer value".
Make sure your program always prints "Program ended" at the end, no matter what happens.
Hint: Use finally block
Example 1:
Input:
1
Output:
20
Program ended
=======:
Example 2:
Input:
10
Output:
Index out of range.
8:28 PM
* 4)
1/4/2022
arrow_forward
Linux bin bash script to create a new user on your Linux system and assign the user to a group. The script will first check if the user and group exists. If the user exists, provide a message saying the user exists. If the user doesn’t exist, create the group, if it doesn’t exist, and then create the user, finally assign the user to the group. Move the script to /home//scripts/ directory. Change the group to techstaff. Set appropriate permissions.
arrow_forward
Downloads/
বায়ান্নো
English
nment 6 (Funct x
English
localhost:8888/notebooks/Downloads/CSE110%20Lab%20Assignment%206%20(Function).ipynb
C jupyter CSE110 Lab Assignment 6 (Function) Last Checkpoint: a minute ago (autosaved)
Logout
File
Edit
View
Insert
Cell
Kernel
Widgets
Help
Trusted
Python 3 O
+
个
• Run
Markdown
('Hi', 1, 2, 3, 'a', [1, 2])
In [ ]: # to do
Task 12
Write a python function that takes a list as an argument. Your task is to create a new list where each element can be present at max 2 times. Inside the
function, print the number of elements removed from the given list. Finally, return the new list and print the result.
======
Hint: You may use list_name.count(element) to count the total number of times an element is in a list. list_name is your new list for this problem.
=========
=======
Function Call:
function_name([1, 2, 3, 3, 3, 3, 4, 5, 8, 8])
Output:
Removed: 2
[1, 2, 3, 3, 4, 5, 8, 8]
===
Function Call:
function_name([10, 10, 15, 15, 20])
Output:
Removed: 0
[10,…
arrow_forward
Iba is modifying the basic NTFS permissions for a folder. She wants to enable the permission that is the
equivalent of enabling Write and Read & Execute permissions combined.
Which of the following options is the best choice?
a) Full Control
O b) Modify
C) List folder contents
d) Special permissions
e) Read+Write
f) All of these will work!
arrow_forward
Downloads/
CSE110 Lab Assignment 7 (Sortin x
English
O localhost:8888/notebooks/Downloads/CSE110%20Lab%20Assignment%207%20(Sorting%20and%20Searching).ipynb
Cjupyter CSE110 Lab Assignment 7 (Sorting and Searching) Last Checkpoint: 8 minutes ago (autosaved)
Logout
File
Edit
View
Insert
Cell
Kernel
Widgets
Help
Not Trusted
Python 3 O
• Run
с
Markdown
for i in range(len(my_list)):
for j in range(len(my_list)):
if my_list[i]>my_list[j]:
another_var=my_list[i]
my_list[i]=my_list[j]
my_list[j]=another_var
return my list
print('output: ' , bubble_sort([10,1,20,3,6,2,5,11,15,2,12,14,17,18,29]))
output: [29, 20, 18, 17, 15, 14, 12, 11, 10, 6, 5, 3, 2, 2, 1]
Task 4
Suppose you have a sitting arrangement of the students who will give the final exam in a list. The list contains the last two digits of their student ID as given
below.
sitting_list = [10,30,20,70,11,15,22,16,58,100,12,56,70,80]
Now you want to organize the sitting arrangement of the students in your own way. You decide to sort all the…
arrow_forward
Write a Bash script which: 1. Accepts a filename as a command-line argument. 2. Checks if the file exists in the current directory. 3. If the file exists, display its content in reverse order (last line first) on the terminal
arrow_forward
14) Using zenity, write script to display dialog box to enter First Name, then another dialog box to enter Last Name, andanother dialog box to enter password, where the password when entered is masked. Then these input should bedisplayed in single dialog box
scripts MUST be in bash shell linux commands
arrow_forward
QUESTION 22
The session_start () function in PHP does the following:
DA. starts a session automatically
OB. looks for a PHPSESSID cookie on the user's hard drive first
DC. starts a session if there is no PHPSESSID cookie
D. automatically creates a PHPSESSID first
E. writes the session variables on the user's hard drive
F. creates a PHPSESSID if there isn't one and writes it as a cookie on the user's hard drive
G. reads the PHPSESSID cookie value if there is already a session started
QUESTION 23
Session data:
A. is stored on the users hard drive only
OB. is stored on the servers hard drive
C. is available until the user closes the browser
D. b and c
QUESTION 24
the session_start() function in php does the following:
A starts a session automatically first thing
B. looks for a PHPSESSID cookie on the users hard drive first
C. starts a session if there is no PHPSESSID cookie on the users hard drive
D. creates a value for the PHPSESSID first
E. writes the session variables on the users hard…
arrow_forward
20. Create a linux bash script to get a filename as input and then it should check and display if file exist and size
is greater than zero, then should get input of any file comparison operator and then display if the file is true
or false for that given file comparison operator.
21. Create a linux bash script to get three numbers as positional parameters then display the greatest and least
of the given numbers. If positional parameters are not given then message "This script requires 3 numbers
as positional parameters, Try again.." should be displayed.
arrow_forward
Write a script that:
Deletes all previously created directories from C:\bkp\Firefox\
Writes the amount of memory used by Firefox to a file C:\bkp\Firefox\%DATE% %TIME%\firefox.txt (%DATE% and %TIME% are current date and time) (if Firefox is running)
Kills Firefox process (if it is running)
Archives content of the Firefox profile directory to C:\bkp\Firefox\%DATE% %TIME%\firefox.zip
Deletes the original Firefox profiles directory
Shuts down the computer
arrow_forward
Downloads/
ht 8 (File X
English
localhost:8888/notebooks/Downloads/CSE110%20Lab%20Assignment%208%20(File%201_0%20%26%20Exception).ipynb
C jupyter CSE110 Lab Assignment 8 (File I_O & Exception) Last Checkpoint: 6 hours ago (unsaved changes)
Logout
File
Edit
View
Insert
Cell
Kernel
Widgets
Help
Trusted
Python 3 O
+
• Run
с
Code
Task 11
Imagine Salman Khan is going to the sets of a new movie. He decides to cycle everyday on his way to the sets. For that he uses a distance calculator which
finds the distance based on the present day's date, which is asked as an input from the user. You should first take the day and then the month as your inputs.
The inputs should be stored in variables named day and month .The distance calculator uses the following formula to calculate a number which dictates the
number of kilometers he must cycle on his way to work.
Distance = lif day<10, 5+(day*2)/month
|else, 3+(day/month)
Exceptions to handle:
-Check for 0 division error exception in the formula
-Type…
arrow_forward
Please help for this question
Operating system.
arrow_forward
In FTP, a file can be organized into records, pages, or a stream of bytes. These are types of an attribute called _______.
a.
file types
b.
data structures
c.
transmission modes
d.
none of the above
arrow_forward
Performance Assessment Tasks
Note:
Linux is case sensitive. All tasks below assume you are able to understand and apply this. If you are told to create a file
myFile and you instead create MyFile – you will not get credit. Filles and directories need to be created in the correct
paths.
In all the tasks below, replace studentId with your own studentID (all lowercase – jesjon1984 not JesJon1984 or any
other variants of spelling)
Do not execute the Final Exam tasks on any other VM or you will have to start over.
Be logged in as student with Password1 in the CIS206-Exam VM
Complete the following tasks – these will total to maximum 75 points:
1. Install the nmap software package
2. Under the student user home (/home/student) directory, create a directory named studentIDFinalExam
3. Create a directory within studentIDFinalExam called PracticalExam
4. Under the student home directory, there is a file called baseFile.txt. Make a copy of this file under the
PracticalExam directory. The copy…
arrow_forward
- Malicious code that must attach itself to another
file to replicate itself is known as:
- A program that wastefully consumes resources is
called a:
- Consider the following fragment in an
authentication program:
code...
if date = 5-5-2020 then:
crash_operating_system();
code...
What type of malicious software is this?
-When a security critical process occurs in stages,
we may have a:
- Not validating the input and its length before
attempting to write it to a buffer is:
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:9781337569798
Author:ECKERT
Publisher:CENGAGE L
Related Questions
- Lab4: Network Security with Cryptography - Implementation Objective: This lab will be able to implement cryptography Task1: In Lab2, you identified the top tools that can provide 1. Confidentiality 2. Integrity 3. Authentication Implement any 1 of it (one on Windows and another on Linux) and encrypt a file. Provide 5 different tools that can serve this purpose Tool Name Operating Name of the Are you using symmetric or Name of the Algorithm you plain text file Asymmetric you used for used for Encryption encryption? encryption What is the key you usedarrow_forwardBash Shell Scripting – Simple File System Navigation Write a bash shell script with the following capabilities: Create a bash script ~/test1.sh with any text editor. Write a bash script that does the following: Echo your current directory to the screen. Change directory to your home directory. Change directory to a child directory within your home directory. List all of the files that end with .c within the child directory. Navigate back to your home directory. Run your script after doing a chmod 777 on the script. Take a screenshot of the console output.arrow_forwardBrute Attack on FTP server (KALI -LINUX) The file you downloaded contains the 100 most common passwords. Load the file in the Metasploit framework by setting the PASS_FILE variable. When you run the command, after some time, you will see a connection error and it says ‘scan complete’ but in reality, it is not. Why do you think that the first few scans went unsuccessful and then the connection error appears? Verify your answer using a log file generated at the victim’s machine. Furthermore, explain how you can circumvent this problem and show at least one working solution. Upload the log file generated at the victim's machine which shows the first few scans went unsuccessful and then the connection error appears. Also, include your answer and explain how you can avoid this problem.arrow_forward
- Securing a network from attacks means a network administrator is watching traffic and user activity. Change detection (CD) is a method used to track changes in your network. CD can detect files accessed during off hours to more complex algorithmic detections added to software applications that manage this process. This program is going to manage user login times and attempt to detect any change in a users typical login attempts. It will use an input file to store data and read the file using the csv.reader( ) method. The file will contain a list of login_names, followed by login_time separated by commas. Write a program that first reads in the name of an input file, reads the information stored in that file and determines if the user login has occurred at off hour times. The company employees work from 9 am to 5 pm so any other time would be an off hour login attempt. If the login attempt is made after hours, store the user name and login time in a dictionary with the user name as the…arrow_forwardBash Shell Scripting – Simple File Manipulation Write a bash shell script with the following capabilities: Create a bash script ~/test2.sh with any text editor. Write a bash script that does the following: Change directory to your home directory. Create a child directory called mycode. Change to the mycode directory. Copy all files that end with .c that you have developed in this course to the mycode directory. Navigate up a directory. Create a new child directory called mycode2. Copy all files from the mycode directory to the mycode2 directory. Rename the mycode directory to deadcode. Remove the deadcode directory and all its files. Run your script after doing a chmod 777 on the script. Take a screenshot of the console output.arrow_forwardBook reference: Windows PowerShell Step by Step 3rd Edition - Ed WilsonChapter 18 11. What is one troubleshooting method of using the suspend option while stepping through a script? 12. What is the use of the –Strict parameter in the Set-PSDebug cmdlet? 13. What is a key difference between the Set-PSDebug cmdlet the Set-StrictMode cmdlet.arrow_forward
- Bash Shell Scripting – Misc. Commands Write a bash shell script with the following capabilities: Create a bash script ~/test3.sh with any text editor. Write a bash script that does the following: Declare a local variable to save your name. Declare another variable that stores your age. Echo both variables to the screen. Take a screenshot of the console output. Create a bash script ~/test4.sh with any text editor. Write a bash script that does the following: echo "File Name: $0" echo "First Parameter : $1" echo "Second Parameter : $2" echo "Quoted Values: $@" echo "Quoted Values: $*" echo "Total Number of Parameters : $#" Take a screenshot of the console output. Run your scripts after doing a chmod 777 on the script. Open a terminal window and run the following commands: which gcc man gccarrow_forwardshell scriptingarrow_forwardHow can I fix this error when I run the script?arrow_forward
- QUESTION 2: A Backup Script Write a script called: backup SWITCH FILES DEST MESSAGE Example: ./backup -D ~/source/*.c ~/backup Where: SWITCH is optional: -D for deleting original files after backup. If not present, the original files to be backed-up are not deleted. FILES is the path, using wild cards, of the files to be backed-up. DEST is the path to the backup directory. MESSAGE is a multiword description about the backup. It will be added to a log file. Use vi to create the script. The script must do the following in the order presented: 1. Make sure the script is running under Bash. 2. Verify that the script has the correct number of arguments. If it does not the script must terminate with the following error message: "You have the incorrect number of arguments. The correct syntax is: ./backup SWITCH FILES DEST MESSAGE. Please try again." 3. Verify that the DEST directory exists. If it does exist, then do nothing. If it does not exist, then create the directory. 4. Using the TAR…arrow_forwardQ4 Using the Linux Shell write a script that takes two files as arguments and determine if they are hard links of each other by comparing inode values. Test with two files with the name inode, a file against itself, two different files and a file against a symbolic link to itself.arrow_forwardDownloads/ ht 8 (File X English localhost:8888/notebooks/Downloads/CSE110%20Lab%20Assignment%208%20(File%201_0%20%26%20Exception).ipynb Cjupyter CSE110 Lab Assignment 8 (File I_O & Exception) Last Checkpoint: 6 hours ago (unsaved changes) Logout File Edit View Insert Cell Kernel Widgets Help Trusted Python 3 O • Run с Code Task 10 Write a python program that finds the corresponding energy values from a list of frequency values which are taken as input from the user, using the formula, E = h * f, where h is a constant of value: 1050 Exceptions to handle: • Make sure all elements in the lists are numbers Example 1: Input: [2,3] Output: [2100, 3150] ==== Example 2: Input: [2,boss] Output: Wrong input type In [ ]: #to do OneDrive Screenshot saved Task 11 The screenshot was added to your OneDrive. Imagine Salman Khan is going to the sets of a new movie. He decides to cycle everyday on his way to the sets. For that he uses a distan finds the distance based on the present day's date, which is…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.Computer ScienceISBN:9781337569798Author:ECKERTPublisher:CENGAGE L
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:9781337569798
Author:ECKERT
Publisher:CENGAGE L