Let us worry about your assignment instead!

We Helped With This Python Programming Assignment: Have A Similar One?

SOLVED
CategoryProgramming
SubjectPython
DifficultyUndergraduate
StatusSolved
More InfoPython Assignment
10191

Short Assignment Requirements

I have a programming assignment and I know it is last minute, but i believe experts will have no problem completing this within the time range, please take a look. I am willing to pay more for expediting it.

Assignment Description

Use MUST use Python 3

 

You are required to submit 2 zip files with instructions given in Submission Guidelines

 

 

Part 1: Network Port Scanner                             [10 Points]

Network ports are entry points to any host on the Internet. If a socket is listening on a port, it will accept incoming traffic, process it, and possibly respond to the client. An attacker can “scan” for open ports on a host and subsequently send malicious payload to hack the host. Port scanners are used by attackers to identify possible entry points to a target host.

 

In this programming task, you are asked to implement a TCP port scanner to identify ports running TCP applications. Recall that TCP based applications are listening for new connections at open ports. If you send a connection request to these open ports, they will respond to the connection requests. The workflow of a typical TCP port scanner is as follows.

 

·        Sweep through the ports you are interested in scanning for an IP address

·        Establish a TCP connection to the IP address and port number using the socket API

o   If a connection is successfully established, mark the port as open and close the connection

o   Otherwise, mark the port as closed

 

Note: You MUST close all TCP connections you open to avoid overloading the server.

                            

 

 

 

Use your port scanner to answer the following questions.

 

Question 1. Identify the ports running TCP applications for each of the following IP addresses:

Your answer should look something like this:

IP addresses

Open ports

31.13.74.36

53.163.225.50

40.97.142.194

132.163.4.107

 

Question 2. Briefly describe the nature of the applications that are running on the identified ports. Consult your textbook and online resources (e.g., Google or Wikipedia). If you cannot identify the application running over a port, write N/A.

Your answer should look something like this:

Port number

Application description

80

...

...

...

...

...

...

...

 

Submission Guideline:

You are required to submit the following files in a single ZIP file (named port_scan):

  • Source code for TCP port scanner (5 points)
  • PDF document answering the two questions (2.5 points each)

 

 

 

 

 

 

 

Part 2: Tracking IPv4 Usage               [5 Extra Credit Points]

For this task, you are required to track the IPv4 address space of a subnet give to you. Recall that you can identify whether a host is connected to the network or not by simply sending an ICMP ping request. So, for this task, you need to do the following:

·         Identify all the IP addresses belonging to the subnet prefix provided to you

·         For each IP address, use the <check_host> function in utils.py to check if the host is connected to the network

·         Maintain an array of active hosts

·         Repeat this process to answer the questions below

 

utils.py:

            We have provided you with utils.py which contains <check_host(host)> function. This function allows you to check if a given IP address <host> is currently active or not by sending ping packets. The output of this function is True/False depending on the status of the <host> IP address.

Like previous assignment, you should put this file in the same folder as your solution file.

Note: You must run this script in administrator mode since python requires elevated privileges to send ICMP ping packets.


Example usage of utils.py:

            You can check if IP address 31.13.74.36 is up or not as follows

           

            from utils import *

           

if check_host(‘31.13.74.36’):

            print(‘There is a host active on the given IP address’)

else:

            print(‘There is no host active on the given IP address’)

 

 

Python’s ‘ipaddress’ library:

In order to identify IP addresses belonging to a particular subnet, you may want to look in the ‘ipaddress’ python library. This library has a function <ip_network(subnet)> which returns all the ip addresses belonging to the subnet <subnet> you provided.

 

Example usage of ip_network:

            You can print all IP addresses belonging to 192.168.1.0/30 as follows

 

            from ipaddress import *

 

            # This code will print out the 4 IP addresses

            # 192.168.1.0, 192.168.1.1, 192.168.1.2, 192.168.1.3

            ips = ip_network(‘192.168.1.0/30’, strict=False)

            for ip in ips:

                        print(str(ip) + ‘ belongs to the 192.168.1.0/30 subnet’)

           

Question 1: Track the IP addresses belonging to the UIowa’s subnet (129.255.0.0/24) at 2 different instances and note the active IP addresses.

 

Your answer should look something like this:

 

129.255.0.0

129.255.0.1

129.255.0.256

Observation 1

Inactive (0)

1

1

Observation 2

Active (1)

1

0

 

 

 

Question 2: Do you observe any difference in the active IP addresses across your 2 observations? If yes, formulate a hypothesis based on this observation.

 

 

 

 

 

 

 

 

 

 

 

Submission Guideline:

You are required to submit the following files in a single ZIP file (named ip_tracker):

  • Source code for IPv4 tracker along with utils.py (2 points)
  • PDF document answering the two questions (1.5 points each)

 

 

 

 

Assignment Code


'''
Got the following code snippet from 
http://stackoverflow.com/questions/2953462/pinging-servers-in-python

This is used to identify whether a host ip address is "up" or not.
You need to run the "check_host" function with administrator privileges since it employs ping function call
'''
from platform import system as system_name # Returns the system/OS name
from os import system as system_call       # Execute a shell command

def check_host(host):
    """
    Returns True if host (str) responds to a ping request.
    Remember that some hosts may not respond to a ping request even if the host name is valid.
    """

    # Ping parameters as function of OS
    parameters = "-n 1 >nul 2>nul" if system_name().lower()=="windows" else "-c 1 >/dev/null 2>&1"

    # Pinging
    return system_call("ping " + parameters + " " + host) == 0

Frequently Asked Questions

Is it free to get my assignment evaluated?

Yes. No hidden fees. You pay for the solution only, and all the explanations about how to run it are included in the price. It takes up to 24 hours to get a quote from an expert. In some cases, we can help you faster if an expert is available, but you should always order in advance to avoid the risks. You can place a new order here.

How much does it cost?

The cost depends on many factors: how far away the deadline is, how hard/big the task is, if it is code only or a report, etc. We try to give rough estimates here, but it is just for orientation (in USD):

Regular homework$20 - $150
Advanced homework$100 - $300
Group project or a report$200 - $500
Mid-term or final project$200 - $800
Live exam help$100 - $300
Full thesis$1000 - $3000

How do I pay?

Credit card or PayPal. You don't need to create/have a Payal account in order to pay by a credit card. Paypal offers you "buyer's protection" in case of any issues.

Why do I need to pay in advance?

We have no way to request money after we send you the solution. PayPal works as a middleman, which protects you in case of any disputes, so you should feel safe paying using PayPal.

Do you do essays?

No, unless it is a data analysis essay or report. This is because essays are very personal and it is easy to see when they are written by another person. This is not the case with math and programming.

Why there are no discounts?

It is because we don't want to lie - in such services no discount can be set in advance because we set the price knowing that there is a discount. For example, if we wanted to ask for $100, we could tell that the price is $200 and because you are special, we can do a 50% discount. It is the way all scam websites operate. We set honest prices instead, so there is no need for fake discounts.

Do you do live tutoring?

No, it is simply not how we operate. How often do you meet a great programmer who is also a great speaker? Rarely. It is why we encourage our experts to write down explanations instead of having a live call. It is often enough to get you started - analyzing and running the solutions is a big part of learning.

What happens if I am not satisfied with the solution?

Another expert will review the task, and if your claim is reasonable - we refund the payment and often block the freelancer from our platform. Because we are so harsh with our experts - the ones working with us are very trustworthy to deliver high-quality assignment solutions on time.

Customer Feedback

"Thanks for explanations after the assignment was already completed... Emily is such a nice tutor! "

Order #13073

Find Us On

soc fb soc insta


Paypal supported