Skip to content

Commit 274e93e

Browse files
committed
v1.14 patch 2
1 parent 495f50c commit 274e93e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/com/stupidrepo/mcscanner/MCScanner.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static void main(String[] var0) throws IllegalArgumentException, IllegalA
6060

6161
ArrayList < Thread > threadList = new ArrayList < Thread > ();
6262

63-
JLabel scannedLabel = new JLabel("Scanned: 0/" + progressThing);
63+
JLabel scannedLabel = new JLabel("Scanned: 0/" + progressThing * 256);
6464
scannedLabel.setHorizontalAlignment(0);
6565

6666
frame.add(scannedLabel, "Center");
@@ -74,9 +74,8 @@ public static void main(String[] var0) throws IllegalArgumentException, IllegalA
7474
for (int i = minimumRange; i <= maxRange; ++i) {
7575
for (int j = 0; j <= 255; ++j) {
7676
for (int k = 0; k <= 255; ++k) {
77-
// for (int l = 0; l <= 255; ++l) {
78-
String ip = i + "." + j + "." + k + ".0";
79-
77+
for (int l = 0; l <= 255; ++l) {
78+
String ip = i + "." + j + "." + k + "." + l;
8079
Thread scannerThread = new Thread(new ScannerThread(ip, port, timeout, databaseHandler));
8180
threadList.add(scannerThread);
8281
executor.execute(scannerThread);
@@ -86,14 +85,14 @@ public static void main(String[] var0) throws IllegalArgumentException, IllegalA
8685
try {
8786
nextThread.join();
8887
++scanned;
89-
scannedLabel.setText("Scanned: " + scanned + "/" + progressThing + " (" + Math.round((scanned / progressThing) * 100) / 100 + "%)");
88+
scannedLabel.setText("Scanned: " + scanned + "/" + progressThing*256 + " (" + (scanned / (progressThing*256)) * 100 + "%)");
9089
} catch (InterruptedException timeout2) {
9190
// eh
9291
}
9392
}
9493
threadList.clear();
9594
}
96-
// }
95+
}
9796
}
9897
}
9998
}

0 commit comments

Comments
 (0)