1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
otez555 [7]
3 years ago
13

Write an If/else statement to check whether host is online. If it is online, then print system is online otherwise print system

is unreachable.
Computers and Technology
1 answer:
Reika [66]3 years ago
4 0

Answer:

from socket import *

hostname = input('Enter the host to be scanned: ')

ip_add = gethostbyname(hostname)

connections = [ ]    

for i in range(133, 136):

   s = socket(AF_INET, SOCK_STREAM)

     

   conn = s.connect_ex((ip_add, i))

   print(conn)

   connections.append(conn)

if 0 in connections:

   print ('Host is online')

   s.close()

else:

   print ('system is unreachable')

Explanation:

The python source code above scans for all the available range of ports in the provided hostname, if any port is available, the host is online else the program print the error message "system is unreachable.

You might be interested in
The ____, or typeface, defines the appearance and shape of letters, numbers, and special characters.
Paladinen [302]
Font(s)
fonts is another word for typeface
the appearance of letters and numbers when you chang the font
5 0
4 years ago
What are three consequences of a negative digital Trail​
Vladimir79 [104]

Answer:

The digital footprint that is had behind can have repercussions in every aspect of your adolescent's life, conceivably bringing about botched occupation chances, public sharing of individual data, destroyed connections

Explanation:

Digital trail what's left behind as you calmly peruse the web, post via web-based media or even sort into a visit administration. Regardless of whether you're mindful, you add to your advanced impression or profile every day when you sign onto the Internet. The sites you visit, the news posts you remark on, the remarks you leave via web-based media stages—every one of these things meet up to make a representation of your online life.  

The digital footprint that is had behind can have repercussions in every aspect of your adolescent's life, conceivably bringing about botched occupation chances, public sharing of individual data, destroyed connections — or, in what is likely more pertinent to them at this moment: Their folks discovering what they've been up to and along these lines being rebuffed.

8 0
3 years ago
A VALENTINE
-Dominant- [34]

Answer:

i dont see the image

Explanation:

6 0
3 years ago
Read 2 more answers
_______ refers to the use of gps or rfid technology to create virtual boundaries that enable software to trigger a response when
ludmilkaskok [199]

Geofencing Marketing refers to the use of gps or rfid technology to create virtual boundaries that enable software to trigger a response when a mobile device enters or leaves a particular area.

<h3>What is Geofencing Marketing?</h3>
  • Geofencing marketing is an illustration of a real-time location-based trade tactic that utilizes geolocation data to mark users within a specified geographic region and delivers a range based on where they are or in what areas they have previously visited.
  • Geofencing marketing concerns setting up virtual borders around a point or area that tracks whenever someone with a portable device crosses them.

To learn more about Geofencing Marketing, refer:

brainly.com/question/9795929

#SPJ4

4 0
2 years ago
What does IP stand for (as in IP address)? Also, what is overtype mode?
tino4ka555 [31]
An  IP address is mostly for your WIFI . Internet Protocol . 

Overtype Mode is where you are making changes to text (putting in new characters) 
4 0
3 years ago
Other questions:
  • Why are variables useful in programming?
    12·2 answers
  • Given the function definition below, what is the effect of thecall:
    7·2 answers
  • 1. Create an array of ints with 20 elements. With a random number generator, seeded with time, assign a random number between 1
    8·1 answer
  • If it is impractical to place guest users in a secure network, isolated from the production network by firewall barriers, then:
    14·1 answer
  • Which of the example DFSs discussed in this chapter would handle a large, multiclient database application most efficiently? Exp
    14·1 answer
  • A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-lif
    12·1 answer
  • ______ are used to store all the data in a database.
    7·1 answer
  • The phone in your hand is a computer. So too is the machine that occupies a 100,000 square foot data center. Given their vast di
    14·1 answer
  • Assume the user responds with a 3 for the first number and a 4 for the second number.
    13·1 answer
  • Complete the sentence.
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!