ENTD261 Central Texas College Danger of Endless Loop Discussion Response

User Generated

QnqqlFunex

Programming

ENTD261

Description

Hello,

I need two responses of at least 150 words each for the below students discussions for this week. Also in the bold below are the questions the students at answering.

Instructions:

Give an example of if-then, and loop using variables. Explain the danger of endless loop, and how to avoid them. Can an endless loop create a DoS (Denial of Service)?



Student one:

(Lots of storm activity this week, here in Wisconsin, and soon, it’ll be snow)

In programming, an interpreter relies on an operator for direction, like a $ or %.

So, this example would be an operation with one condition,

if ($myval < 50 {

print “Value is less than 50”;

}

else {

print “Value is not equal to 50’;

}

(Computerhope.com, 2017)

In programming, a loop is “a sequence of instruction that is continually repeated until a certain condition is reached” (Rouse, 2005). In the example above, the condition is reached once the value is 49 or less. An endless loop, simply, is when a condition(s) is/are not met, and the operation finds no logical end. To prevent this from happening, a programmer must always have a defined solution(s) to if-then and if-then-else statements. According to Cisco Security, yes, an infinite loop can cause a Denial of Service attack, as proved in 2009 when an “attacker exploited a vulnerability in the Server Message Block version 2 (SMBv2) component to trigger an infinite loop, causing the system to stop responding until it was rebooted” (Cisco, 2009). Fortunately, either personnel at Microsoft or non-company affiliated free-lancers posted patches to this vulnerability, and others as they are discovered for the clients that utilize their products. I find services like this to be wonderful for the consumers that use these products because it affirms the beliefs that those companies hold the interests of solid service and support for their clients, if not only to keep up their profits as well because products in the I.T. field can become obsolete days after purchase.

-MML

Sources cited –

Cisco. Microsoft Windows SMBv2 Infinite Loop Denial of Service Vulnerability. 13 Oct 2009. Web. Retrieved from: https://tools.cisco.com/security/center/viewAlert.x?alertId=19173

Computerhope.com Conditional statement. 15 Sept 2017. Web. Retrieved from: https://www.computerhope.com/jargon/c/contstat.htm

Rouse, Margaret. Loop. Sept 2005. Web. Retrieved from:

-Matthew



Student two:

'If .. then example
price = cint(WScript.arguments(0)) 'price variable is entered by the user
if price > 50 then
WSH.echo "The price is too high"
else
WSH.echo "This is a great deal"
end if


'Loop example
max = cint(WScript.arguments(0))
for i = 0 to max
if i mod 2 = 0 then
WSH.echo(i & " is an even number")
end if
next


The danger of endless loop is that it causes the computer to lock up. It also can cause programs like the browser to crash and lose all unsaved work. When a code keeps running in a loop without an exit condition or reaching max value, an endless or an infinite loop occurs. Endless loops can be avoided by limiting the number of loops by defining a max so a loop stops when reaching it. It also can be avoided by making sure the condition must be met by incriminating a number that controls the loop or by introducing a stop condition when a loop iteration exceeds certain time period.


Denial of service is a malicious attack that interrupts access to computer networks by making systems, machines, or network resources unavailable. Infinite loops are a major way hackers use to render systems unavailability and interruptions. "Successful exploitation could result in an infinite loop and CPU exhaustion on the host, leading to a system wide Denial of Service condition." ("Microsoft Windows SMBv2 Infinite Loop Denial of Service attack", 2009)

-Dania

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hello, your work is complete. Please have a look at it and in case you might need any correction, feel free to hit me up ASAP.

Running Head: DISCUSSION RESPONSE

ENTD 261 Discussion Response

Student’s Name:

Instructor’s Name:
Course Code:
Date of Submission:

1

DISCUSSION RESPONSE

2

Student #1
Hello, Mathew
Great job on your post this week pertaining endless and if-then loops. I must say that I really
liked reading it and you pass across great points that I concur with. I would not say much about
the example of the loop and if-then code you gave, but I believe it makes a lot of sense and it
runs, in that if a v...


Anonymous
Very useful material for studying!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags