Browse Source

-ProtocolSettings

Wulf Pfeiffer 10 years ago
parent
commit
7467d0082c
1 changed files with 49 additions and 0 deletions
  1. 49 0
      src/de/tudarmstadt/informatik/hostage/commons/ProtocolSettings.java

+ 49 - 0
src/de/tudarmstadt/informatik/hostage/commons/ProtocolSettings.java

@@ -0,0 +1,49 @@
+package de.tudarmstadt.informatik.hostage.commons;
+
+
+public class ProtocolSettings {
+	//TODO documentation
+	//HTTP
+	private static String qotd;
+	private static boolean useQotd;
+	//SMB
+	private static String smbServerName = null;
+	private static String[] smbServerVersion = null;
+	
+	public static String getQotd() {
+		return qotd;
+	}
+	
+	public static void setQotd(String qotd) {
+		ProtocolSettings.qotd = qotd;
+		if(qotd == null) { //if no qotd was received, use random qotd
+			ProtocolSettings.qotd = new String(HelperUtils.getRandomString(100, false));
+		}
+	}
+	
+	public static boolean getUseQotd() {
+		return useQotd;
+	}
+	
+	public static void setUseQotd(boolean useQotd) {
+		ProtocolSettings.useQotd = useQotd;
+	}
+	
+	public static String getSmbServerName() {
+		return smbServerName;
+	}
+	
+	public static void setSmbServerName(String smbServerName) {
+		ProtocolSettings.smbServerName = smbServerName;
+	}
+
+	public static String[] getSmbServerVersion() {
+		return smbServerVersion;
+	}
+
+	public static void setSmbServerVersion(String[] smbServerVersion) {
+		ProtocolSettings.smbServerVersion = smbServerVersion;
+	}
+	
+	
+}