Last active
October 20, 2021 05:07
-
-
Save CyberFlameGO/d09998f5f70d912a6b69f00c8ae99457 to your computer and use it in GitHub Desktop.
Loop thing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Loops over every IP in the world | |
*/ | |
public class LoopAllnetAddr { | |
public static void main(String[] args) { | |
for (int x = 1; x < 256; x++) { | |
if (x == 10) continue; | |
for (int f = 0; f < 256; f++) { | |
if ((x == 172 && (f >= 16 && f <= 31)) || | |
(x == 192 && f == 168)) continue; | |
for (int d = 0; d < 256; d++) { | |
for (int g = 0; g < 256; g++) { | |
final String ip_address = x + "." + f + "." + d + "." + g; | |
//do something | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment