mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
Crippled-down versions of Windows now have their own defaults for some configuration settings.
Users are informed of that on the first run. git-svn-id: https://ipscan.svn.sourceforge.net/svnroot/ipscan/trunk@201 375186e5-ef17-0410-b0b6-91563547dcda
This commit is contained in:
parent
d202a9928e
commit
ee34715fe5
@ -276,3 +276,7 @@ Using the Options dialog, you may configure to display:\n\
|
||||
Special values (also configurable):\n\
|
||||
[n/s] - not scanned value that wasn't scanned at all (eg if the host is dead)\n\
|
||||
[n/a] - the value is not available, but was scanned
|
||||
|
||||
text.crippledWindowsInfo=Thank you for trying Angry IP Scanner!\n\n\
|
||||
However, keep in mind that consumer versions of Windows (e.g. Windows XP SP2, Windows Vista) have limited ability to be hosts for scanning, due to removed RawSocket support and TCP connection rate limiting.\n\n\
|
||||
Because of that, some configuration options were changed for you, making scanning a lot slower than on full-featured operating systems. See the FAQ on Angry IP Scanner homepage.
|
||||
|
||||
@ -46,7 +46,7 @@ public final class GlobalConfig {
|
||||
this.preferences = preferences;
|
||||
|
||||
isFirstRun = preferences.getBoolean("firstRun", true);
|
||||
maxThreads = preferences.getInt("maxThreads", 100);
|
||||
maxThreads = preferences.getInt("maxThreads", Platform.CRIPPLED_WINDOWS ? 10 : 100);
|
||||
threadDelay = preferences.getInt("threadDelay", 20);
|
||||
activeFeeder = preferences.getInt("activeFeeder", 0);
|
||||
scanDeadHosts = preferences.getBoolean("scanDeadHosts", false);
|
||||
@ -55,7 +55,7 @@ public final class GlobalConfig {
|
||||
pingCount = preferences.getInt("pingCount", 3);
|
||||
skipBroadcastAddresses = preferences.getBoolean("skipBroadcastAddresses", true);
|
||||
portTimeout = preferences.getInt("portTimeout", 2000);
|
||||
adaptPortTimeout = preferences.getBoolean("adaptPortTimeout", true);
|
||||
adaptPortTimeout = preferences.getBoolean("adaptPortTimeout", !Platform.CRIPPLED_WINDOWS);
|
||||
minPortTimeout = preferences.getInt("minPortTimeout", 100);
|
||||
portString = preferences.get("portString", "");
|
||||
notAvailableText = preferences.get("notAvailableText", Labels.getLabel("fetcher.value.notAvailable"));
|
||||
|
||||
@ -12,13 +12,18 @@ package net.azib.ipscan.config;
|
||||
* @author Anton Keks
|
||||
*/
|
||||
public class Platform {
|
||||
|
||||
private static final String OS_NAME = System.getProperty("os.name");
|
||||
|
||||
/** Mac OS detection :-) */
|
||||
public static final boolean MAC_OS = System.getProperty("mrj.version") != null;
|
||||
|
||||
/** Linux */
|
||||
public static final boolean LINUX = System.getProperty("os.name").indexOf("Linux") >= 0;
|
||||
public static final boolean LINUX = OS_NAME.indexOf("Linux") >= 0;
|
||||
|
||||
/** Any Windows version */
|
||||
public static final boolean WINDOWS = System.getProperty("os.name").startsWith("Windows");
|
||||
|
||||
public static final boolean WINDOWS = OS_NAME.startsWith("Windows");
|
||||
|
||||
/** Crippled-down version of Windows (no RawSockets, TCP rate limiting, etc */
|
||||
public static final boolean CRIPPLED_WINDOWS = WINDOWS && OS_NAME.indexOf("Server") < 0 && Double.parseDouble(System.getProperty("os.version").substring(0, 3)) >= 5.1;
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ package net.azib.ipscan.gui;
|
||||
import net.azib.ipscan.config.Config;
|
||||
import net.azib.ipscan.config.GlobalConfig;
|
||||
import net.azib.ipscan.config.Labels;
|
||||
import net.azib.ipscan.config.Platform;
|
||||
import net.azib.ipscan.config.Version;
|
||||
import net.azib.ipscan.gui.MainMenu.CommandsMenu;
|
||||
import net.azib.ipscan.gui.actions.StartStopScanningAction;
|
||||
@ -30,6 +31,7 @@ import org.eclipse.swt.widgets.Combo;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.MessageBox;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
/**
|
||||
@ -76,6 +78,13 @@ public class MainWindow {
|
||||
}
|
||||
|
||||
if (globalConfig.isFirstRun) {
|
||||
if (Platform.CRIPPLED_WINDOWS) {
|
||||
// inform crippled windows owners of configuration changes
|
||||
MessageBox box = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);
|
||||
box.setText(Version.NAME);
|
||||
box.setMessage(Labels.getLabel("text.crippledWindowsInfo"));
|
||||
box.open();
|
||||
}
|
||||
new GettingStartedDialog().open();
|
||||
globalConfig.isFirstRun = false;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user