Browse Source

Added Bluetooth Synchronization
Added first implementation of NFC Synchronization - Not tested
Fixed Location logging
- correct logging without location data

Removed Maven

lp-tu 10 years ago
parent
commit
eb81c91986
30 changed files with 902 additions and 578 deletions
  1. 12 5
      .settings/org.eclipse.jdt.core.prefs
  2. 27 8
      AndroidManifest.xml
  3. 0 82
      pom.xml
  4. 8 1
      res/layout/activity_main.xml
  5. 17 0
      res/layout/activity_nfc.xml
  6. 52 0
      res/layout/activity_playground.xml
  7. 2 0
      res/values/strings.xml
  8. 3 2
      src/de/tudarmstadt/informatik/hostage/HoneyService.java
  9. 95 0
      src/de/tudarmstadt/informatik/hostage/PlayGroundActivity.java
  10. 41 4
      src/de/tudarmstadt/informatik/hostage/handler/AbstractHandler.java
  11. 101 25
      src/de/tudarmstadt/informatik/hostage/logging/DatabaseHandler.java
  12. 38 9
      src/de/tudarmstadt/informatik/hostage/logging/MyLocationManager.java
  13. 15 0
      src/de/tudarmstadt/informatik/hostage/logging/Record.java
  14. 14 14
      src/de/tudarmstadt/informatik/hostage/logging/SQLLogger.java
  15. 279 0
      src/de/tudarmstadt/informatik/hostage/sync/BluetoothSync.java
  16. 179 0
      src/de/tudarmstadt/informatik/hostage/sync/NFCSync.java
  17. 4 0
      src/de/tudarmstadt/informatik/hostage/ui/ListViewAdapter.java
  18. 9 0
      src/de/tudarmstadt/informatik/hostage/ui/MainActivity.java
  19. 5 2
      src/de/tudarmstadt/informatik/hostage/ui/ViewLog.java
  20. 1 1
      src/de/tudarmstadt/informatik/hostage/ui/ViewLogTable.java
  21. 0 5
      target/classes/META-INF/MANIFEST.MF
  22. 0 7
      target/classes/META-INF/maven/de.tudarmstadt.informatik/hostage/pom.properties
  23. 0 82
      target/classes/META-INF/maven/de.tudarmstadt.informatik/hostage/pom.xml
  24. BIN
      target/generated-sources/combined-assets/assets/p
  25. 0 5
      target/generated-sources/r/de/tudarmstadt/informatik/hostage/BuildConfig.java
  26. 0 193
      target/generated-sources/r/de/tudarmstadt/informatik/hostage/R.java
  27. BIN
      target/hostage.jar
  28. 0 5
      target/maven-archiver/pom.properties
  29. 0 86
      target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  30. 0 42
      target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

+ 12 - 5
.settings/org.eclipse.jdt.core.prefs

@@ -1,5 +1,12 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6

+ 27 - 8
AndroidManifest.xml

@@ -13,6 +13,13 @@
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
+    <uses-permission android:name="android.permission.BLUETOOTH" />
+    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
+    <uses-permission android:name="android.permission.NFC" />
+    
+    <uses-feature
+    android:name="android.hardware.nfc" android:required="false" />
 
     <application
         android:allowBackup="true"
@@ -21,11 +28,10 @@
         android:theme="@style/AppTheme" >
         <activity
             android:name="de.tudarmstadt.informatik.hostage.ui.MainActivity"
-            android:configChanges="keyboardHidden|orientation|screenSize"
-            android:label="@string/app_name" >
+            android:label="@string/app_name" 
+            android:configChanges="keyboardHidden|orientation|screenSize">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
-
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
@@ -33,20 +39,33 @@
             android:name="de.tudarmstadt.informatik.hostage.ui.ViewLog"
             android:label="@string/statistics" >
         </activity>
-        <activity
+       	<activity
             android:name="de.tudarmstadt.informatik.hostage.ui.ViewLogTable"
             android:label="@string/database" >
         </activity>
-        <activity
+        
+       	<activity
             android:name="de.tudarmstadt.informatik.hostage.ui.SettingsActivity"
             android:label="@string/settings" >
         </activity>
-        <activity
+        
+       	<activity
             android:name="de.tudarmstadt.informatik.hostage.ui.AboutActivity"
             android:label="@string/action_about" >
         </activity>
-
-        <service android:name="de.tudarmstadt.informatik.hostage.HoneyService" >
+       
+       	<activity
+            android:name="de.tudarmstadt.informatik.hostage.PlayGroundActivity"
+            android:label="@string/playground" >
+            <intent-filter>
+  				<action android:name="android.nfc.action.NDEF_DISCOVERED" />
+  				<category android:name="android.intent.category.DEFAULT" />
+  				<data android:mimeType="application/de.tudarmstadt.informatik.hostage" />
+			</intent-filter>
+        </activity>
+       	
+        <service 
+            android:name="de.tudarmstadt.informatik.hostage.HoneyService" >
         </service>
     </application>
 

+ 0 - 82
pom.xml

@@ -1,82 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>de.tudarmstadt.informatik</groupId>
-	<artifactId>hostage</artifactId>
-	<version>2.0.0-SNAPSHOT</version>
-	<packaging>apk</packaging>
-	<name>HosTaGe</name>
-	<dependencies>
-		<dependency>
-			<groupId>android</groupId>
-			<artifactId>android</artifactId>
-			<version>4.4_r1</version>
-			<scope>provided</scope>
-		</dependency>
-		<dependency>
-			<groupId>android.support</groupId>
-			<artifactId>compatibility-v4</artifactId>
-			<version>19.0.0</version>
-		</dependency>
-		<dependency>
-			<groupId>org.roboguice</groupId>
-			<artifactId>roboguice</artifactId>
-			<version>2.0</version>
-		</dependency>
-	</dependencies>
-	<build>
-		<finalName>${project.artifactId}</finalName>
-		<sourceDirectory>src</sourceDirectory>
-		<pluginManagement>
-			<plugins>
-				<plugin>
-					<groupId>com.jayway.maven.plugins.android.generation2</groupId>
-					<artifactId>android-maven-plugin</artifactId>
-					<version>3.8.0</version>
-					<extensions>true</extensions>
-				</plugin>
-				<plugin>
-					<groupId>org.eclipse.m2e</groupId>
-					<artifactId>lifecycle-mapping</artifactId>
-					<version>1.0.0</version>
-					<configuration>
-						<lifecycleMappingMetadata>
-							<pluginExecutions>
-								<pluginExecution>
-									<pluginExecutionFilter>
-										<groupId>
-											com.jayway.maven.plugins.android.generation2
-										</groupId>
-										<artifactId>
-											android-maven-plugin
-										</artifactId>
-										<versionRange>
-											[3.8.0,)
-										</versionRange>
-										<goals>
-											<goal>consume-aar</goal>
-										</goals>
-									</pluginExecutionFilter>
-									<action>
-										<ignore></ignore>
-									</action>
-								</pluginExecution>
-							</pluginExecutions>
-						</lifecycleMappingMetadata>
-					</configuration>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-		<plugins>
-			<plugin>
-				<groupId>com.jayway.maven.plugins.android.generation2</groupId>
-				<artifactId>android-maven-plugin</artifactId>
-				<configuration>
-					<sdk>
-						<platform>19</platform>
-					</sdk>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
-</project>

+ 8 - 1
res/layout/activity_main.xml

@@ -61,7 +61,14 @@
                 android:onClick="showLog"
                 android:text="Show Log" />
 
-
+            <Button
+                android:id="@+id/buttonPlayGround"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentTop="true"
+                android:layout_toRightOf="@+id/buttonShowLog"
+                android:onClick="startPlayGround"
+                android:text="PlayGround" />
 
         </RelativeLayout>
 

+ 17 - 0
res/layout/activity_nfc.xml

@@ -0,0 +1,17 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    android:paddingBottom="@dimen/activity_vertical_margin"
+    android:paddingLeft="@dimen/activity_horizontal_margin"
+    android:paddingRight="@dimen/activity_horizontal_margin"
+    android:paddingTop="@dimen/activity_vertical_margin" >
+
+    <TextView
+        android:id="@+id/textView"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="NFC - SYNC" />
+
+</LinearLayout>

+ 52 - 0
res/layout/activity_playground.xml

@@ -0,0 +1,52 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    android:paddingBottom="@dimen/activity_vertical_margin"
+    android:paddingLeft="@dimen/activity_horizontal_margin"
+    android:paddingRight="@dimen/activity_horizontal_margin"
+    android:paddingTop="@dimen/activity_vertical_margin" >
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal" >
+
+        <Button
+            android:id="@+id/buttonSyncServer"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:onClick="syncData"
+            android:text="Sync Data" />
+        
+        <Button
+            android:id="@+id/buttonStartNFC"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:onClick="startNFC"
+            android:text="start NFC" />
+
+    </LinearLayout>
+
+    <Button
+        android:id="@+id/buttonCreateNetwork"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:onClick="createNetworkData"
+        android:text="Create Network Data" />
+
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        >
+
+        <TextView
+            android:id="@+id/textView1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="TextView" />
+         
+    </ScrollView>
+
+</LinearLayout>

+ 2 - 0
res/values/strings.xml

@@ -2,6 +2,7 @@
 <resources>
 
     <string name="app_name">HosTaGe</string>
+    <string name="UUID">9fc4f490-659e-11e3-949a-0800200c9a66</string>
     <string name="action_settings">Settings</string>
     <string name="action_about">About</string>
     <string name="capital_on">OFF</string>
@@ -28,5 +29,6 @@
 	<string name="delete_dialog_title">Delete data sets by:</string>	
 	<string name="dialog_clear_database_date">Delete all data before:</string>
 	
+	<string name="playground">Playground</string>
 
 </resources>

+ 3 - 2
src/de/tudarmstadt/informatik/hostage/HoneyService.java

@@ -85,7 +85,7 @@ public class HoneyService extends Service {
 			listeners.add(new HoneyListener(this, protocol));
 		}
 		registerNetReceiver();
-//		getLocationData(); //FIXME hier stimmt was nicht, crashed (evtl. wegen location deaktiviert im handy?)
+		getLocationData();
 		new QotdTask().execute(new String[]{});
 	}
 	
@@ -106,8 +106,9 @@ public class HoneyService extends Service {
 	/** Starts an Instance of MyLocationManager to set the location within this class.
 	 */
 	private void getLocationData(){
+		//TODO Put time and attempts in settings
 		MyLocationManager locationManager = new MyLocationManager(this);
-		locationManager.getUpdates(60 * 1000);
+		locationManager.getUpdates(60 * 1000, 3);
 	}
 	
 	/**

+ 95 - 0
src/de/tudarmstadt/informatik/hostage/PlayGroundActivity.java

@@ -0,0 +1,95 @@
+package de.tudarmstadt.informatik.hostage;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Random;
+
+import de.tudarmstadt.informatik.hostage.logging.DatabaseHandler;
+import de.tudarmstadt.informatik.hostage.sync.BluetoothSync;
+import de.tudarmstadt.informatik.hostage.sync.NFCSync;
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.Menu;
+import android.view.View;
+import android.widget.TextView;
+
+public class PlayGroundActivity extends Activity{
+	
+	BluetoothSync bs;
+
+	@Override
+	protected void onCreate(Bundle savedInstanceState) {
+		super.onCreate(savedInstanceState);
+		setContentView(R.layout.activity_playground);
+		bs = new BluetoothSync(this);
+		setNetworkInfoText();
+	}
+
+	@Override
+	public boolean onCreateOptionsMenu(Menu menu) {
+		getMenuInflater().inflate(R.menu.main, menu);
+		return true;
+	}
+	
+	private void setNetworkInfoText(){		
+		DatabaseHandler dbh = new DatabaseHandler(this);
+		TextView bssids = (TextView) findViewById(R.id.textView1);
+		String text = "";
+		ArrayList<HashMap<String, Object>> netInfo = dbh.getNetworkInformation();
+		for(HashMap<String, Object> network : netInfo){
+			text = text + (String) network.get(DatabaseHandler.KEY_BSSID) + "\n"
+    					+ (String) network.get(DatabaseHandler.KEY_SSID) + "\n"
+    					+ (double)(Double) network.get(DatabaseHandler.KEY_LATITUDE) + "\n"
+    			 		+ (double)(Double) network.get(DatabaseHandler.KEY_LONGITUDE) + "\n"
+    			 		+ (float)(Float) network.get(DatabaseHandler.KEY_ACCURACY) + "\n"
+    			 		+ (long) (Long) network.get(DatabaseHandler.KEY_TIME) + "\n\n";			
+		}
+		bssids.setText(text);
+	}
+	public void syncData(View view){
+		bs.syncData();
+	}
+	
+	public void startNFC(View view){
+		startActivity(new Intent(this, NFCSync.class));
+	}
+	
+	public void createNetworkData(View view){
+		Random rnd = new Random();
+		ArrayList<HashMap<String, Object>> fakeNetInfo = new ArrayList<HashMap<String, Object>>();
+		for(int i = 0; i < 25; i++){
+			HashMap<String, Object> network = new HashMap<String, Object>();
+			network.put("BSSID", createRandomBSSID());
+			network.put("SSID", new BigInteger(130, rnd).toString(32));
+			network.put("LATITUDE", rnd.nextDouble() * 360);
+			network.put("LONGITUDE", rnd.nextDouble() * 360);
+			network.put("ACCURACY", rnd.nextFloat());
+			network.put("TIMESTAMP", System.currentTimeMillis());
+			fakeNetInfo.add(network);
+		}
+
+		setNetworkInfoText();
+		new DatabaseHandler(this).updateNetworkInformation(fakeNetInfo);
+	}
+	
+	private String createRandomBSSID(){
+		Random rnd = new Random();
+		char[] symbols = new char[16];
+	    for (int idx = 0; idx < 10; ++idx)
+	        symbols[idx] = (char) ('0' + idx);
+	    for (int idx = 10; idx < 16; ++idx)
+	        symbols[idx] = (char) ('a' + idx - 10);
+	      
+	    char[] buf = new char[17];
+	    for(int i = 0; i < 18; i += 3){	    	
+	    	buf[i] = symbols[rnd.nextInt(symbols.length)];
+	    	buf[i + 1] = symbols[rnd.nextInt(symbols.length)];
+	    	if(i < 15){
+		    	buf[i + 2] = ':';
+	    	}
+	    }
+	    return new String(buf);
+	}
+}

+ 41 - 4
src/de/tudarmstadt/informatik/hostage/handler/AbstractHandler.java

@@ -12,6 +12,7 @@ import android.preference.PreferenceManager;
 import de.tudarmstadt.informatik.hostage.HoneyListener;
 import de.tudarmstadt.informatik.hostage.HoneyService;
 import de.tudarmstadt.informatik.hostage.logging.Logger;
+import de.tudarmstadt.informatik.hostage.logging.MyLocationManager;
 import de.tudarmstadt.informatik.hostage.logging.Record;
 import de.tudarmstadt.informatik.hostage.logging.Record.TYPE;
 import de.tudarmstadt.informatik.hostage.protocol.Protocol;
@@ -32,6 +33,7 @@ public abstract class AbstractHandler implements Runnable {
 	protected Thread thread;
 
 	private int attack_id;
+	private int message_id;
 	private String externalIP;
 	private String BSSID;
 	private String SSID;
@@ -56,11 +58,10 @@ public abstract class AbstractHandler implements Runnable {
 		this.client = client;
 		this.thread = new Thread(this);
 		SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(service);
-		Editor editor = pref.edit();
 		TIMEOUT = pref.getInt("timeout", 30) * 1000;
-		attack_id = pref.getInt("ATTACK_ID_COUNTER", 0);
-		editor.putInt("ATTACK_ID_COUNTER", attack_id + 1);
-		editor.commit();
+		//TODO ThreadSicher?
+		attack_id = getAndIncrementAttackID(pref);
+		message_id = 0;
 		SharedPreferences sessionPref = service.getSharedPreferences(MainActivity.SESSION_DATA, Context.MODE_PRIVATE);
 		BSSID = sessionPref.getString(MainActivity.BSSID, null);
 		SSID = sessionPref.getString(MainActivity.SSID, null);
@@ -87,6 +88,7 @@ public abstract class AbstractHandler implements Runnable {
 	 * Starts communication with client.
 	 * When the client closes the connection or a time out occurs the handler is finished.
 	 */
+	@Override
 	public void run() {
 		InputStream in;
 		OutputStream out;
@@ -138,6 +140,7 @@ public abstract class AbstractHandler implements Runnable {
 	 */
 	protected Record createRecord(TYPE type, String packet) {
 		Record record = new Record();
+		record.setId(getAndIncrementMessageCounter());		
 		record.setAttack_id(attack_id);
 		record.setProtocol(protocol.toString());
 		record.setType(type);
@@ -150,7 +153,41 @@ public abstract class AbstractHandler implements Runnable {
 		record.setBSSID(BSSID);
 		record.setSSID(SSID);
 		record.setPacket(packet);
+		if(MyLocationManager.getNewestLocation() != null){
+			record.setLatitude(MyLocationManager.getNewestLocation().getLatitude() );		
+			record.setLongitude(MyLocationManager.getNewestLocation().getLongitude() );
+			record.setAccuracy(MyLocationManager.getNewestLocation().getAccuracy() );
+			record.setTimestampLocation(MyLocationManager.getNewestLocation().getTime() );
+		}else {
+			record.setLatitude(0.0);		
+			record.setLongitude(0.0);
+			record.setAccuracy(Float.MAX_VALUE);
+			record.setTimestampLocation(0);
+		}
 		return record;
 	}
+	
+	/**
+	 * Gets attack ID for the attack. Also increases the attack ID counter by one. Method is synchronized for thread safety.
+	 * @param pref The default SharedPreference of the application
+	 * @return Unique integer attack ID
+	 */
+	private synchronized int getAndIncrementAttackID(SharedPreferences pref){
+		Editor editor = pref.edit();
+		int attackID = pref.getInt("ATTACK_ID_COUNTER", 0);
+		editor.putInt("ATTACK_ID_COUNTER", attack_id + 1);
+		editor.commit();
+		return attackID;
+	}
+	
+	/**
+	 * Gets current message ID for the record. Also increases the message ID counter by one. Method is synchronized for thread safety.
+	 * @return Unique integer message ID
+	 */
+	private synchronized int getAndIncrementMessageCounter(){
+		int msgID = message_id;
+		message_id++;
+		return msgID;
+	}
 
 }

+ 101 - 25
src/de/tudarmstadt/informatik/hostage/logging/DatabaseHandler.java

@@ -3,6 +3,7 @@ package de.tudarmstadt.informatik.hostage.logging;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.ArrayList;
+import java.util.HashMap;
 
 import de.tudarmstadt.informatik.hostage.R;
 import de.tudarmstadt.informatik.hostage.logging.Record.TYPE;
@@ -37,24 +38,24 @@ public class DatabaseHandler extends SQLiteOpenHelper {
 	private static final String TABLE_PORTS = "ports";
 
 	// Contacts Table Columns names
-	private static final String KEY_ID = "_id";
-	private static final String KEY_ATTACK_ID = "_attack_id";
-	private static final String KEY_TYPE = "type";
-	private static final String KEY_TIME = "timestamp";
-	private static final String KEY_PACKET = "packet";
-	private static final String KEY_PROTOCOL = "protocol";
-	private static final String KEY_EXTERNAL_IP ="externalIP";
-	private static final String KEY_LOCAL_IP = "localIP";
-	private static final String KEY_LOCAL_HOSTNAME = "localHostName";
-	private static final String KEY_LOCAL_PORT = "localPort";
-	private static final String KEY_REMOTE_IP = "remoteIP";
-	private static final String KEY_REMOTE_HOSTNAME = "remoteHostName";
-	private static final String KEY_REMOTE_PORT = "remotePort";
-	private static final String KEY_BSSID = "_bssid";
-	private static final String KEY_SSID = "ssid";
-	private static final String KEY_LATITUDE = "latitude";
-	private static final String KEY_LONGITUDE = "longitude";
-	private static final String KEY_ACCURACY = "accuracy";
+	public static final String KEY_ID = "_id";
+	public static final String KEY_ATTACK_ID = "_attack_id";
+	public static final String KEY_TYPE = "type";
+	public static final String KEY_TIME = "timestamp";
+	public static final String KEY_PACKET = "packet";
+	public static final String KEY_PROTOCOL = "protocol";
+	public static final String KEY_EXTERNAL_IP ="externalIP";
+	public static final String KEY_LOCAL_IP = "localIP";
+	public static final String KEY_LOCAL_HOSTNAME = "localHostName";
+	public static final String KEY_LOCAL_PORT = "localPort";
+	public static final String KEY_REMOTE_IP = "remoteIP";
+	public static final String KEY_REMOTE_HOSTNAME = "remoteHostName";
+	public static final String KEY_REMOTE_PORT = "remotePort";
+	public static final String KEY_BSSID = "_bssid";
+	public static final String KEY_SSID = "ssid";
+	public static final String KEY_LATITUDE = "latitude";
+	public static final String KEY_LONGITUDE = "longitude";
+	public static final String KEY_ACCURACY = "accuracy";
 
 	
 	// Database sql create statements
@@ -75,7 +76,7 @@ public class DatabaseHandler extends SQLiteOpenHelper {
 	
 	private static final String CREATE_BSSID_TABLE = "CREATE TABLE " + TABLE_BSSIDS + "(" 
 			+ KEY_BSSID + " TEXT PRIMARY KEY," + KEY_SSID + " TEXT," + KEY_LATITUDE + " INTEGER,"
-			+ KEY_LONGITUDE + " INTEGER," + KEY_ACCURACY + " INTEGER"
+			+ KEY_LONGITUDE + " INTEGER," + KEY_ACCURACY + " INTEGER," + KEY_TIME + " INTEGER"
 			+ ")";
 	
 	private static final String CREATE_PORT_TABLE = "CREATE TABLE " + TABLE_PORTS + "(" 
@@ -131,12 +132,13 @@ public class DatabaseHandler extends SQLiteOpenHelper {
 	public void addRecord(Record record) {
 		SQLiteDatabase db = this.getWritableDatabase();
 
-		ContentValues bssidValues = new ContentValues();
+		HashMap<String, Object> bssidValues = new HashMap<String, Object>();
 		bssidValues.put(KEY_BSSID, record.getBSSID());
 		bssidValues.put(KEY_SSID, record.getSSID());
 		bssidValues.put(KEY_LATITUDE, record.getLatitude());
 		bssidValues.put(KEY_LONGITUDE, record.getLongitude());
 		bssidValues.put(KEY_ACCURACY, record.getAccuracy());
+		bssidValues.put(KEY_TIME, record.getTimestampLocation());
 		
 		ContentValues attackValues = new ContentValues();
 		attackValues.put(KEY_ATTACK_ID, record.getAttack_id()); // Log Attack ID
@@ -157,11 +159,14 @@ public class DatabaseHandler extends SQLiteOpenHelper {
 		recordValues.put(KEY_PACKET, record.getPacket()); // Log Packet
 		
 
-		// Inserting Rows
-		db.insertWithOnConflict(TABLE_BSSIDS, null, bssidValues, SQLiteDatabase.CONFLICT_REPLACE);
+		
+		
+		// Inserting Rows		
 		db.insertWithOnConflict(TABLE_ATTACK_INFO, null, attackValues, SQLiteDatabase.CONFLICT_REPLACE);
 		db.insert(TABLE_RECORDS, null, recordValues);
 		db.close(); // Closing database connection
+		// Update Network Information
+		updateNetworkInformation(bssidValues);
 	}
 	
 	/**
@@ -187,7 +192,8 @@ public class DatabaseHandler extends SQLiteOpenHelper {
 		record.setLatitude(Double.parseDouble(cursor.getString(14)));
 		record.setLongitude(Double.parseDouble(cursor.getString(15)));
 		record.setAccuracy(Float.parseFloat(cursor.getString(16)));
-		record.setLocalPort(Integer.parseInt(cursor.getString(17)));
+		record.setTimestampLocation(cursor.getLong(17));
+		record.setLocalPort(Integer.parseInt(cursor.getString(18)));
 		} catch (UnknownHostException e) {
 			e.printStackTrace();
 		}
@@ -429,6 +435,22 @@ public class DatabaseHandler extends SQLiteOpenHelper {
     	return result;
     }
    
+    /**
+     * Determines if a network with given BSSID has already been recorded as malicious.
+     * @param BSSID The BSSID of the network.
+     * @return True if an attack has been recorded in a network with the given BSSID, else false.
+     */
+    public boolean bssidSeen(String BSSID){
+        String countQuery = "SELECT  * FROM " + TABLE_BSSIDS + " WHERE "  + KEY_BSSID + " = " + "'" + BSSID + "'";
+        SQLiteDatabase db = this.getReadableDatabase();
+        Cursor cursor = db.rawQuery(countQuery, null);
+        int result = cursor.getCount();
+        cursor.close();
+        db.close();
+        return result > 0;        
+    }
+    
+    
     /**
      * Determines if an attack has been recorded on a specific protocol in a network with a given BSSID.
      * @param protocol The {@link de.tudarmstadt.informatik.hostage.protocol.Protocol Protocol} to inspect.
@@ -496,7 +518,7 @@ public class DatabaseHandler extends SQLiteOpenHelper {
     	db.close();
     }
     
-  //TODO Delete statement überarbeiten
+  //TODO Delete statement �berarbeiten
     /**
      * Deletes all records from {@link #TABLE_RECORDS} with a time stamp smaller then the given
      * @param date A Date represented in milliseconds.
@@ -504,7 +526,7 @@ public class DatabaseHandler extends SQLiteOpenHelper {
     public void deleteByDate(long date){
     	SQLiteDatabase db = this.getReadableDatabase();
     	String deleteQuery = "DELETE  FROM " + TABLE_RECORDS + " WHERE " + KEY_TIME + " < " + date;
-    	//TODO Delete statement überarbeiten
+    	//TODO Delete statement �berarbeiten
 //    	String deleteQuery2 = "DELETE "
     	db.execSQL(deleteQuery);
     	db.close();
@@ -519,4 +541,58 @@ public class DatabaseHandler extends SQLiteOpenHelper {
         db.delete(TABLE_ATTACK_INFO, null, null);
         db.close();
     }
+    
+    public ArrayList<HashMap<String, Object>> getNetworkInformation(){
+        String selectQuery = "SELECT  * FROM " + TABLE_BSSIDS;
+        SQLiteDatabase db = this.getReadableDatabase();
+        Cursor cursor = db.rawQuery(selectQuery, null);
+    	
+        ArrayList<HashMap<String, Object>> networkInformation = new ArrayList<HashMap<String, Object>>();
+    	
+        // looping through all rows and adding to list
+		if (cursor.moveToFirst()) {
+			do {
+				HashMap<String, Object> values = new HashMap<String, Object>();
+				values.put(KEY_BSSID, cursor.getString(0));
+				values.put(KEY_SSID, cursor.getString(1));
+				values.put(KEY_LATITUDE, Double.parseDouble(cursor.getString(2)));
+				values.put(KEY_LONGITUDE, Double.parseDouble(cursor.getString(3)));
+				values.put(KEY_ACCURACY, Float.parseFloat(cursor.getString(4)));
+				values.put(KEY_TIME, cursor.getLong(5));
+				networkInformation.add(values);
+			} while (cursor.moveToNext());
+		}              
+		
+		cursor.close();        
+        db.close();        
+    	return networkInformation;
+    }
+    
+    public void updateNetworkInformation(HashMap<String, Object> networkInformation){ 
+        SQLiteDatabase db = this.getReadableDatabase();
+		String bssid = (String) networkInformation.get(KEY_BSSID);
+		Log.i("DatabaseHandler", "Füge " + bssid + " hinzu");
+		String bssidQuery = "SELECT  * FROM " + TABLE_BSSIDS + " WHERE "  + KEY_BSSID + " = " + "'" + bssid + "'";
+        Cursor cursor = db.rawQuery(bssidQuery, null);
+        int result = cursor.getCount();
+        if( cursor != null && cursor.moveToFirst() && (result <= 0 || cursor.getLong(5) < (Long) networkInformation.get(KEY_TIME)));{
+        	ContentValues bssidValues = new ContentValues();
+    		bssidValues.put(KEY_BSSID, bssid);
+    		bssidValues.put(KEY_SSID, (String) networkInformation.get(KEY_SSID));
+    		bssidValues.put(KEY_LATITUDE, (double)(Double) networkInformation.get(KEY_LATITUDE));
+    		bssidValues.put(KEY_LONGITUDE, (double)(Double) networkInformation.get(KEY_LONGITUDE));
+    		bssidValues.put(KEY_ACCURACY, (float)(Float) networkInformation.get(KEY_ACCURACY));
+    		bssidValues.put(KEY_TIME, (Long) networkInformation.get(KEY_TIME));
+        	db.insertWithOnConflict(TABLE_BSSIDS, null, bssidValues, SQLiteDatabase.CONFLICT_REPLACE);
+        }    		
+        cursor.close();  
+        db.close();
+    }
+    
+    public void updateNetworkInformation(ArrayList<HashMap<String, Object>> networkInformation){ 
+    	Log.i("DatabaseHandler", "Starte updating");
+    	for(HashMap<String, Object> values : networkInformation){
+    		updateNetworkInformation(values);
+    	}	        
+    }
 }

+ 38 - 9
src/de/tudarmstadt/informatik/hostage/logging/MyLocationManager.java

@@ -14,22 +14,23 @@ import android.widget.Toast;
 public class MyLocationManager {
 	
 	private LocationManager locationManager;
-	private static Location newestLocation;
-	private Context context;
-	
+	/**
+	 * Static variable that always holds the newest location update.
+	 */
+	private static Location newestLocation = null;	
+	private static final int TWO_MINUTES = 1000 * 60 * 2;
+
 	
 	public MyLocationManager(Context context){
 		// Acquire a reference to the system Location Manager
 		locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
 		newestLocation = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
-		this.context = context;
 	}
 
 	// Define a listener that responds to location updates
 	LocationListener locationListener = new LocationListener() {
 	    public void onLocationChanged(Location location) {
-			Toast.makeText(context, location.getLatitude() +  " " + location.getLongitude() + " " + location.getAccuracy(), Toast.LENGTH_SHORT).show();
-
+	    	Log.i("MyLocationManager", location.getLatitude() +  " " + location.getLongitude() + " " + location.getAccuracy());
 
 	      // Called when a new location is found by the network location provider.
 	      if(isBetterLocation(location, newestLocation)){
@@ -55,19 +56,38 @@ public class MyLocationManager {
 	          // A new location is always better than no location
 	          return true;
 	      }
+	      
+	      // Check whether the new location fix is newer or older
+	      long timeDelta = location.getTime() - currentBestLocation.getTime();
+	      boolean isSignificantlyNewer = timeDelta > TWO_MINUTES;
+	      boolean isSignificantlyOlder = timeDelta < -TWO_MINUTES;
+
+	      // If it's been more than two minutes since the current location, use the new location
+	      // because the user has likely moved
+	      if (isSignificantlyNewer) {
+	          return true;
+	      // If the new location is more than two minutes older, it must be worse
+	      } else if (isSignificantlyOlder) {
+	          return false;
+	      }
+
 
 	      // Check whether the new location fix is more or less accurate
 	      int accuracyDelta = (int) (location.getAccuracy() - currentBestLocation.getAccuracy());
 	      boolean isMoreAccurate = accuracyDelta < 0;
 
-
 	      // Determine location quality using a combination of timeliness and accuracy
 	      if (isMoreAccurate) {
 	          return true;
-	      }
+	      }    
+
 	      return false;
 	  }
 	  
+	  /**
+	   * Start updating {@link de.tudarmstadt.informatik.hostage.logging.MyLocationManager#newestLocatio newestLocation} 
+	   * if a location provider is enabled and available.
+	   */
 	  public void startUpdates(){
 		  	boolean gpsEnabled = false;
 		  	boolean networkEnabled = false;
@@ -90,10 +110,19 @@ public class MyLocationManager {
 	        	locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);
 	  }
 	  
-	  public void getUpdates(long time){
+	  /**
+	   * Starts updating the location data for the given amount of time.
+	   * Calls itself recursive if no location data has been found yet and there are still attempts left.
+	   * @param time Time to update location data
+	   * @param attempts Remaining attempts for recieving location data
+	   */
+	  public void getUpdates(long time, int attempts){
 		  	startUpdates();
+		  	attempts--;
 	        Timer timer1=new Timer();
 	        timer1.schedule(new StopTask() , time);
+		  	if(newestLocation == null && attempts > 0)
+		  		getUpdates(time, attempts);
 	  }
 	   
 	  class StopTask extends TimerTask {

+ 15 - 0
src/de/tudarmstadt/informatik/hostage/logging/Record.java

@@ -37,6 +37,7 @@ public class Record implements Serializable {
 	private double latitude;
 	private double longitude;
 	private float accuracy;
+	private long timestampLocation;
 	private String packet;	
 
 
@@ -251,6 +252,20 @@ public class Record implements Serializable {
 		this.accuracy = accuracy;
 	}
 
+	/**
+	 * @return the timestampLocation
+	 */
+	public long getTimestampLocation() {
+		return timestampLocation;
+	}
+
+	/**
+	 * @param timestampLocation the timestampLocation to set
+	 */
+	public void setTimestampLocation(long timestampLocation) {
+		this.timestampLocation = timestampLocation;
+	}
+
 	/**
 	 * @return the packet
 	 */

+ 14 - 14
src/de/tudarmstadt/informatik/hostage/logging/SQLLogger.java

@@ -17,72 +17,72 @@ public class SQLLogger implements Logger{
 		dbh = new DatabaseHandler(context);	
 	}
 
-	
+	@Override
 	public synchronized void write(Record record) {
 		dbh.addRecord(record);
 	}
 
-	
+	@Override
 	public ArrayList<Record> getAllRecords() {
 		return dbh.getAllRecords();
 	}
 
-	
+	@Override
 	public ArrayList<Record> getRecordOfEachAttack(int lastUploadedAttackId) {
 		return dbh.getRecordOfEachAttack(lastUploadedAttackId);
 	}
 
-	
+	@Override
 	public Record getRecordOfAttackId(long attack_id) {
 		return dbh.getRecordOfAttackId(attack_id);
 	}
 
-	
+	@Override
 	public int getAttackCount() {
 		return dbh.getAttackCount();
 	}
 
-	
+	@Override
 	public int getAttackPerProtokolCount(String protocol) {
 		return dbh.getAttackPerProtokolCount(protocol);
 	}
 
-	
+	@Override
 	public long getSmallestAttackId() {
 		return dbh.getSmallestAttackId();
 	}
 
-	
+	@Override
 	public long getHighestAttackId() {
 		return dbh.getHighestAttackId();
 	}
 
-	
+	@Override
 	public boolean bssidSeen(String protocol, String bssid) {
 		return dbh.bssidSeen(protocol, bssid);
 	}
 
-	
+	@Override
 	public String[] getAllBSSIDS() {
 		return dbh.getAllBSSIDS();
 	}
 
-	
+	@Override
 	public String getSSID(String bssid) {
 		return dbh.getSSID(bssid);
 	}
 
-	
+	@Override
 	public void deleteByDate(long time) {
 		dbh.deleteByDate(time);		
 	}
 
-	
+	@Override
 	public void deleteByBSSID(String bssid) {
 		dbh.deleteByBSSID(bssid);
 	}
 
-	
+	@Override
 	public void clearData() {
 		dbh.clearData();
 	}

+ 279 - 0
src/de/tudarmstadt/informatik/hostage/sync/BluetoothSync.java

@@ -0,0 +1,279 @@
+package de.tudarmstadt.informatik.hostage.sync;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.UUID;
+
+import de.tudarmstadt.informatik.hostage.R;
+import de.tudarmstadt.informatik.hostage.logging.DatabaseHandler;
+
+import android.app.AlertDialog;
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothServerSocket;
+import android.bluetooth.BluetoothSocket;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.util.Log;
+import android.widget.ArrayAdapter;
+
+public class BluetoothSync{
+	
+	private final UUID serviceUUID;
+	private final int SERVER = 0;
+	private final int CLIENT = 1;
+	private BluetoothAdapter mBluetoothAdapter;
+	private Context context;
+	private ArrayAdapter<String> arrayAdapter;
+	
+	private ServerThread serverThread;	
+	private AlertDialog ad;
+	
+	public BluetoothSync(Context context){
+		this.context = context;		
+		serviceUUID = UUID.fromString(context.getResources().getString(R.string.UUID));
+		mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
+	}
+
+	public boolean syncData(){
+		if(!bluetoothAvaible())
+			return false;
+		syncDataPassive();
+		return syncDataActive();		
+	}
+	
+	private boolean syncDataActive() {
+		registerBroadcastReceiver();
+		arrayAdapter = new ArrayAdapter<String>(context, android.R.layout.simple_list_item_1);
+		//Start scanning for devices
+		if(!mBluetoothAdapter.startDiscovery())
+			return false;
+		
+		deviceDialog();
+		return true;
+	}
+	
+	private void syncDataPassive(){		
+		Intent discoverableIntent = new
+		Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
+		discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);
+		context.startActivity(discoverableIntent);
+		
+		serverThread = new ServerThread();
+		serverThread.start(); 
+	}
+	
+	private void manageConnectedSocket(BluetoothSocket socket, int identifier){
+		if(identifier == SERVER){
+			ad.dismiss();
+		}
+        mBluetoothAdapter.cancelDiscovery();
+        context.unregisterReceiver(mReceiver);
+		CommunicationThread commThread = new CommunicationThread(socket, identifier);
+		commThread.start();
+	}
+	
+	private boolean bluetoothAvaible(){		
+		if (mBluetoothAdapter == null) {
+		    // Device does not support Bluetooth
+			return false;
+		}
+		if (!mBluetoothAdapter.isEnabled()) {
+		    Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
+		    context.startActivity(enableBtIntent);
+		    //TODO CHECK
+//		    if(!mBluetoothAdapter.isEnabled())
+//		    	return false;
+		}
+		return true;
+	}
+
+	// Create a BroadcastReceiver for ACTION_FOUND
+	private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
+	    public void onReceive(Context context, Intent intent) {
+	        String action = intent.getAction();
+	        // When discovery finds a device
+	        if (BluetoothDevice.ACTION_FOUND.equals(action)) {
+	            // Get the BluetoothDevice object from the Intent
+	            BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
+	            // Add the name and address to an array adapter to show in a ListView
+	            arrayAdapter.add(device.getName() + "\n" + device.getAddress());
+	           	arrayAdapter.notifyDataSetChanged();
+	        }
+	    }
+	};
+	
+	
+	// Register the BroadcastReceiver
+	private void registerBroadcastReceiver(){
+		IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);
+		context.registerReceiver(mReceiver, filter); // Don't forget to unregister during onDestroy
+	}
+	
+	private void deviceDialog() {
+		AlertDialog.Builder builder = new AlertDialog.Builder(context);
+		builder.setTitle(R.string.delete_dialog_title);
+		builder.setAdapter(arrayAdapter, new DialogInterface.OnClickListener() {
+			public void onClick(DialogInterface dialog, int position) {
+				String deviceInfo = arrayAdapter.getItem(position);
+				String mac = deviceInfo.substring(deviceInfo.indexOf("\n") + 1);
+				ClientThread clientThread = new ClientThread(mBluetoothAdapter.getRemoteDevice(mac));
+	            clientThread.start();
+			}
+		});
+//		builder.create();
+		ad = builder.show();
+	}
+	
+	
+	private class ServerThread extends Thread {		
+		private final BluetoothServerSocket serverSocket;		
+		
+		public ServerThread() {
+			BluetoothServerSocket tmp = null;
+	        try {
+	            tmp = mBluetoothAdapter.listenUsingRfcommWithServiceRecord(context.getResources().getString(R.string.app_name), serviceUUID);
+	        } catch (IOException e) { }
+	        serverSocket = tmp;
+		}		
+		
+		public void run() {
+			BluetoothSocket socket = null;
+			while(true){
+				try {
+					socket = serverSocket.accept();
+				} catch (IOException e) {
+					e.printStackTrace();
+					break;
+				}
+				
+	            if (socket != null) {
+	                // Do work to manage the connection (in a separate thread)
+	                manageConnectedSocket(socket, SERVER);
+	                try {
+						serverSocket.close();
+					} catch (IOException e) {
+						e.printStackTrace();
+					}
+	                break;
+	            }				
+			}
+		}
+		
+	    /** Will cancel the listening socket, and cause the thread to finish */
+	    public void cancel() {
+	        try {
+	            serverSocket.close();
+	        } catch (IOException e) { }
+	    }
+	}
+	
+	private class ClientThread extends Thread {
+	    private final BluetoothSocket socket;
+	 
+	    public ClientThread(BluetoothDevice device) {
+	        BluetoothSocket tmp = null;
+	        try {
+	            tmp = device.createRfcommSocketToServiceRecord(serviceUUID);
+	        } catch (IOException e) { }
+	        socket = tmp;
+	    }
+	 
+	    public void run() {   
+	        
+	        try {
+	        	socket.connect();
+	        } catch (IOException connectException) {
+	            // Unable to connect; close the socket and get out
+	            try {
+	            	socket.close();
+	            } catch (IOException closeException) { }
+	            return;
+	        }
+	 
+	        manageConnectedSocket(socket, CLIENT);
+	    }
+	 
+	    /** Will cancel an in-progress connection, and close the socket */
+	    public void cancel() {
+	        try {
+	        	socket.close();
+	        } catch (IOException e) { }
+	    }
+	}
+	
+	private class CommunicationThread extends Thread {
+	    private final BluetoothSocket mmSocket;
+	    private final ObjectInputStream  objectInput;
+	    private final ObjectOutputStream  objectOuput;
+	    private final int identifier;
+	 
+	    public CommunicationThread(BluetoothSocket socket, int identifier) {
+	        mmSocket = socket;
+	        ObjectInputStream  tmpIn = null;
+	        ObjectOutputStream tmpOut = null;
+	 
+	        // Get the input and output streams, using temp objects because
+	        // member streams are final
+	        try {
+	            tmpOut = new ObjectOutputStream(socket.getOutputStream());
+	            tmpIn = new ObjectInputStream(socket.getInputStream());
+	        } catch (IOException e) { e.printStackTrace();}
+	         
+	        objectInput = tmpIn;
+	        objectOuput = tmpOut;
+	        this.identifier = identifier;
+	    }
+	 
+	    public void run() {	 
+	        // Keep listening to the InputStream until an exception occurs
+//	        while (true) {
+	            try {
+	            	DatabaseHandler dbh = new DatabaseHandler(context);
+            		ArrayList<HashMap<String, Object>> localNetworkInformation = dbh.getNetworkInformation();
+	            	if(identifier == SERVER){
+		                // Read from the InputStream
+		            	Object object = objectInput.readObject();
+		            	ArrayList<HashMap<String, Object>> remoteNetworkInformation = (ArrayList<HashMap<String, Object>>) object;
+		            	dbh.updateNetworkInformation(remoteNetworkInformation);
+		            	objectOuput.writeObject(localNetworkInformation); 		            	
+	            	}else{
+	    	        	objectOuput.writeObject(localNetworkInformation); 
+		                // Read from the InputStream
+		            	Object object = objectInput.readObject();
+		            	ArrayList<HashMap<String, Object>> remoteNetworkInformation = (ArrayList<HashMap<String, Object>>) object;
+		            	dbh.updateNetworkInformation(remoteNetworkInformation);
+		            	mmSocket.close();
+	            	}
+	            } catch (ClassNotFoundException e) {
+					e.printStackTrace();
+				} catch (IOException e) {
+					e.printStackTrace();
+				}
+//	        }
+	    }
+	 
+	    /* Call this from the main activity to send data to the remote device */
+	    public void write(ArrayList<HashMap<String, Object>> networkInformation) {
+	    	try {
+				objectOuput.writeObject(networkInformation);
+			} catch (IOException e) {
+				e.printStackTrace();
+			} 
+	    }
+	 
+	    /* Call this from the main activity to shutdown the connection */
+	    public void cancel() {
+	        try {
+	            mmSocket.close();
+	        } catch (IOException e) { }
+	    }
+	}
+
+}

+ 179 - 0
src/de/tudarmstadt/informatik/hostage/sync/NFCSync.java

@@ -0,0 +1,179 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package de.tudarmstadt.informatik.hostage.sync;
+
+import android.annotation.TargetApi;
+import android.app.Activity;
+import android.content.Intent;
+import android.nfc.NdefMessage;
+import android.nfc.NdefRecord;
+import android.nfc.NfcAdapter;
+import android.nfc.NfcAdapter.CreateNdefMessageCallback;
+import android.nfc.NfcAdapter.OnNdefPushCompleteCallback;
+import android.nfc.NfcEvent;
+import android.os.Build;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.os.Parcelable;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import de.tudarmstadt.informatik.hostage.R;
+import de.tudarmstadt.informatik.hostage.logging.DatabaseHandler;
+
+
+@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
+public class NFCSync extends Activity implements CreateNdefMessageCallback,
+        OnNdefPushCompleteCallback {
+    NfcAdapter mNfcAdapter;
+    TextView mInfoText;
+    private static final int MESSAGE_SENT = 1;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_nfc);
+
+        mInfoText = (TextView) findViewById(R.id.textView);
+        // Check for available NFC Adapter
+        mNfcAdapter = NfcAdapter.getDefaultAdapter(this);
+        if (mNfcAdapter == null) {
+            mInfoText = (TextView) findViewById(R.id.textView);
+            mInfoText.setText("NFC is not available on this device.");
+        } else {
+            // Register callback to set NDEF message
+            mNfcAdapter.setNdefPushMessageCallback(this, this);
+            // Register callback to listen for message-sent success
+            mNfcAdapter.setOnNdefPushCompleteCallback(this, this);
+        }
+    }
+
+    /**
+     * Implementation for the CreateNdefMessageCallback interface
+     */
+    @Override
+    public NdefMessage createNdefMessage(NfcEvent event) {
+    	// Get Networkdata
+    	DatabaseHandler dbh = new DatabaseHandler(this);
+		ArrayList<HashMap<String, Object>> localNetworkInformation = dbh.getNetworkInformation();
+
+        NdefMessage msg = null;
+		try {
+			msg = new NdefMessage(NdefRecord.createMime(
+			        "application/de.tudarmstadt.informatik.hostage", serialize(localNetworkInformation))
+			 /**
+			  * The Android Application Record (AAR) is commented out. When a device
+			  * receives a push with an AAR in it, the application specified in the AAR
+			  * is guaranteed to run. The AAR overrides the tag dispatch system.
+			  * You can add it back in to guarantee that this
+			  * activity starts when receiving a beamed message. For now, this code
+			  * uses the tag dispatch system.
+			  */
+			  //,NdefRecord.createApplicationRecord("com.example.android.beam")
+			);
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+        return msg;
+    }
+
+    /**
+     * Implementation for the OnNdefPushCompleteCallback interface
+     */
+    @Override
+    public void onNdefPushComplete(NfcEvent arg0) {
+        // A handler is needed to send messages to the activity when this
+        // callback occurs, because it happens from a binder thread
+        mHandler.obtainMessage(MESSAGE_SENT).sendToTarget();
+    }
+
+    /** This handler receives a message from onNdefPushComplete */
+    private final Handler mHandler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+            case MESSAGE_SENT:
+                Toast.makeText(getApplicationContext(), "Message sent!", Toast.LENGTH_LONG).show();
+                break;
+            }
+        }
+    };
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        // Check to see that the Activity started due to an Android Beam
+        if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction())) {
+            processIntent(getIntent());
+        }
+    }
+
+    @Override
+    public void onNewIntent(Intent intent) {
+        // onResume gets called after this to handle the intent
+        setIntent(intent);
+    }
+
+    /**
+     * Parses the NDEF Message from the intent and prints to the TextView
+     */
+    void processIntent(Intent intent) {
+        Parcelable[] rawMsgs = intent.getParcelableArrayExtra(
+                NfcAdapter.EXTRA_NDEF_MESSAGES);
+        // only one message sent during the beam
+        NdefMessage msg = (NdefMessage) rawMsgs[0];
+        // record 0 contains the MIME type, record 1 is the AAR, if present
+    	Object object;
+		try {
+			object = deserialize(msg.getRecords()[0].getPayload());
+	    	ArrayList<HashMap<String, Object>> remoteNetworkInformation = (ArrayList<HashMap<String, Object>>) object;
+	    	DatabaseHandler dbh = new DatabaseHandler(this);
+	    	dbh.updateNetworkInformation(remoteNetworkInformation);
+		} catch (ClassNotFoundException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}		
+    }
+    
+    //HELPER
+
+    public static byte[] serialize(Object obj) throws IOException {
+    	ByteArrayOutputStream out = new ByteArrayOutputStream();
+    	ObjectOutputStream os = new ObjectOutputStream(out);
+    	os.writeObject(obj);
+    	return out.toByteArray();
+    }
+    public static Object deserialize(byte[] data) throws IOException, ClassNotFoundException {
+    	ByteArrayInputStream in = new ByteArrayInputStream(data);
+    	ObjectInputStream is = new ObjectInputStream(in);
+    	return is.readObject();
+    }	
+
+}

+ 4 - 0
src/de/tudarmstadt/informatik/hostage/ui/ListViewAdapter.java

@@ -25,18 +25,22 @@ public class ListViewAdapter extends BaseAdapter {
 		this.data = data;
 	}
 
+	@Override
 	public int getCount() {
 		return data.size();
 	}
 
+	@Override
 	public Object getItem(int position) {
 		return data.get(position);
 	}
 
+	@Override
 	public long getItemId(int position) {
 		return position;
 	}
 
+	@Override
 	public View getView(int position, View convertView, ViewGroup parent) {
 		View v = convertView;
 		if (v == null) {

+ 9 - 0
src/de/tudarmstadt/informatik/hostage/ui/MainActivity.java

@@ -47,6 +47,7 @@ import android.widget.ToggleButton;
 import android.widget.ViewAnimator;
 import de.tudarmstadt.informatik.hostage.HoneyService;
 import de.tudarmstadt.informatik.hostage.HoneyService.LocalBinder;
+import de.tudarmstadt.informatik.hostage.PlayGroundActivity;
 import de.tudarmstadt.informatik.hostage.R;
 import de.tudarmstadt.informatik.hostage.commons.HelperUtils;
 import de.tudarmstadt.informatik.hostage.logging.Logger;
@@ -224,6 +225,10 @@ public class MainActivity extends Activity {
 	public void showLog(View view){
 		startActivity(new Intent(this, ViewLog.class));
 	}
+	
+	public void startPlayGround(View view){
+		startActivity(new Intent(this, PlayGroundActivity.class));
+	}
 
 	/**
 	 * If mobile phone is connected to a wireless network starts the background service ands binds itself to it.
@@ -270,6 +275,7 @@ public class MainActivity extends Activity {
 		 * After the service is bound, check which has been clicked and start it.
 		 * @see android.content.ServiceConnection#onServiceConnected(android.content.ComponentName)
 		 */
+		@Override
 		public void onServiceConnected(ComponentName name, IBinder service) {
 			mService = ((LocalBinder) service).getService();
 			if(protocolClicked != null && protocolClicked.equals("PANIC")){
@@ -284,6 +290,7 @@ public class MainActivity extends Activity {
 		 * After the service is unbound, delete reference.
 		 * @see android.content.ServiceConnection#onServiceDisconnected(android.content.ComponentName)
 		 */
+		@Override
 		public void onServiceDisconnected(ComponentName name) {
 			mService = null;			
 		}
@@ -323,6 +330,7 @@ public class MainActivity extends Activity {
 		listView.setAdapter(adapter);
 		listView.setOnTouchListener(new OnTouchListener() {
 
+			@Override
 			public boolean onTouch(View v, MotionEvent event) {
 				return gestureDetector.onTouchEvent(event);
 			}
@@ -330,6 +338,7 @@ public class MainActivity extends Activity {
 		});
 		listView.setOnItemClickListener(new OnItemClickListener() {
 
+			@Override
 			public void onItemClick(AdapterView<?> parent, View view,
 					int position, long id) {
 				String protocolName = (String) ((HashMap<?, ?>) adapter

+ 5 - 2
src/de/tudarmstadt/informatik/hostage/ui/ViewLog.java

@@ -12,8 +12,10 @@ import java.util.Locale;
 import de.tudarmstadt.informatik.hostage.R;
 import de.tudarmstadt.informatik.hostage.commons.HelperUtils;
 import de.tudarmstadt.informatik.hostage.logging.Logger;
+import de.tudarmstadt.informatik.hostage.logging.MyLocationManager;
 import de.tudarmstadt.informatik.hostage.logging.Record;
 import de.tudarmstadt.informatik.hostage.logging.SQLLogger;
+import de.tudarmstadt.informatik.hostage.sync.BluetoothSync;
 import android.annotation.SuppressLint;
 import android.app.Activity;
 import android.app.AlertDialog;
@@ -242,7 +244,9 @@ public class ViewLog extends Activity {
 	 * @see ViewLogTable
 	 */
 	public void showLog(View view) {
-		startActivity(new Intent(this, ViewLogTable.class));
+//		startActivity(new Intent(this, ViewLogTable.class));
+		//TODO Delete
+		
 	}
 
 	/**
@@ -257,7 +261,6 @@ public class ViewLog extends Activity {
 	 */
 	public void deleteLog(View view) {
 		AlertDialog.Builder builder = new AlertDialog.Builder(this);
-
 		builder.setTitle(R.string.delete_dialog_title);
 		builder.setItems(R.array.delete_criteria,
 				new DialogInterface.OnClickListener() {

+ 1 - 1
src/de/tudarmstadt/informatik/hostage/ui/ViewLogTable.java

@@ -21,7 +21,7 @@ public class ViewLogTable extends Activity{
 		DatabaseHandler dbh = new DatabaseHandler(getBaseContext());
 		StringBuffer log = new StringBuffer();
 		//Create a log entry for every attack in the Database
-		for(Record record: dbh.getAllReceivedRecordsOfEachAttack()) {
+		for(Record record: dbh.getAllRecords()) {
 			log.append(record.toString(0));
 		}
 		

+ 0 - 5
target/classes/META-INF/MANIFEST.MF

@@ -1,5 +0,0 @@
-Manifest-Version: 1.0
-Build-Jdk: 1.7.0_25
-Built-By: mip
-Created-By: Maven Integration for Eclipse
-

+ 0 - 7
target/classes/META-INF/maven/de.tudarmstadt.informatik/hostage/pom.properties

@@ -1,7 +0,0 @@
-#Generated by Maven Integration for Eclipse
-#Fri Nov 22 14:55:17 CET 2013
-version=2.0.0-SNAPSHOT
-groupId=de.tudarmstadt.informatik
-m2e.projectName=hostage
-m2e.projectLocation=/home/mip/workspace/hostage
-artifactId=hostage

+ 0 - 82
target/classes/META-INF/maven/de.tudarmstadt.informatik/hostage/pom.xml

@@ -1,82 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>de.tudarmstadt.informatik</groupId>
-	<artifactId>hostage</artifactId>
-	<version>2.0.0-SNAPSHOT</version>
-	<packaging>apk</packaging>
-	<name>HosTaGe</name>
-	<dependencies>
-		<dependency>
-			<groupId>android</groupId>
-			<artifactId>android</artifactId>
-			<version>4.4_r1</version>
-			<scope>provided</scope>
-		</dependency>
-		<dependency>
-			<groupId>android.support</groupId>
-			<artifactId>compatibility-v4</artifactId>
-			<version>19.0.0</version>
-		</dependency>
-		<dependency>
-			<groupId>org.roboguice</groupId>
-			<artifactId>roboguice</artifactId>
-			<version>2.0</version>
-		</dependency>
-	</dependencies>
-	<build>
-		<finalName>${project.artifactId}</finalName>
-		<sourceDirectory>src</sourceDirectory>
-		<pluginManagement>
-			<plugins>
-				<plugin>
-					<groupId>com.jayway.maven.plugins.android.generation2</groupId>
-					<artifactId>android-maven-plugin</artifactId>
-					<version>3.8.0</version>
-					<extensions>true</extensions>
-				</plugin>
-				<plugin>
-					<groupId>org.eclipse.m2e</groupId>
-					<artifactId>lifecycle-mapping</artifactId>
-					<version>1.0.0</version>
-					<configuration>
-						<lifecycleMappingMetadata>
-							<pluginExecutions>
-								<pluginExecution>
-									<pluginExecutionFilter>
-										<groupId>
-											com.jayway.maven.plugins.android.generation2
-										</groupId>
-										<artifactId>
-											android-maven-plugin
-										</artifactId>
-										<versionRange>
-											[3.8.0,)
-										</versionRange>
-										<goals>
-											<goal>consume-aar</goal>
-										</goals>
-									</pluginExecutionFilter>
-									<action>
-										<ignore></ignore>
-									</action>
-								</pluginExecution>
-							</pluginExecutions>
-						</lifecycleMappingMetadata>
-					</configuration>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-		<plugins>
-			<plugin>
-				<groupId>com.jayway.maven.plugins.android.generation2</groupId>
-				<artifactId>android-maven-plugin</artifactId>
-				<configuration>
-					<sdk>
-						<platform>19</platform>
-					</sdk>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
-</project>

BIN
target/generated-sources/combined-assets/assets/p


+ 0 - 5
target/generated-sources/r/de/tudarmstadt/informatik/hostage/BuildConfig.java

@@ -1,5 +0,0 @@
-package de.tudarmstadt.informatik.hostage;
-
-public final class BuildConfig {
-  public static final boolean DEBUG = true;
-}

+ 0 - 193
target/generated-sources/r/de/tudarmstadt/informatik/hostage/R.java

@@ -1,193 +0,0 @@
-/* AUTO-GENERATED FILE.  DO NOT MODIFY.
- *
- * This class was automatically generated by the
- * aapt tool from the resource data it found.  It
- * should not be modified by hand.
- */
-
-package de.tudarmstadt.informatik.hostage;
-
-public final class R {
-    public static final class anim {
-        public static final int in_left_to_right=0x7f040000;
-        public static final int in_right_to_left=0x7f040001;
-        public static final int out_left_to_right=0x7f040002;
-        public static final int out_right_to_left=0x7f040003;
-    }
-    public static final class array {
-        public static final int delete_criteria=0x7f060001;
-        public static final int format=0x7f060000;
-        public static final int protocols=0x7f060002;
-    }
-    public static final class attr {
-    }
-    public static final class color {
-        public static final int dark_grey=0x7f070001;
-        public static final int light_grey=0x7f070000;
-    }
-    public static final class dimen {
-        /**  Default screen margins, per the Android Design guidelines. 
-
-         Customize dimensions originally defined in res/values/dimens.xml (such as
-         screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
-    
-         */
-        public static final int activity_horizontal_margin=0x7f080000;
-        public static final int activity_vertical_margin=0x7f080001;
-    }
-    public static final class drawable {
-        public static final int ic_launcher=0x7f020000;
-        public static final int ic_service_green=0x7f020001;
-        public static final int ic_service_red=0x7f020002;
-        public static final int ic_service_yellow=0x7f020003;
-        public static final int light_green=0x7f020004;
-        public static final int light_green_large=0x7f020005;
-        public static final int light_grey=0x7f020006;
-        public static final int light_grey_large=0x7f020007;
-        public static final int light_red=0x7f020008;
-        public static final int light_red_large=0x7f020009;
-        public static final int light_yellow=0x7f02000a;
-        public static final int light_yellow_large=0x7f02000b;
-    }
-    public static final class id {
-        public static final int TextViewServices=0x7f0c0019;
-        public static final int action_about=0x7f0c0029;
-        public static final int action_settings=0x7f0c0028;
-        public static final int buttonDeleteLog=0x7f0c0024;
-        public static final int buttonExportDatabase=0x7f0c0022;
-        public static final int buttonShowLog=0x7f0c000f;
-        public static final int buttonUploadLog=0x7f0c0023;
-        public static final int checkBoxParanoid=0x7f0c000d;
-        public static final int imageViewLight=0x7f0c000c;
-        public static final int layoutContainer=0x7f0c001c;
-        public static final int link_github=0x7f0c0004;
-        public static final int link_tracing=0x7f0c0005;
-        public static final int link_website=0x7f0c0003;
-        public static final int listViewProtocols=0x7f0c001a;
-        public static final int textFirstAttack=0x7f0c001d;
-        public static final int textFirstAttackValue=0x7f0c001e;
-        public static final int textLastAttack=0x7f0c001f;
-        public static final int textLastAttackValue=0x7f0c0020;
-        public static final int textLogFile=0x7f0c0021;
-        public static final int textStatistics=0x7f0c001b;
-        public static final int textViewBSSID=0x7f0c0013;
-        public static final int textViewBSSIDValue=0x7f0c0014;
-        public static final int textViewConnections=0x7f0c0026;
-        public static final int textViewConnectionsValue=0x7f0c0027;
-        public static final int textViewDetails=0x7f0c0010;
-        public static final int textViewExternalIP=0x7f0c0017;
-        public static final int textViewExternalIPValue=0x7f0c0018;
-        public static final int textViewInternalIP=0x7f0c0015;
-        public static final int textViewInternalIPValue=0x7f0c0016;
-        public static final int textViewProtocol=0x7f0c0025;
-        public static final int textViewSSID=0x7f0c0011;
-        public static final int textViewSSIDValue=0x7f0c0012;
-        public static final int textViewStatus=0x7f0c000b;
-        public static final int text_author_1=0x7f0c0007;
-        public static final int text_author_2=0x7f0c0008;
-        public static final int text_author_3=0x7f0c0009;
-        public static final int text_authors=0x7f0c0006;
-        public static final int text_description=0x7f0c0002;
-        public static final int text_version=0x7f0c0000;
-        public static final int toggleButtonOnOff=0x7f0c000e;
-        public static final int version=0x7f0c0001;
-        public static final int viewAnimator=0x7f0c000a;
-    }
-    public static final class layout {
-        public static final int activity_about=0x7f030000;
-        public static final int activity_main=0x7f030001;
-        public static final int activity_viewlog=0x7f030002;
-        public static final int list_view_protocols_row=0x7f030003;
-    }
-    public static final class menu {
-        public static final int main=0x7f0b0000;
-    }
-    public static final class string {
-        public static final int action_about=0x7f090002;
-        public static final int action_settings=0x7f090001;
-        public static final int app_name=0x7f090000;
-        public static final int authors=0x7f09001f;
-        public static final int authors_l=0x7f090021;
-        public static final int authors_m=0x7f090020;
-        public static final int authors_w=0x7f090022;
-        public static final int bssid=0x7f090009;
-        public static final int cancel=0x7f090015;
-        public static final int capital_off=0x7f090004;
-        public static final int capital_on=0x7f090003;
-        public static final int clear=0x7f090013;
-        public static final int connections=0x7f09000d;
-        public static final int database=0x7f09000f;
-        public static final int delete=0x7f090014;
-        public static final int delete_dialog_title=0x7f090018;
-        public static final int description=0x7f09001b;
-        public static final int details=0x7f090007;
-        public static final int dialog_clear_database=0x7f090016;
-        public static final int dialog_clear_database_date=0x7f090019;
-        public static final int export_dialog_title=0x7f090017;
-        public static final int external_ip=0x7f09000b;
-        public static final int firstAttack=0x7f090011;
-        public static final int internal_ip=0x7f09000a;
-        public static final int lastAttack=0x7f090012;
-        public static final int link_github=0x7f09001d;
-        public static final int link_tracing=0x7f09001e;
-        public static final int link_website=0x7f09001c;
-        public static final int log_actions=0x7f090010;
-        public static final int paranoid=0x7f090006;
-        public static final int pref_alarm=0x7f090024;
-        public static final int pref_alarm_default=0x7f090025;
-        public static final int pref_alarm_summ=0x7f090026;
-        public static final int pref_connection_settings=0x7f090036;
-        public static final int pref_external_location_title=0x7f09002a;
-        public static final int pref_external_storage_summ=0x7f090029;
-        public static final int pref_external_storage_title=0x7f090028;
-        public static final int pref_max_connections=0x7f090030;
-        public static final int pref_max_connections_default=0x7f090031;
-        public static final int pref_notification=0x7f09002b;
-        public static final int pref_sleeptime=0x7f090034;
-        public static final int pref_sleeptime_default=0x7f090035;
-        public static final int pref_storage=0x7f090027;
-        public static final int pref_timeout=0x7f090032;
-        public static final int pref_timeout_default=0x7f090033;
-        public static final int pref_upload=0x7f09002e;
-        public static final int pref_upload_server=0x7f09002f;
-        public static final int pref_vibration=0x7f09002c;
-        public static final int pref_vibration_summ=0x7f09002d;
-        public static final int services=0x7f09000c;
-        public static final int settings=0x7f090023;
-        public static final int ssid=0x7f090008;
-        public static final int statistics=0x7f09000e;
-        public static final int status=0x7f090005;
-        public static final int text_version=0x7f09001a;
-    }
-    public static final class style {
-        /** 
-        Base application theme, dependent on API level. This theme is replaced
-        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-    
-
-            Theme customizations available in newer API levels can go in
-            res/values-vXX/styles.xml, while customizations related to
-            backward-compatibility can go here.
-        
-
-        Base application theme for API 11+. This theme completely replaces
-        AppBaseTheme from res/values/styles.xml on API 11+ devices.
-    
- API 11 theme customizations can go here. 
-
-        Base application theme for API 14+. This theme completely replaces
-        AppBaseTheme from BOTH res/values/styles.xml and
-        res/values-v11/styles.xml on API 14+ devices.
-    
- API 14 theme customizations can go here. 
-         */
-        public static final int AppBaseTheme=0x7f0a0000;
-        /**  Application theme. 
- All customizations that are NOT specific to a particular API-level can go here. 
-         */
-        public static final int AppTheme=0x7f0a0001;
-    }
-    public static final class xml {
-        public static final int preferences=0x7f050000;
-    }
-}

BIN
target/hostage.jar


+ 0 - 5
target/maven-archiver/pom.properties

@@ -1,5 +0,0 @@
-#Generated by Maven
-#Fri Nov 22 16:32:37 CET 2013
-version=2.0.0-SNAPSHOT
-groupId=de.tudarmstadt.informatik
-artifactId=hostage

+ 0 - 86
target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -1,86 +0,0 @@
-de/tudarmstadt/informatik/hostage/ui/ViewLogTable.class
-de/tudarmstadt/informatik/hostage/handler/AbstractHandler.class
-de/tudarmstadt/informatik/hostage/R.class
-de/tudarmstadt/informatik/hostage/ConnectionRegister.class
-de/tudarmstadt/informatik/hostage/commons/HelperUtils.class
-de/tudarmstadt/informatik/hostage/net/MySSLSocketFactory.class
-de/tudarmstadt/informatik/hostage/ui/ViewLog.class
-de/tudarmstadt/informatik/hostage/protocol/TELNET.class
-de/tudarmstadt/informatik/hostage/R$dimen.class
-de/tudarmstadt/informatik/hostage/ui/MainActivity$5.class
-de/tudarmstadt/informatik/hostage/protocol/HTTPS.class
-de/tudarmstadt/informatik/hostage/format/TELNETFormatter.class
-de/tudarmstadt/informatik/hostage/system/PrivilegedPort.class
-de/tudarmstadt/informatik/hostage/io/ByteArrayReaderWriter.class
-de/tudarmstadt/informatik/hostage/protocol/SMB$SMBPacket.class
-de/tudarmstadt/informatik/hostage/ui/ListViewAdapter.class
-de/tudarmstadt/informatik/hostage/HoneyService$LocalBinder.class
-de/tudarmstadt/informatik/hostage/ui/ViewLog$5.class
-de/tudarmstadt/informatik/hostage/format/DefaultFormatter.class
-de/tudarmstadt/informatik/hostage/protocol/SSLProtocol.class
-de/tudarmstadt/informatik/hostage/ui/MainActivity$SetExternalIPTask.class
-de/tudarmstadt/informatik/hostage/HoneyService$1.class
-de/tudarmstadt/informatik/hostage/ui/MainActivity$4.class
-de/tudarmstadt/informatik/hostage/ui/ViewLog$2.class
-de/tudarmstadt/informatik/hostage/format/SMBFormatter.class
-de/tudarmstadt/informatik/hostage/ui/MainActivity$3.class
-de/tudarmstadt/informatik/hostage/protocol/TELNET$1.class
-de/tudarmstadt/informatik/hostage/protocol/FTP$STATE.class
-de/tudarmstadt/informatik/hostage/net/MyServerSocketFactory.class
-de/tudarmstadt/informatik/hostage/protocol/TELNET$STATE.class
-de/tudarmstadt/informatik/hostage/protocol/FTP.class
-de/tudarmstadt/informatik/hostage/HoneyListener.class
-de/tudarmstadt/informatik/hostage/R$color.class
-de/tudarmstadt/informatik/hostage/logging/Record.class
-de/tudarmstadt/informatik/hostage/ui/ViewLog$1.class
-de/tudarmstadt/informatik/hostage/ui/SettingsActivity.class
-de/tudarmstadt/informatik/hostage/protocol/FTP$1.class
-de/tudarmstadt/informatik/hostage/net/MySSLSocketFactory$1.class
-de/tudarmstadt/informatik/hostage/wrapper/ByteArray.class
-de/tudarmstadt/informatik/hostage/BuildConfig.class
-de/tudarmstadt/informatik/hostage/R$style.class
-de/tudarmstadt/informatik/hostage/R$string.class
-de/tudarmstadt/informatik/hostage/protocol/MySQL$STATE.class
-de/tudarmstadt/informatik/hostage/protocol/SMB.class
-de/tudarmstadt/informatik/hostage/io/ReaderWriter.class
-de/tudarmstadt/informatik/hostage/ui/ViewLog$6.class
-de/tudarmstadt/informatik/hostage/HoneyService.class
-de/tudarmstadt/informatik/hostage/ui/AboutActivity.class
-de/tudarmstadt/informatik/hostage/ui/MainActivity$2.class
-de/tudarmstadt/informatik/hostage/R$attr.class
-de/tudarmstadt/informatik/hostage/R$anim.class
-de/tudarmstadt/informatik/hostage/protocol/SSH.class
-de/tudarmstadt/informatik/hostage/ui/ViewLog$4.class
-de/tudarmstadt/informatik/hostage/protocol/SMB$STATE.class
-de/tudarmstadt/informatik/hostage/logging/SQLLogger.class
-de/tudarmstadt/informatik/hostage/protocol/ECHO.class
-de/tudarmstadt/informatik/hostage/protocol/Protocol$TALK_FIRST.class
-de/tudarmstadt/informatik/hostage/ui/ViewLog$8.class
-de/tudarmstadt/informatik/hostage/R$id.class
-de/tudarmstadt/informatik/hostage/protocol/SSH$STATE.class
-de/tudarmstadt/informatik/hostage/logging/DatabaseHandler.class
-de/tudarmstadt/informatik/hostage/protocol/Protocol.class
-de/tudarmstadt/informatik/hostage/ui/MainActivity.class
-de/tudarmstadt/informatik/hostage/ui/ViewLog$7.class
-de/tudarmstadt/informatik/hostage/format/ProtocolFormatter.class
-de/tudarmstadt/informatik/hostage/protocol/MySQL.class
-de/tudarmstadt/informatik/hostage/logging/Record$TYPE.class
-de/tudarmstadt/informatik/hostage/R$drawable.class
-de/tudarmstadt/informatik/hostage/ui/MainActivity$1.class
-de/tudarmstadt/informatik/hostage/R$layout.class
-de/tudarmstadt/informatik/hostage/logging/Logger.class
-de/tudarmstadt/informatik/hostage/format/LogViewFormatter.class
-de/tudarmstadt/informatik/hostage/protocol/SSH$1.class
-de/tudarmstadt/informatik/hostage/protocol/MySQL$1.class
-de/tudarmstadt/informatik/hostage/handler/StringHandler.class
-de/tudarmstadt/informatik/hostage/R$xml.class
-de/tudarmstadt/informatik/hostage/protocol/HTTP.class
-de/tudarmstadt/informatik/hostage/ui/ViewLog$3.class
-de/tudarmstadt/informatik/hostage/format/MySQLFormatter.class
-de/tudarmstadt/informatik/hostage/ui/MainActivity$6.class
-de/tudarmstadt/informatik/hostage/protocol/SMB$1.class
-de/tudarmstadt/informatik/hostage/R$menu.class
-de/tudarmstadt/informatik/hostage/io/StringReaderWriter.class
-de/tudarmstadt/informatik/hostage/handler/ByteArrayHandler.class
-de/tudarmstadt/informatik/hostage/ui/ViewLog$9.class
-de/tudarmstadt/informatik/hostage/R$array.class

+ 0 - 42
target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -1,42 +0,0 @@
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/ui/ListViewAdapter.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/protocol/TELNET.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/handler/StringHandler.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/format/TELNETFormatter.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/ui/ViewLogTable.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/net/MySSLSocketFactory.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/logging/DatabaseHandler.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/net/MyServerSocketFactory.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/io/ByteArrayReaderWriter.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/protocol/ECHO.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/io/ReaderWriter.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/protocol/SSLProtocol.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/format/LogViewFormatter.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/protocol/HTTPS.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/wrapper/ByteArray.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/commons/HelperUtils.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/protocol/FTP.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/protocol/SSH.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/format/ProtocolFormatter.java
-/home/mip/workspace/hostage/target/generated-sources/r/de/tudarmstadt/informatik/hostage/BuildConfig.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/protocol/SMB.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/HoneyService.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/format/MySQLFormatter.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/HoneyListener.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/io/StringReaderWriter.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/ui/SettingsActivity.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/protocol/MySQL.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/format/DefaultFormatter.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/logging/SQLLogger.java
-/home/mip/workspace/hostage/target/generated-sources/r/de/tudarmstadt/informatik/hostage/R.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/protocol/Protocol.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/handler/ByteArrayHandler.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/system/PrivilegedPort.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/ui/MainActivity.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/ui/AboutActivity.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/logging/Record.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/ui/ViewLog.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/format/SMBFormatter.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/ConnectionRegister.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/logging/Logger.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/protocol/HTTP.java
-/home/mip/workspace/hostage/src/de/tudarmstadt/informatik/hostage/handler/AbstractHandler.java