diff --git a/res/layout/custom_commands_item.xml b/res/layout/custom_commands_item.xml
index 74edabf..08ae6b8 100644
--- a/res/layout/custom_commands_item.xml
+++ b/res/layout/custom_commands_item.xml
@@ -44,16 +44,16 @@
android:layout_alignParentStart="true" />
+ android:layout_alignParentEnd="true"
+ android:layout_marginTop="@dimen/base_listItem_LR"
+ android:layout_marginRight="@dimen/base_listItem_LR"
+ android:text="Run"
+ android:textColor="@android:color/holo_blue_dark" />
@@ -19,13 +20,16 @@
android:layout_height="wrap_content"
android:text="@string/add_lauchner_btn_label"
- android:textAppearance="?android:attr/textAppearanceLarge" />
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="@android:color/white" />
+ android:layout_height="wrap_content"
+ android:textColor="@android:color/white">
+
@@ -34,45 +38,47 @@
android:layout_height="wrap_content"
android:text="@string/add_lauchner_btn_command"
- android:textAppearance="?android:attr/textAppearanceLarge" />
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="@android:color/white" />
+ android:layout_marginBottom="10dp"
+ android:textColor="@android:color/white" />
+
-
-
-
+ android:text="Send to:"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="@android:color/white" />
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="@android:color/white" />
+ android:text="Run at boot:"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="@android:color/white" />
+
+ android:layout_marginBottom="18dp"
+ android:layout_toStartOf="@+id/searchsploit_sendhid_button"
+ android:gravity="center_vertical"
+ android:paddingLeft="@dimen/base_listItem_LR"
+ android:paddingRight="@dimen/base_listItem_LR"
+ android:text="description"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="@android:color/white" />
+
+ android:layout_alignStart="@+id/openWeb"
+ android:layout_marginRight="@dimen/base_listItem_LR"
+ android:text="View Source"
+ android:textColor="@android:color/holo_blue_dark" />
+ android:layout_alignParentEnd="true"
+ android:layout_marginRight="@dimen/base_listItem_LR"
+ android:text="View in www"
+ android:textColor="@android:color/holo_blue_dark" />
+ android:layout_alignEnd="@+id/viewSource"
+ android:layout_alignParentTop="true"
+ android:text="SEND HID"
+ android:textColor="@android:color/holo_blue_dark" />
diff --git a/src/com/offsec/nethunter/SearchSploitSQL.java b/src/com/offsec/nethunter/SearchSploitSQL.java
index 01ad257..8328047 100644
--- a/src/com/offsec/nethunter/SearchSploitSQL.java
+++ b/src/com/offsec/nethunter/SearchSploitSQL.java
@@ -29,7 +29,7 @@ class SearchSploitSQL extends SQLiteOpenHelper {
}
public void onCreate(SQLiteDatabase database) {
- String CREATE_SEARCHSPLOIT_TABLE = "CREATE TABLE IF NOT EXISTS " + SearchSploit.TABLE +
+ String CREATE_SEARCHSPLOIT_TABLE = "CREATE TABLE IF NOT EXISTS " + SearchSploit.TABLE +
" (" + SearchSploit.ID + " INTEGER PRIMARY KEY, " +
SearchSploit.FILE + " TEXT," +
SearchSploit.DESCRIPTION + " TEXT," +
@@ -37,7 +37,7 @@ public void onCreate(SQLiteDatabase database) {
SearchSploit.AUTHOR + " TEXT," +
SearchSploit.PLATFORM + " TEXT," +
SearchSploit.TYPE + " TEXT," +
- SearchSploit.PORT + " INTEGER)";
+ SearchSploit.PORT + " INTEGER DEFAULT 0)";
database.execSQL(CREATE_SEARCHSPLOIT_TABLE);
database.disableWriteAheadLogging();
}
@@ -58,7 +58,9 @@ public void doDrop() {
Boolean doDbFeed() {
// copy csv to /sdcard as temp (so we can read it)
- String _cmd = "su -c bootkali custom_cmd csv2sqlite.py /usr/share/exploitdb/files.csv /sdcard/nh_files/SearchSploit " + SearchSploit.TABLE;
+ String _cmd = "su -c bootkali\n" + "csv2sqlite.py /usr/share/exploitdb/files_exploits.csv SearchSploit " + SearchSploit.TABLE + "\n" +
+ "sqlite3 SearchSploit 'UPDATE " + SearchSploit.TABLE + " SET " + SearchSploit.PORT + " = 0 WHERE " + SearchSploit.PORT + " IS NULL;'\n" +
+ "mv SearchSploit /sdcard/nh_files/SearchSploit\n";
// move to app db folder
exe.RunAsRootOutput(_cmd);
return true;
@@ -118,8 +120,8 @@ private List createExploitList(Cursor cursor) {
_exploit.setDescription(cursor.getString(2)); // desc
_exploit.setDate(cursor.getString(3)); // date
_exploit.setAuthor(cursor.getString(4)); // author
- _exploit.setPlatform(cursor.getString(5)); // platform
- _exploit.setType(cursor.getString(6)); // type
+ _exploit.setType(cursor.getString(5)); // type
+ _exploit.setPlatform(cursor.getString(6)); // platform
_exploit.setPort(cursor.getInt(7)); // port
commandList.add(_exploit);
} while (cursor.moveToNext());