Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Write a client and a server that permit the client to execute arbitrary shell commands on the server host. (If you don't implement any security mechanism in this application, you should ensure that the server is operating under a user account where it can do no damage if invoked by malicious users.) The client should be executed with two command-line argument
After connecting to the server, the client sends the given command to the server, and then closes its writing half of the socket using shutdown(), so that the server sees end-of-file. The server should handle each incoming connection in a separate child process (i.e., a concurrent design). For each incoming connection, the server should read the command from the socket (until end-of-file), and then exec a shell to perform the command. Here are a couple hints:

See the implementation of system() in Section 27.7 for an example of how to execute a shell command.
By using dup2() to duplicate the socket on standard output and standard error, the execed command will automatically write to the socket.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91781300

Have any Question?


Related Questions in Computer Engineering

Computer sciencewhat is required of an organization to

Computer Science What is required of an organization, to implement and maintain IT Governance? What outside resources are available to assist technology managers in the implementation and maintenance process?

The following conversation has some mistakes can u help me

The following conversation has some mistakes, can u help me point them out? what are the mistakes? Mark: Hi, David, my company does not use much computer technology and I would like to change that. But I have a few quest ...

A mail order supplier advertises same-day service on every

A mail order supplier advertises same-day service on every order. Recently, the movement of orders has not gone as planned. The director of customer service has completely redone the method of order handling. The goal of ...

Query to reterieve data from a customers table in mysql for

Query to reterieve data from a customers table in MySQL for instance who have not placed any orders yet, How to sort results by customers number,How to Modify the query to list customers who have placed fewer than five o ...

Please respondwhat are some other ways to troubleshoot

PLEASE RESPOND What are some other ways to troubleshoot reduced speed or latency? Or to find out what is using all the bandwidth? Perhaps might incorporate parts of this into own three issues.

The diet doctor claims that the average north american is

The diet doctor claims that the average North American is more than 20 pounds overweight. To test his claim, a random sample 30 Of north Americans was weighted, the difference between their actual weight and their ideal ...

What are information silos what are the problems caused by

What are information silos? What are the problems caused by information silos? How organizations can solve the problems caused by information silos?

Select a company or any existing business this can be the

Select a company or any existing business. This can be the company you currently work for. If you cannot find information about the security infrastructure of a company, you may make up the details as realistic as possib ...

For this assignment you are required to work on different

For this assignment, you are required to work on different aspects of the project described below for the next five weeks. Imagine you have to work on a project for building a corporate website for a company named Offex ...

Protocol droids arrive innbspgeneral organasnbspquarters at

Protocol droids arrive in General Organa's quarters at an average rate of 5 droids every 2 minutes. If the arrival of droids assumes a Poisson distribution, calculate the following: What is the probability that exactly 4 ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As