Skip to Content
Kali Linux 2018: Windows Penetration Testing - Second Edition
book

Kali Linux 2018: Windows Penetration Testing - Second Edition

by Wolf Halton, Bo Weaver
October 2018
Intermediate to advanced
404 pages
8h 50m
English
Packt Publishing
Content preview from Kali Linux 2018: Windows Penetration Testing - Second Edition

Reviewing the for loop structure

A for loop doesn't need an incrementor because it builds the range into the condition, as contrasted with a while loop, which only includes a limit beyond which the loop will not run. Using Python notation, the following code shows what happens if you start with an X value of 0 and a range from one to eleven. The preset value of X is not important to the for loop iteration. It applies all values to X that it tests:

We are starting with X set to 100, but the for loop takes the X value from its own condition:

If you really want X to remain a constant, you can use it as the base of a different range, as shown ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Kali Linux 2018: Assuring Security by Penetration Testing - Fourth Edition

Kali Linux 2018: Assuring Security by Penetration Testing - Fourth Edition

Shiva V. N. Parasram, Alex Samm, Damian Boodoo, Gerard Johansen, Lee Allen, Tedi Heriyanto, Shakeel Ali
Hands-On AWS Penetration Testing with Kali Linux

Hands-On AWS Penetration Testing with Kali Linux

Karl Gilbert Gupta, Benjamin Caudill

Publisher Resources

ISBN: 9781788997461Other