CIS251_4
.docx
keyboard_arrow_up
School
ECPI University, Greensboro *
*We aren’t endorsed by this school
Course
251
Subject
Computer Science
Date
Jan 9, 2024
Type
docx
Pages
2
Uploaded by corada5995 on coursehero.com
CIS251 — 4.9 — Delegating Administrative Control Corey Adams PS C:\Users\Administrator> Invoke-Pester C:\Scripts\GP2l-Delegating_Administrative_Contro 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 ru C:\Scripts\GP21-Delegating_Administrative_Control.test.psl? . [D] Do not run [R] Run once [S] Suspend [?] Help (default is "D" 1 Adams -VM-Hos' pCl042-3A73-6703-CB22-037464BA164 Wednesday, August : 022 1:25:23 F P Q §-4 Describing G i Practice 1n¢ Context Groups created and users added Verifying GV-PassAdmin membership 637963395237167282 Verifying CO-Admin membershi 537963395243260835
Verifying CO-Admin membership 637963395243260835 ests Passed: 5, Failed: PS C:\Users\Administrator>
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
Question 1
a) Explain the difference between ls -l > mylisting.txt and ls -l >> mylisting.txt
b) Create a shell script that lists all the files in the present working directory in
long format name this file listMyFiles.sh. Write a c program that uses the
system () function and uses it to run listMyFiles.sh
c) Create a daemon in C in the Unix environment, your daemon must create a
text file called aitDaemonLog.txt and populate it with 1000 lines of a string
each line must be written after 10 seconds, the string must end with the count
of the string;
arrow_forward
Bash Shell Script Programming Assignment
Question 1.
Create a shell script file called q1.sh
Write a script that would accept the two strings from the console and would display a message stating whether the accepted strings are equal to each other.
Question 2.
Create a shell script file called q2.sh
Write a bash script that takes a list of files in the current directory and copies them as into a sub-directory named mycopies.
Question 3.
Create a shell script file called q3.sh
Write a Bash script that takes the side of a cube as a command line argument and displays the volume of the cube.
Question 4.
Create a shell script file called q4.sh
Write a Bash script that prompts you for a user name and displays the corresponding user’s id number (UID), group id number (GID), and his/her home directory. Note: this information can be found in the /etc/passwd file.
Question 5.
Create a shell script file called q4.sh
Write a bash script that will edit the PATH environment variable…
arrow_forward
1-Write a Linux Bash shell script to compute the bonus for salespersons who are working at Mercedes Benz dealership who sell the following models:
A class - £24,095 - £38,095 (average £31,095)
B Class - £28,045 - £38,280 (average £33,162)
C Class - £34,670 - £50,405 (average £42,537)
E Class - £39,680 - £69,015 (average £54,437)
AMG C65 - £78,103 - £81,217 (average £31,095)
Each salesperson earns a basic salary of £2,000 per month. However:
If he or she achieves £200,000 worth of sales they will earn a bonus of £1,000 per month.
If he or she sells more than £300,000 worth of sales they will earn a bonus of £1,500 per month.
If he or she sells more than £400,000 worth of sales they will earn a bonus of £2,000 per month.
If he or she sells more than £500,000 worth of sales they will earn a bonus of £2,500 per month.
If he or she sells more than £650,000 worth of sales they will earn a bonus of £3,000 per month.
Design a program which calculates, each salespersons salary per month.…
arrow_forward
1. Explain the following unexpected result:$ whereis datedate: /bin/date ...$ echo $PATH.:/usr/local/bin:/usr/bin:/bin$ cat > dateecho "This is my own version of date."$ ./dateSunday April 14 10:00:49 PDT 2020
2. What are two ways you can execute a shell script when you do not have executepermission for the file containing the script? Can you execute a shellscript if you do not have read permission for the file containing the script?
3. What is the purpose of the PATH variable?a. Set the PATH variable so that it causes the shell to search the followingdirectories in order:• /usr/local/bin• /usr/bin• /bin• /usr/kerberos/bin• The bin directory in your home directory• The working directoryb. If there is a file named doit in /usr/bin and another file with the samename in your ~/bin directory, which one will be executed? (Assume thatyou have execute permission for both files.)c. If your PATH variable is not set to search the working directory, howcan you execute a program located…
arrow_forward
Question #9
Is each of the following an absolute pathname, a relative pathname, or a
simple filename?
milk_co
correspond/business/milk_co
/home/max
/home/max/literature/promo
..
letter.0210
Question #10
Suppose you have a file that is linked to a file owned by another user. How
can you ensure that changes to the file are no longer shared?
Question #11
If /home/zach/draft and /home/max/letter are links to the same file and the
following sequence of events occurs, what will be the date in the opening of
the letter?
Max gives the command vim letter.
Zach gives the command vim draft.
Zach changes the date in the opening of the letter to January 31, writes
the file, and exits from vim.
Max changes the date to February 1, writes the file, and exits from vim.
Question #12
What is an inode? What happens to the inode when you move a file within
a filesystem?
Question #13
The ls –i command displays a filename…
arrow_forward
How to modify exitstatus.sh to print a message for each of the three exit statuses described in man ls.
0 - OK
1 - minor problem
2 - serious problem
exitstatus.sh
#!/bin/bash
ls > /dev/null
if [ $? -eq 0 ]; then
echo "It seems to have worked, exit status 0"
fi
ls asdf 2> /dev/null
if [ $? -eq 0 ]; then
echo "It seems to have worked, exit status 0"
else
echo "An error occured, non-zero exit code."
fi
Solve fast please
arrow_forward
Computer Science
Please explaın these codes and what the commands mean
int main(){int sockfd;char buffer[MAXLINE];char* message = "Hello Server";struct sockaddr_in servaddr;int n, len;if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {printf("socket creation failed");exit(0);}memset(&servaddr, 0, sizeof(servaddr));servaddr.sin_family = AF_INET;servaddr.sin_port = htons(PORT);servaddr.sin_addr.s_addr = inet_addr("127.0.0.1");sendto(sockfd, (const char*)message, strlen(message),0, (const struct sockaddr*)&servaddr,sizeof(servaddr));printf("Message from server: ");n = recvfrom(sockfd, (char*)buffer, MAXLINE,0, (struct sockaddr*)&servaddr, &len);puts(buffer);close(sockfd);return 0;}
arrow_forward
Question 1
In this programming problem you'll code up Dijkstra's shortest-path algorithm.
Download the following text file:
dijkstraData
TXT File
File Link is: https://d3c33hcgiwev3.cloudfront.net/_dcf1d02570e57d23ab526b1e33ba6f12_dijkstraData.txt?Expires=1656979200&Signature=jDtzBLV8iI~UD6soIHVD2PPZwLD3tcJwuSTS3ZPepSVvyrIuTM5VHstUOqosqy8pYJk~DMDUBfZfuISMJrgpiKuK63qda1~ypGQVdv2cFIp8YHeg-tVjPI5C5rJm~4bA7JtKOu3boIwQ03FlVB17EojSDJ2tPpArMcpA-Yp6Et0_&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A
The file contains an adjacency list representation of an undirected weighted graph with 200 vertices labeled 1 to 200. Each row consists of the node tuples that are adjacent to that particular vertex along with the length of that edge. For example, the 6th row has 6 as the first entry indicating that this row corresponds to the vertex labeled 6. The next entry of this row "141,8200" indicates that there is an edge between vertex 6 and vertex 141 that has length 8200. The rest of the pairs of this…
arrow_forward
I wrote the following socket code for the (capture the flag) exercise, need help concatenating data received from the server, as seen in the screenshot.
#####################################################################
import socket
import sys
import threading
HOST = 'cyber210.network'
PORT = 8002
BUFFER_SIZE = 4096
# Create a socket object and connect to the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
with socket.socket() as s:
s.connect((HOST, PORT))
# Define a function to be called for each line received from the server
def handle_line(line):
if line.startswith('>'):
clean_line = line[1:]
try:
result = str(eval(clean_line)) + '\n'
print(clean_line, result)
s.sendall(result.encode())
except Exception as e:
print(f'Error evaluating line {clean_line}: {e}')
# Receive data from the server and process each line
while True:…
arrow_forward
USING UBUNTU! Show me all code for each step! Be detailed please. * Apache running * All user html directories named pub. Therefore http://googee.nmu.edu/~fred gets mapped to /home/fred/pub. * Make a new user named WWW. The "/" gets mapped to /home/WWW/pub. Therefore http://googee.nmu.edu gets mapped to /home/WWW/pub/ * A basic index.html file in /home/WWW/pub * Setting such that there are no directory listings and no cgis runnable * The URL http://googee.nmu.edu/icons mapped to /home/WWW/Pictures/icons * Logs stored in /var/log/my_wb_logs in combined logfile format * A web analyzer (webalizer = 0.5, analog = 1.0) that shows activity stats accessable via the web. * The user 'someone' is unable to make web pages in his home directory tree, even if he's tricky.
No hand written and fast answer with explanation
arrow_forward
the following must be done using shell scripting in linuxThe script will read from stdinThe format of the matrix is fixed write a script that prints the sum of each row
the matrix can also include 1 and 2 digit numbers
input| 106 150 || 100 125 || 115 215 |
output256225330
arrow_forward
Consider the following output from the jobs command:
[1] 7893 Running gpass &
[2] 7904 Running gnome-calculator &
[3]- 7955 Running gedit fetch-stock-prices.py &
[4]+ 7958 Stopped ping cyberciti.biz
Give the command to convert the gnome-calculator process to a foreground process.
arrow_forward
• Exercise 1: Please create a script that print “Hello, your name.” • Exercise 2: Please create a directory call user_bin, and add it to PATH. Then mv script of Exercise 1 to user_bin. Then run it from your root directory.• Exercise 3: Add a new command call ‘l’ which will perform exact same as ‘ls -a’. • Exercise 4: Create a function call sortFile, which will sort all filenames of current directory.• Exercise 5: Please make your own page using shell script, print following as your page. <html><head><title>My System Information</title></head><body><h1>My System Information</h1></body></html> Exercise 6: Could you add one variable in the example, name the variable as greeting, which displays “Hello, my name is xxx xxx” in the body using variable greeting.• Exercise 7: Could you add one variable in the example, name the variable as FILE_LIST, which displays the filenames of current working directory
arrow_forward
Create a script in linux / bash called deltad.bash.
This script will take two directories as input parameters, iterate over the lists of files, and report files which are either present in one directory but missing in the other, or present in both directories but differ in content.
The script MUST NOT consider subdirectories or files therein.
arrow_forward
I have an issue with trying to modify my code, I need to instead to work such that a user imputs a file paths and the program synchronizes themthe code is too long to post so I have placed it belowhttps://github.com/Philanthropenos/2023-final-work-for-os-class/blob/main/Attempt1.1
arrow_forward
The following assignment requires a spring boot framework.
Create a spring boot project.
Read the JSON file from online using the given URL : https://hccs-advancejava.s3.amazonaws.com/student_course.json
Create two classes, Student & Courses. The following attributes should be captured:
Student : first name, email, and gender
Course : course no, grade, and credit hour
A student may have taken one of more courses as it show in the json file
The data read from the URL should be stored in the Student and Course objects
Create a search method by name and course no.
Calculate the GPA of each student assuming that A=4, B=3,C=2 ....etc.
Please upload you solution in Github and provide the URL.
Hint - @Autowire and @component are useful dependency injections
PreviousNext
arrow_forward
In this part, we add the CPU temperature ID of the Raspberry Pi to the MQTT stream.
Open a new terminal and create a new script by the name of py and add the following content to it.
import paho.mqtt.client as mqtt
import time
from subprocess import check_output
from re import findall
def get_temp():
temp = check_output(["vcgencmd","measure_temp"]).decode("UTF-8")
return(findall("\d+\.\d+",temp)[0])
def on_connect(client, userdata, flags, rc):
print("Connected with result code "+str(rc))
client.subscribe("etec224_mqtt_test/")
global Connected
Connected = True
Connected = False
client = mqtt.Client()
client.on_connect = on_connect
client.connect("broker.emqx.io", 1883, 60)
client.loop_start()
while Connected!= True:
#Wait Here
time.sleep(0.1)
try:
while True:
value = get_temp()
client.publish('etec224_mqtt_test/', value)
time.sleep(1)
except KeyboardInterrupt:
client.disconnect()…
arrow_forward
The following is the output produced by issuing the command "ls –al" in a Linux system. total 12drwxr-xr-x 2 www-data www-data 4096 Jun 18 13:11 .drwxr-xr-x 6 root root 4096 Jan 11 15:20 ..-rw-r--r-- 1 www-data www-data 2996 Jul 22 16:09 index.html
In plain English, explain what is shown by the second, third, and fourth lines. Do not explain the number of links, size, date, and time fields.
arrow_forward
write a Node/Express web server that supports routing via endpoint /cookie.
Declare a variable named a and initialize it to 10 seconds.In the callback of route /cookie:Check to see if the browser sends a cookie named startIf cookie start received by the server, increment value in variable a by 2 seconds.Creates and sends a cookie that expires after the number of seconds specified in the variable a.The cookie is to be named startwith assigned value of 450.Import package cookie-parser for cookie handling
arrow_forward
Below is snw_transport.py. Make sure the code works properly and is plagarism free. Make sure to show the screenshot of the output with the screenshot of the code being tested as plagarism free.
snw_transport.py
import socket
class UDPSender: def __init__(self, host, port): self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.receiver_address = (host, port)
def send_file(self, file_path): pass
UDP receiverclass UDPReceiver: def __init__(self, host, port): self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.sock.bind((host, port))
def receive_file(self, file_path): pass
if __name__ == "__main__": pass
arrow_forward
Understanding how to interpret (or trace) an existing PowerShell script is vital when searching for PowerShell scripts on the Internet that suit a particular administrative need. Trace the PowerScript script shown in below and write a short memo describing what it will do after being executed:
$list = get-childitem | sort-object
foreach (objItem in $list) {if ($objitem.attributes - contains "directory") {$fgc="cyan" }elseif ($objItem.Extension -eq ".ps1") {$fgc="blue" }elseif ($objItem.Extension -eq ".exe") {$fgc="green" }elseif ($objItem.Extension -eq ".zip") {$fgc="red" }elseif ($objItem.Extension -eq ".rar") {$fgc="red" }else { $fgc="yellow" }write-host $objItem.name, $objItem.Length, objItem.LastWriteTime-foregroundcolor $fgc
arrow_forward
Write a complete bash script that monitors who logs in and logs out of the current CSELinux machine (e.g., cse01, cse02, etc.) where the script is running. In particular, youwill check the status of who is logged in every 10 seconds and report each user ID thatlogs in or logs out during that time frame. Note that there may be more than one userthat logs in or out duringthis interval. You must include the host name when reportingthe user ID information. In addition, you will install a custom signal handler to trap theSIGINT(i.e.,^C)onetimebeforeyouareabletoterminatethescriptwiththeSIGINT.You will also print out the current date and time and report the number of users loggedin,even if there are no changes (i.e.,no one logged in or out during the interval).
HOW TO DO THIS? PLEASE EXPLAIN WITH ANSWER!!
arrow_forward
Write a complete bash script that monitors who logs in and logs out of the current CSELinux machine (e.g., cse01, cse02, etc.) where the script is running. In particular, youwill check the status of who is logged in every 10 seconds and report each user ID thatlogs in or logs out during that time frame. Note that there may be more than one userthat logs in or out duringthis interval. You must include the host name when reportingthe user ID information. In addition, you will install a custom signal handler to trap the SIGINT(i.e.,^C) one time before you are able to terminate the script with the SIGINT. You will also print out the current date and time and report the number of users loggedin,even if there are no changes (i.e.,no one logged in or out during the interval).
What should the script.h file have inside it? Please show screenshot of output if possible ,what is the answer?
arrow_forward
GFS snapshots enable nearly instantaneous copies of huge files or entire directory structures. How does GFS do this quickly?
a) By acknowledging the request immediately and performing the copies in the background.
b) By pipelining writes through multiple chunkservers at once.
c) By storing all the data in memory.
d) By having multiple files point to the same set of chunks until one of the files gets modified.
arrow_forward
From the example of client1.java and server1.java, extends the work to enable chatting among peer to peer.
Hint :
Add looping for both file
prompt message to enter for both files
terminate communication when 'q' was press for both files. 'q' stands for quit.
(server 1)
import java.net.*;import java.io.*;class server1 {public static void main(String[] args) throws Exception { System.out.println("Server is Started"); ServerSocket ss = new ServerSocket(7777); System.out.println("Server is waiting"); Socket s = ss.accept(); System.out.println("Server is connected"); DataInputStream dis = new DataInputStream(s.getInputStream()); String str = (String)dis.readUTF(); System.out.println("Client : " + str); String nickName = "Testing from server";
DataOutputStream dout = new DataOutputStream(s.getOutputStream()); dout.writeUTF(nickName); dout.flush();
dout.close(); dis.close(); s.close();}}
(client 1)
import java.net.*;import java.io.*;class client1 { public…
arrow_forward
Question 14 papa .1. In this problem, you should write a short bash script. The script should list all files that end in .o from the /lib directory on a UNIX system, only if the file name (not including the extension) begins and ends with a vowel.
2. Write a bash command to print out a text representation of all of the pop assembly instructions from an ELF file named runme.
Full explain this question and text typing work only We should answer our question within 2 hours takes more time then we will reduce Rating Dont ignore this line
arrow_forward
Create a bash script that will take two directories as input parameters, iterate over the lists of files, and report files which are either present in one directory but missing in the other, or present in both directories but differ in content.
The script MUST NOT consider subdirectories or files therein.
The script should work with both relative and absolute paths. This also means the output format displayed must contain a relative or absolute path depending on what the original argument was
(see attached image for commands allowed)
arrow_forward
1. Is each of the following an absolute pathname, a relative pathname, or a simple filename? a. milk_co b. correspond/business/milk_co c. /home/max d. /home/max/literature/promo e. .. f. letter.0210
2. List the commands you can use to perform these operations: a. Make your home directory the working directory b. Identify the working directory
3. If the working directory is /home/max with a subdirectory named literature, give three sets of commands you can use to create a subdirectory named classics under literature. Also give several sets of commands you can use to remove the classics directory and its contents.
4. You should have read permission for the /etc/passwd file. To answer the following questions, use cat or less to display /etc/passwd. Look at the fields of information in /etc/passwd for the users on the local system. a. Which character is used to separate fields in /etc/passwd? b. How many fields are used to describe each user? c. How many users…
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
- Question 1 a) Explain the difference between ls -l > mylisting.txt and ls -l >> mylisting.txt b) Create a shell script that lists all the files in the present working directory in long format name this file listMyFiles.sh. Write a c program that uses the system () function and uses it to run listMyFiles.sh c) Create a daemon in C in the Unix environment, your daemon must create a text file called aitDaemonLog.txt and populate it with 1000 lines of a string each line must be written after 10 seconds, the string must end with the count of the string;arrow_forwardBash Shell Script Programming Assignment Question 1. Create a shell script file called q1.sh Write a script that would accept the two strings from the console and would display a message stating whether the accepted strings are equal to each other. Question 2. Create a shell script file called q2.sh Write a bash script that takes a list of files in the current directory and copies them as into a sub-directory named mycopies. Question 3. Create a shell script file called q3.sh Write a Bash script that takes the side of a cube as a command line argument and displays the volume of the cube. Question 4. Create a shell script file called q4.sh Write a Bash script that prompts you for a user name and displays the corresponding user’s id number (UID), group id number (GID), and his/her home directory. Note: this information can be found in the /etc/passwd file. Question 5. Create a shell script file called q4.sh Write a bash script that will edit the PATH environment variable…arrow_forward1-Write a Linux Bash shell script to compute the bonus for salespersons who are working at Mercedes Benz dealership who sell the following models: A class - £24,095 - £38,095 (average £31,095) B Class - £28,045 - £38,280 (average £33,162) C Class - £34,670 - £50,405 (average £42,537) E Class - £39,680 - £69,015 (average £54,437) AMG C65 - £78,103 - £81,217 (average £31,095) Each salesperson earns a basic salary of £2,000 per month. However: If he or she achieves £200,000 worth of sales they will earn a bonus of £1,000 per month. If he or she sells more than £300,000 worth of sales they will earn a bonus of £1,500 per month. If he or she sells more than £400,000 worth of sales they will earn a bonus of £2,000 per month. If he or she sells more than £500,000 worth of sales they will earn a bonus of £2,500 per month. If he or she sells more than £650,000 worth of sales they will earn a bonus of £3,000 per month. Design a program which calculates, each salespersons salary per month.…arrow_forward
- 1. Explain the following unexpected result:$ whereis datedate: /bin/date ...$ echo $PATH.:/usr/local/bin:/usr/bin:/bin$ cat > dateecho "This is my own version of date."$ ./dateSunday April 14 10:00:49 PDT 2020 2. What are two ways you can execute a shell script when you do not have executepermission for the file containing the script? Can you execute a shellscript if you do not have read permission for the file containing the script? 3. What is the purpose of the PATH variable?a. Set the PATH variable so that it causes the shell to search the followingdirectories in order:• /usr/local/bin• /usr/bin• /bin• /usr/kerberos/bin• The bin directory in your home directory• The working directoryb. If there is a file named doit in /usr/bin and another file with the samename in your ~/bin directory, which one will be executed? (Assume thatyou have execute permission for both files.)c. If your PATH variable is not set to search the working directory, howcan you execute a program located…arrow_forwardQuestion #9 Is each of the following an absolute pathname, a relative pathname, or a simple filename? milk_co correspond/business/milk_co /home/max /home/max/literature/promo .. letter.0210 Question #10 Suppose you have a file that is linked to a file owned by another user. How can you ensure that changes to the file are no longer shared? Question #11 If /home/zach/draft and /home/max/letter are links to the same file and the following sequence of events occurs, what will be the date in the opening of the letter? Max gives the command vim letter. Zach gives the command vim draft. Zach changes the date in the opening of the letter to January 31, writes the file, and exits from vim. Max changes the date to February 1, writes the file, and exits from vim. Question #12 What is an inode? What happens to the inode when you move a file within a filesystem? Question #13 The ls –i command displays a filename…arrow_forwardHow to modify exitstatus.sh to print a message for each of the three exit statuses described in man ls. 0 - OK 1 - minor problem 2 - serious problem exitstatus.sh #!/bin/bash ls > /dev/null if [ $? -eq 0 ]; then echo "It seems to have worked, exit status 0" fi ls asdf 2> /dev/null if [ $? -eq 0 ]; then echo "It seems to have worked, exit status 0" else echo "An error occured, non-zero exit code." fi Solve fast pleasearrow_forward
- Computer Science Please explaın these codes and what the commands mean int main(){int sockfd;char buffer[MAXLINE];char* message = "Hello Server";struct sockaddr_in servaddr;int n, len;if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {printf("socket creation failed");exit(0);}memset(&servaddr, 0, sizeof(servaddr));servaddr.sin_family = AF_INET;servaddr.sin_port = htons(PORT);servaddr.sin_addr.s_addr = inet_addr("127.0.0.1");sendto(sockfd, (const char*)message, strlen(message),0, (const struct sockaddr*)&servaddr,sizeof(servaddr));printf("Message from server: ");n = recvfrom(sockfd, (char*)buffer, MAXLINE,0, (struct sockaddr*)&servaddr, &len);puts(buffer);close(sockfd);return 0;}arrow_forwardQuestion 1 In this programming problem you'll code up Dijkstra's shortest-path algorithm. Download the following text file: dijkstraData TXT File File Link is: https://d3c33hcgiwev3.cloudfront.net/_dcf1d02570e57d23ab526b1e33ba6f12_dijkstraData.txt?Expires=1656979200&Signature=jDtzBLV8iI~UD6soIHVD2PPZwLD3tcJwuSTS3ZPepSVvyrIuTM5VHstUOqosqy8pYJk~DMDUBfZfuISMJrgpiKuK63qda1~ypGQVdv2cFIp8YHeg-tVjPI5C5rJm~4bA7JtKOu3boIwQ03FlVB17EojSDJ2tPpArMcpA-Yp6Et0_&Key-Pair-Id=APKAJLTNE6QMUY6HBC5A The file contains an adjacency list representation of an undirected weighted graph with 200 vertices labeled 1 to 200. Each row consists of the node tuples that are adjacent to that particular vertex along with the length of that edge. For example, the 6th row has 6 as the first entry indicating that this row corresponds to the vertex labeled 6. The next entry of this row "141,8200" indicates that there is an edge between vertex 6 and vertex 141 that has length 8200. The rest of the pairs of this…arrow_forwardI wrote the following socket code for the (capture the flag) exercise, need help concatenating data received from the server, as seen in the screenshot. ##################################################################### import socket import sys import threading HOST = 'cyber210.network' PORT = 8002 BUFFER_SIZE = 4096 # Create a socket object and connect to the server s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) with socket.socket() as s: s.connect((HOST, PORT)) # Define a function to be called for each line received from the server def handle_line(line): if line.startswith('>'): clean_line = line[1:] try: result = str(eval(clean_line)) + '\n' print(clean_line, result) s.sendall(result.encode()) except Exception as e: print(f'Error evaluating line {clean_line}: {e}') # Receive data from the server and process each line while True:…arrow_forward
- USING UBUNTU! Show me all code for each step! Be detailed please. * Apache running * All user html directories named pub. Therefore http://googee.nmu.edu/~fred gets mapped to /home/fred/pub. * Make a new user named WWW. The "/" gets mapped to /home/WWW/pub. Therefore http://googee.nmu.edu gets mapped to /home/WWW/pub/ * A basic index.html file in /home/WWW/pub * Setting such that there are no directory listings and no cgis runnable * The URL http://googee.nmu.edu/icons mapped to /home/WWW/Pictures/icons * Logs stored in /var/log/my_wb_logs in combined logfile format * A web analyzer (webalizer = 0.5, analog = 1.0) that shows activity stats accessable via the web. * The user 'someone' is unable to make web pages in his home directory tree, even if he's tricky. No hand written and fast answer with explanationarrow_forwardthe following must be done using shell scripting in linuxThe script will read from stdinThe format of the matrix is fixed write a script that prints the sum of each row the matrix can also include 1 and 2 digit numbers input| 106 150 || 100 125 || 115 215 | output256225330arrow_forwardConsider the following output from the jobs command: [1] 7893 Running gpass & [2] 7904 Running gnome-calculator & [3]- 7955 Running gedit fetch-stock-prices.py & [4]+ 7958 Stopped ping cyberciti.biz Give the command to convert the gnome-calculator process to a foreground process.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