CIS305 3
.docx
keyboard_arrow_up
School
ECPI University *
*We aren’t endorsed by this school
Course
305
Subject
Computer Science
Date
Feb 20, 2024
Type
docx
Pages
1
Uploaded by kenardoafelix
CIS305 3.2
What is the name of the container? Docker provides a way to name the container using the -name flag.
How does the DHCP service work?
The DHCP service assigns IP addresses from a pool and leases an address to any DHCP enabled client when it starts on the network.
What is the difference between virtualizing that service vs. using containers?
Virtualization runs multiple OS instances on a single server. Containers run a single instance with user’s space to isolate processes from one another.
What would you recommend to your classmates regarding using a container for the service?
Containers could be risky. Malicious actors can find a way to break out of a container and gain access to host machines.
Discuss the pros and cons of virtualization vs. containerization of the service.
Container technology is highly scalable. Virtualization is still a reliable way to store the application securely and have a longer life cycle than containers. Virtualization is not as portable as containers. Containers are easier to maintain. Virtualization has hard security boundaries and they can emulate multiple operating systems. Containers run only on host OS.
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
#server sideimport socketprint ("Server Up")s = socket.socket()port = PA # PA = Port Addresss.bind(('', port))s.listen(1)c, addr = s.accept()print ("Socket Up and running with a connection from Client at ",addr)while True: rcvdData = c.recv(1024).decode() print ("Client:",rcvdData) sendData = input("Server: ") c.send(sendData.encode()) if(sendData == "Bye" or sendData == "bye"): breakc.close()#client sideimport socketprint ("Client Up")s = socket.socket()s.connect(('LA', PA)) # LA = loop Address; PA = Port Addresswhile True: str = input("Client: ") s.send(str.encode()); if(str == "Bye" or str == "bye"): break print ("Server:",s.recv(1024).decode())s.close() By using the codes given,do communication between the two terminals begin from client side
arrow_forward
How does a server know that one of the far-off objects he gives his clients could be collected since it is no longer in use?
arrow_forward
Today I was working with the singleEmailMessage class of
salesforce and I want to set a default Email address for the
same use case.
Can you please suggest how I can do this task and get this issue resolved
I have come to know to use org-wide Address. Please brief
what is about it. both singleEmailMessage class and org wide
address. Not the coding part just tell in bried
arrow_forward
Write socket code to implement the following server/client commination -
1. Client asks the server for current Date and Time within a period of 5 seconds
2. Servers send the current Date and Time to client
3. Client prints the current date and time
You MUST use a shared buffer to store the date and time information. There must be at-least 4 clients request to the server. You must use LOCKS to ensure no data corruption.
Upload CODE AND OUTPUT SCREENSHOT for this assignment.
arrow_forward
JAVA CODE?
arrow_forward
TCP: the client sends only 1 message to the server ‘hello from TCPclient’ and the server responds with the uppercase message. Update the program / make a simple chat program so that The client can send/receive multiple messages to the server. A special exit message is used to disconnect ‘Exit’. Each time client sends a message, the server responds with a confirmation of receiving it and its length.
UDP: in the client-side The OS assigns the port number automatically. The client sends a line of characters (data) from its keyboard to the server. Update the client-side of the program so that it takes 2 arguments The port it will bind to. The message that will be sent to the server. Keep the server-side of the program as it is. check the testArg.py --> an example to show you how to use arguments
make this 2 socket programming program in python in detail and show the output.
arrow_forward
Create a chat application using the Java Socket Programming Concepts, Java Swing Controls. There should be a client and a server. Write all the configurations and Java code to implement this chat application. Exchange Message Between Server and Clint. Show Muhammad in The Server Chat Window and Show Husnain on the Title Bar of the Clint Window
arrow_forward
Regenerate code in Python to run in the server program; while the first client is running, start ten other clients that connect to the same server; these clients should be created in the background with their input directed from a file. What happens to these ten clients, do their connect()s fail, time out, or succeed? Do you know if any other calls block? Now, could you let the client exit? Explain what happens
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
[ Question related to Aws Ec2]
When We Host Webserver On Ec2 Linux Instance ,We can access it from Putty Right? But We can do the same task using Windows Command prompt also .
Since windows and Linux both have different syntax,How's This Possible to access from Command prompt itself?
arrow_forward
[ Question related to Aws Ec2]
When We Host Webserver On Ec2 Linux
Instance,We can access it from Putty
Right? But We can do the same task using
Windows Command prompt also .
Since windows and Linux both have
different syntax, How's This Possible to
access from Command prompt itself?
arrow_forward
Suppose that in UDPClient.py, after we create the socket, we add the line:
client Socket.bind((, 5432))
Will it become necessary to change UDPServer.py? What are the port numbers for the sockets
in UDPClient and UDPServer? What were they before making this change?
arrow_forward
Using Java Programming Language (Java Socket /TCP Programming)
Please make a simple messaging program that will allow users to send private messages to other users (not the server).
All the users have their usernames and passwords stored in an XML file
Users can only send messages to online users
Messages to offline users will be stored in a separate XML file
arrow_forward
How does a server know that one of his remote objects provided by him is no longerused by clients and can be collected? How does Java RMI handle this problem and whatalternatives are there
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
PLEASE USE MULTITHREADING IN THIS PROGRAM SO THAT MANY CLIENTS CONNECTED TO THE SERVER AND EACH CLIENT CAN SEND MESSAGE TO SERVER AND SERVER MESSAGE SHOWN TO ALL CLIENTS AND ONE CLIENT MESSAGE SHOWN TO ALL CLIENTS.PLEASE MAKE CHANGINGS IN THIS CODE.
SERVER
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <sys/socket.h>#include <sys/types.h>#include <netinet/in.h>#include <arpa/inet.h>#include <pthread.h>#define PORT 5500
void func(int connfd){ char buffer[1024]; int n; while(1) { bzero(buffer, 1024); read(connfd, buffer, sizeof(buffer)); printf("From client: %s\t To client : ", buffer); bzero(buffer, 1024); n = 0; while ((buffer[n++] = getchar()) != '\n'); write(connfd, buffer, sizeof(buffer)); if (strncmp("exit", buffer, 4) == 0){ printf("Server Exit...\n"); break; } }}int main(){ int sockfd, connfd, len; struct…
arrow_forward
COM.
Question 4
ObjectOutputStream can write primitive types and graphs of objects to an OutputStream as a stream of bytes .These strom can subsequently be read uning InputStream.
True False
Question 5
When a client invokes a remote method , it calls a proxy not the original method .
True False
Question 6
A cookie is created with this : Cookie cookie new Cookie ( " key " , " value " ) ; After creation , you can change only the value of it with the setter method that's provided in the Cookie class .
True False
arrow_forward
UDP Task
In the program explained during the lab, in the client side
The OS assigns the port number automatically.
The client sends a line of characters (data) from its keyboard to server.
Update the client side of program so that it takes 2 arguments
The port it will bind to.
The message that will be sent to the server.
Keep the server side of program as it is
Use the screenshots in the presentation as a reference
check the testArg.py --> an example to show you how to use arguments
TCP Task
In the program explained during the lab
the client sends only 1 message to server ‘hello from tcp client’
server responds with the uppercase message.
Update the program / make a simple chat program so that
Client can send/receive multiple messages to server.
A special exit message is used to disconnect ‘Exit’.
Each time client sends a message, server responds with a confirmation of receiving it and its length
(use the screenshots in the presentation as a reference)…
arrow_forward
UDP Task
In the program explained during the lab, in the client side
The OS assigns the port number automatically.
The client sends a line of characters (data) from its keyboard to server.
Update the client side of program so that it takes 2 arguments
The port it will bind to.
The message that will be sent to the server.
Keep the server side of program as it is
Use the screenshots in the presentation as a reference
check the testArg.py --> an example to show you how to use arguments
TCP Task
In the program explained during the lab
the client sends only 1 message to server ‘hello from tcp client’
server responds with the uppercase message.
Update the program / make a simple chat program so that
Client can send/receive multiple messages to server.
A special exit message is used to disconnect ‘Exit’.
Each time client sends a message, server responds with a confirmation of receiving it and its length
(use the screenshots in the presentation as a reference)…
arrow_forward
Suppose we have a web site outside of xamp\httdocs and we want to access it fromour web server. Configure this directory with any alias that you want.For example: we have a site in the httdocs called www.test.com and another folderin /home/homework. We want to access the homework in this way:www.test.com/homework
arrow_forward
Only code of step 1
arrow_forward
Create a java client class that will do the following:• Create a socket to connect to the server using port 8000• Initially show a welcome message (see Figure 5 below)• Prompt the user to enter product name, type and price• Send product details to server• Receive response from server to indicate whether product has been added to database or not• Allow user to add more products• Close the client when the user types “stop” for the product name and output a message“Exiting Checkers Stock Taking App, Good bye!"See Figure 5 attached which shows the operation:
arrow_forward
Can you run two client programs on a same host? Try it out, and explain how the server differentiate the two different processes (both running the same client code)?
from socket import *
serverName = 'localhost'
serverPort = 12000
clientSocket = socket(AF_INET, SOCK_STREAM)
clientSocket.connect((serverName,serverPort))
sentence = input('Input lowercase sentence:')
byteToSend = str.encode (sentence)
clientSocket.send(byteToSend)
modifiedSentence = clientSocket.recv(1024)
print('From Server:', modifiedSentence)
clientSocket.close()
from socket import *
serverPort = 12000
serverSocket = socket(AF_INET,SOCK_STREAM)
serverSocket.bind(('',serverPort))
serverSocket.listen(1)
print ('The server is ready to receive')
while 1:
connectionSocket, addr = serverSocket.accept()
sentence = connectionSocket.recv(1024)
capitalizedSentence = sentence.upper()
connectionSocket.send(capitalizedSentence)
connectionSocket.close()
from socket import *
serverName =…
arrow_forward
In linux:
Describe full pathname and relative pathname with an example.
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
2. Write the complete link for the get request of an API using the information given below.
Base address: https://api.openweathermap.org/data/2.5/weather
Key
Value
appid
c825d459c172fk1fcbd5932k117Is6a917
city
London
units
metric
mode
xml
arrow_forward
For the following GitHub Action yml definition, what does actions/checkout@v2 do?
name: exam-workflowon: push: branches: - 'prod'jobs: execute: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - run: apt install python3 python3-pip - run: pip3 install black - run: black my-code.py
arrow_forward
Explain why activation is much better than pre-loading remote objects?
arrow_forward
Using your Client that accepts a stream from the Server in question 3. The client receives the Dictionary Based Object from the Server.
client code :
import socketimport json
# Initialize socketHOST = 'localhost'PORT = 5000client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)client_socket.connect((HOST, PORT))
# Receive and print the CO2 data fieldswhile True: data = client_socket.recv(1024).decode() if not data: break field_data = json.loads(data) print(field_data)
# Close the socketclient_socket.close()
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Related Questions
- #server sideimport socketprint ("Server Up")s = socket.socket()port = PA # PA = Port Addresss.bind(('', port))s.listen(1)c, addr = s.accept()print ("Socket Up and running with a connection from Client at ",addr)while True: rcvdData = c.recv(1024).decode() print ("Client:",rcvdData) sendData = input("Server: ") c.send(sendData.encode()) if(sendData == "Bye" or sendData == "bye"): breakc.close()#client sideimport socketprint ("Client Up")s = socket.socket()s.connect(('LA', PA)) # LA = loop Address; PA = Port Addresswhile True: str = input("Client: ") s.send(str.encode()); if(str == "Bye" or str == "bye"): break print ("Server:",s.recv(1024).decode())s.close() By using the codes given,do communication between the two terminals begin from client sidearrow_forwardHow does a server know that one of the far-off objects he gives his clients could be collected since it is no longer in use?arrow_forwardToday I was working with the singleEmailMessage class of salesforce and I want to set a default Email address for the same use case. Can you please suggest how I can do this task and get this issue resolved I have come to know to use org-wide Address. Please brief what is about it. both singleEmailMessage class and org wide address. Not the coding part just tell in briedarrow_forward
- Write socket code to implement the following server/client commination - 1. Client asks the server for current Date and Time within a period of 5 seconds 2. Servers send the current Date and Time to client 3. Client prints the current date and time You MUST use a shared buffer to store the date and time information. There must be at-least 4 clients request to the server. You must use LOCKS to ensure no data corruption. Upload CODE AND OUTPUT SCREENSHOT for this assignment.arrow_forwardJAVA CODE?arrow_forwardTCP: the client sends only 1 message to the server ‘hello from TCPclient’ and the server responds with the uppercase message. Update the program / make a simple chat program so that The client can send/receive multiple messages to the server. A special exit message is used to disconnect ‘Exit’. Each time client sends a message, the server responds with a confirmation of receiving it and its length. UDP: in the client-side The OS assigns the port number automatically. The client sends a line of characters (data) from its keyboard to the server. Update the client-side of the program so that it takes 2 arguments The port it will bind to. The message that will be sent to the server. Keep the server-side of the program as it is. check the testArg.py --> an example to show you how to use arguments make this 2 socket programming program in python in detail and show the output.arrow_forward
- Create a chat application using the Java Socket Programming Concepts, Java Swing Controls. There should be a client and a server. Write all the configurations and Java code to implement this chat application. Exchange Message Between Server and Clint. Show Muhammad in The Server Chat Window and Show Husnain on the Title Bar of the Clint Windowarrow_forwardRegenerate code in Python to run in the server program; while the first client is running, start ten other clients that connect to the same server; these clients should be created in the background with their input directed from a file. What happens to these ten clients, do their connect()s fail, time out, or succeed? Do you know if any other calls block? Now, could you let the client exit? Explain what happensarrow_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_forward
- [ Question related to Aws Ec2] When We Host Webserver On Ec2 Linux Instance ,We can access it from Putty Right? But We can do the same task using Windows Command prompt also . Since windows and Linux both have different syntax,How's This Possible to access from Command prompt itself?arrow_forward[ Question related to Aws Ec2] When We Host Webserver On Ec2 Linux Instance,We can access it from Putty Right? But We can do the same task using Windows Command prompt also . Since windows and Linux both have different syntax, How's This Possible to access from Command prompt itself?arrow_forwardSuppose that in UDPClient.py, after we create the socket, we add the line: client Socket.bind((, 5432)) Will it become necessary to change UDPServer.py? What are the port numbers for the sockets in UDPClient and UDPServer? What were they before making this change?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education