From 58e804fa5fe7956570b5a834b9de2aac0a3ea303 Mon Sep 17 00:00:00 2001 From: fattire Date: Sat, 3 Oct 2015 01:13:13 -0700 Subject: [PATCH 01/10] Terrible first pass at showing port on main scanner screen * this is just a POC. * It works until you start scrolling, then it turns into a shit show. * Need to figure some logic for when to do a portscan-- right now it's done when the item rolls into view in the listview. This is smart in that you're not scanning things until they show up on screen. This is dumb in that if you scroll, a ton of portscans are launched. * It's also dumb in that as new items pop into the listview, the order is no longer preserved and the wrong item gets changed (Reciever needs a better way of remembering which item it was scanning than just the position, because that changes as new items are listed. Using the view doesn't work either as thyey're recycled on scrolling. I'm sure I just need to think a second and the answer will be obvious. * No Preferences support.. it always scrolls. * It probably also crashes easily. I didn't test much. --- cSploit/res/layout/target_list_item.xml | 25 +++++-- .../src/org/csploit/android/MainActivity.java | 67 +++++++++++++++++-- 2 files changed, 84 insertions(+), 8 deletions(-) diff --git a/cSploit/res/layout/target_list_item.xml b/cSploit/res/layout/target_list_item.xml index 6c28880202..f5ff9f8e78 100644 --- a/cSploit/res/layout/target_list_item.xml +++ b/cSploit/res/layout/target_list_item.xml @@ -23,16 +23,33 @@ android:layout_toRightOf="@id/itemIcon" android:textColor="@color/app_color" android:fontFamily="sans-serif-light" - android:textSize="16sp" /> + android:textSize="16sp" + android:layout_toLeftOf="@+id/portCount" + android:layout_toStartOf="@+id/portCount" /> + android:textSize="14sp" + android:layout_toRightOf="@+id/itemIcon" + android:layout_toLeftOf="@+id/portCount" + android:layout_toStartOf="@+id/portCount" + android:layout_below="@+id/itemTitle" /> + \ No newline at end of file diff --git a/cSploit/src/org/csploit/android/MainActivity.java b/cSploit/src/org/csploit/android/MainActivity.java index 52ad38b668..7e38ff9911 100644 --- a/cSploit/src/org/csploit/android/MainActivity.java +++ b/cSploit/src/org/csploit/android/MainActivity.java @@ -27,6 +27,7 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; +import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.support.v7.view.ActionMode; import android.text.Html; @@ -48,6 +49,7 @@ import android.widget.Toast; import org.csploit.android.core.Child; +import org.csploit.android.core.ChildManager; import org.csploit.android.core.Client; import org.csploit.android.core.CrashReporter; import org.csploit.android.core.Logger; @@ -83,6 +85,7 @@ import org.csploit.android.services.UpdateService; import org.csploit.android.services.receivers.MsfRpcdServiceReceiver; import org.csploit.android.services.receivers.NetworkRadarReceiver; +import org.csploit.android.tools.NMap; import org.csploit.android.update.CoreUpdate; import org.csploit.android.update.MsfUpdate; import org.csploit.android.update.RubyUpdate; @@ -132,6 +135,7 @@ private void createUpdateStatusText() { layout.addView(mUpdateStatus); } + private void createUpdateLayout() { lv.setVisibility(View.GONE); @@ -841,13 +845,14 @@ public View getView(int position, View convertView, ViewGroup parent) { .findViewById(R.id.itemTitle) : null); holder.itemDescription = (TextView) (row != null ? row .findViewById(R.id.itemDescription) : null); - + holder.portCount = (TextView) (row != null ? row + .findViewById(R.id.portCount) : null); if (row != null) row.setTag(holder); } else holder = (TargetHolder) row.getTag(); - Target target = System.getTarget(position); + final Target target = System.getTarget(position); if (target.hasAlias()) holder.itemTitle.setText(Html.fromHtml("" @@ -856,8 +861,7 @@ public View getView(int position, View convertView, ViewGroup parent) { else holder.itemTitle.setText(target.toString()); - - holder.itemTitle.setTextColor(getResources().getColor((target.isConnected() ? R.color.app_color : R.color.gray_text))); + holder.itemTitle.setTextColor(ContextCompat.getColor(getContext(), (target.isConnected() ? R.color.app_color : R.color.gray_text))); if (row != null && (getSharedPreferences("THEME", 0).getBoolean("isDark", false))) row.setBackgroundResource(R.drawable.card_background_dark); @@ -865,6 +869,23 @@ public View getView(int position, View convertView, ViewGroup parent) { holder.itemImage.setImageResource(target.getDrawableResourceId()); holder.itemDescription.setText(target.getDescription()); + // only do a portscan if/when target rolls into view and ports haven't been found... + if (target.getType() != Target.Type.NETWORK && target.getOpenPorts().size() == 0) { + final Receiver r = new Receiver(position, convertView); + Thread thread = new Thread() { + @Override + public void run() { + try { + System.getTools().nmap + .synScan(target, r, null); + } catch (ChildManager.ChildNotStartedException e) { + e.printStackTrace(); + } + } + }; + thread.run(); + } + return row; } @@ -918,6 +939,7 @@ class TargetHolder { ImageView itemImage; TextView itemTitle; TextView itemDescription; + TextView portCount; } } @@ -1093,4 +1115,41 @@ public void onReceive(Context context, Intent intent) { } } } + + private class Receiver extends NMap.SynScanReceiver { + int position; + final View cv; + + public Receiver(int position, View cv) { + this.position = position; + this.cv = cv; + } + + @Override + public void onEnd(int exitCode) { + MainActivity.this.runOnUiThread( + new Runnable() { + @Override + public void run() { + System.setCurrentTarget(position); + // new items may have snuck in so the order can change. Double check this + if (cv != null) { + TextView tv = (TextView) cv.findViewById(R.id.portCount); + if (tv != null) { + tv.setText(String.format("%d", System.getCurrentTarget().getOpenPorts().size())); + tv.setVisibility(System.getCurrentTarget().getOpenPorts().size() < 1 ? View.GONE : View.VISIBLE); + } + } + } + } + ); + super.onEnd(exitCode); + } + + @Override + public void onPortFound(int port, String protocol) { + System.setCurrentTarget(position); + System.addOpenPort(port, null); + } + } } \ No newline at end of file From 4594543cc2d86553c693a9c728e724dc984263d6 Mon Sep 17 00:00:00 2001 From: tux_mind Date: Sat, 3 Oct 2015 15:09:50 +0200 Subject: [PATCH 02/10] alias can be set to null --- cSploit/src/org/csploit/android/net/Target.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cSploit/src/org/csploit/android/net/Target.java b/cSploit/src/org/csploit/android/net/Target.java index 8c6c54dbbc..35f2d4fc01 100644 --- a/cSploit/src/org/csploit/android/net/Target.java +++ b/cSploit/src/org/csploit/android/net/Target.java @@ -404,7 +404,7 @@ else if(mType == Type.REMOTE){ } public void setAlias(String alias){ - mAlias = alias.trim(); + mAlias = alias == null ? null : alias.trim(); } public String getAlias(){ From 20b5ce677a43ba3cc709b8697f2c8e34127a6c39 Mon Sep 17 00:00:00 2001 From: tux_mind Date: Sat, 3 Oct 2015 15:11:02 +0200 Subject: [PATCH 03/10] give an handy way to scan without custom ports --- cSploit/src/org/csploit/android/tools/NMap.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cSploit/src/org/csploit/android/tools/NMap.java b/cSploit/src/org/csploit/android/tools/NMap.java index af76f4e756..2486e1af08 100644 --- a/cSploit/src/org/csploit/android/tools/NMap.java +++ b/cSploit/src/org/csploit/android/tools/NMap.java @@ -142,6 +142,10 @@ public Child synScan( Target target, SynScanReceiver receiver, String custom ) t return super.async( command, receiver ); } + public Child synScan( Target target, SynScanReceiver receiver) throws ChildManager.ChildNotStartedException { + return synScan(target, receiver, null); + } + public Child customScan( Target target, SynScanReceiver receiver, String custom ) throws ChildManager.ChildNotStartedException { String command = "-vvv "; From 454f31e417289d68db241df15f647bce9660653b Mon Sep 17 00:00:00 2001 From: tux_mind Date: Sat, 3 Oct 2015 15:12:52 +0200 Subject: [PATCH 04/10] fixed some little things <3 --- .../src/org/csploit/android/MainActivity.java | 56 +-------------- .../android/services/NetworkRadar.java | 68 +++++++++++++++---- 2 files changed, 57 insertions(+), 67 deletions(-) diff --git a/cSploit/src/org/csploit/android/MainActivity.java b/cSploit/src/org/csploit/android/MainActivity.java index 7e38ff9911..0aa94e2dd0 100644 --- a/cSploit/src/org/csploit/android/MainActivity.java +++ b/cSploit/src/org/csploit/android/MainActivity.java @@ -869,23 +869,10 @@ public View getView(int position, View convertView, ViewGroup parent) { holder.itemImage.setImageResource(target.getDrawableResourceId()); holder.itemDescription.setText(target.getDescription()); - // only do a portscan if/when target rolls into view and ports haven't been found... - if (target.getType() != Target.Type.NETWORK && target.getOpenPorts().size() == 0) { - final Receiver r = new Receiver(position, convertView); - Thread thread = new Thread() { - @Override - public void run() { - try { - System.getTools().nmap - .synScan(target, r, null); - } catch (ChildManager.ChildNotStartedException e) { - e.printStackTrace(); - } - } - }; - thread.run(); - } + int openedPorts = target.getOpenPorts().size(); + holder.portCount.setText(String.format("%d", openedPorts)); + holder.portCount.setVisibility(openedPorts < 1 ? View.GONE : View.VISIBLE); return row; } @@ -1115,41 +1102,4 @@ public void onReceive(Context context, Intent intent) { } } } - - private class Receiver extends NMap.SynScanReceiver { - int position; - final View cv; - - public Receiver(int position, View cv) { - this.position = position; - this.cv = cv; - } - - @Override - public void onEnd(int exitCode) { - MainActivity.this.runOnUiThread( - new Runnable() { - @Override - public void run() { - System.setCurrentTarget(position); - // new items may have snuck in so the order can change. Double check this - if (cv != null) { - TextView tv = (TextView) cv.findViewById(R.id.portCount); - if (tv != null) { - tv.setText(String.format("%d", System.getCurrentTarget().getOpenPorts().size())); - tv.setVisibility(System.getCurrentTarget().getOpenPorts().size() < 1 ? View.GONE : View.VISIBLE); - } - } - } - } - ); - super.onEnd(exitCode); - } - - @Override - public void onPortFound(int port, String protocol) { - System.setCurrentTarget(position); - System.addOpenPort(port, null); - } - } } \ No newline at end of file diff --git a/cSploit/src/org/csploit/android/services/NetworkRadar.java b/cSploit/src/org/csploit/android/services/NetworkRadar.java index e8baadcdbb..0a466c97bd 100644 --- a/cSploit/src/org/csploit/android/services/NetworkRadar.java +++ b/cSploit/src/org/csploit/android/services/NetworkRadar.java @@ -8,7 +8,11 @@ import org.csploit.android.core.Logger; import org.csploit.android.core.System; import org.csploit.android.core.ChildManager; +import org.csploit.android.net.Endpoint; +import org.csploit.android.net.Network; import org.csploit.android.net.Target; +import org.csploit.android.tools.NMap; +import org.csploit.android.tools.NetworkRadar.HostReceiver; import java.net.InetAddress; @@ -64,36 +68,57 @@ public void buildMenuItem(MenuItem item) { item.setEnabled(System.getTools().networkRadar.isEnabled()); } - private class Receiver extends org.csploit.android.tools.NetworkRadar.HostReceiver { + private void onNewHostFound(Target target) { + try { + System.getTools().nmap.synScan(target, new ScanReceiver(target)); + } catch (ChildManager.ChildNotStartedException e) { + System.errorLogging(e); + } + } + + private class Receiver extends HostReceiver { @Override public void onHostFound(byte[] macAddress, InetAddress ipAddress, String name) { Target t; boolean notify = false; + boolean justFound; t = System.getTargetByAddress(ipAddress); + justFound = t == null; - if(t==null) { + if(justFound) { t = new Target(ipAddress, macAddress); - - System.addOrderedTarget(t); - - notify = true; - } - - if( !t.isConnected() ) { - t.setConneced(true); - notify = true; - } - - if (name != null && !name.equals(t.getAlias())) { t.setAlias(name); + System.addOrderedTarget(t); notify = true; + } else { + if (!t.isConnected()) { + t.setConneced(true); + notify = true; + } + + if (name != null && !name.equals(t.getAlias())) { + t.setAlias(name); + notify = true; + } + + //TODO: remove me ( and imports ) + Endpoint e = new Endpoint(ipAddress, macAddress); + if(!e.equals(t.getEndpoint())) { + Logger.warning( + String.format("target '%s' changed it's mac address from '%s' to '%s'", + t.toString(), t.getEndpoint().getHardwareAsString(), e.getHardwareAsString())); + } } if(notify) { sendIntent(NRDR_CHANGED); } + + if(justFound) { + onNewHostFound(t); + } } @Override @@ -120,4 +145,19 @@ public void onDeath(int signal) { sendIntent(NRDR_STOPPED); } } + + private class ScanReceiver extends NMap.SynScanReceiver { + + private final Target target; + + public ScanReceiver(Target target) { + this.target = target; + } + + @Override + public void onPortFound(int port, String protocol) { + target.addOpenPort(port, Network.Protocol.fromString(protocol)); + sendIntent(NRDR_CHANGED); + } + } } From 31893e96ca0932dfb8bc283911686c8d10bd0dbb Mon Sep 17 00:00:00 2001 From: tux-mind Date: Sat, 3 Oct 2015 20:38:57 +0200 Subject: [PATCH 05/10] Fixed NPE thanks to rubenoo --- .../src/org/csploit/android/net/metasploit/MsfExploit.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cSploit/src/org/csploit/android/net/metasploit/MsfExploit.java b/cSploit/src/org/csploit/android/net/metasploit/MsfExploit.java index e2eecb7cf9..113c3eab85 100644 --- a/cSploit/src/org/csploit/android/net/metasploit/MsfExploit.java +++ b/cSploit/src/org/csploit/android/net/metasploit/MsfExploit.java @@ -87,7 +87,9 @@ public MsfExploit(String name, String summary, String description, Ranking rank, this.authors = authors; this.platforms = platforms; this.architectures = architectures; - this.references.addAll(references); + if(references != null) { + this.references.addAll(references); + } refresh(); } From d3ea05bd09b2277d61a7c65f7a4f4c758c3f24cb Mon Sep 17 00:00:00 2001 From: fattire Date: Sat, 3 Oct 2015 15:01:14 -0700 Subject: [PATCH 06/10] Use labels/badges/whatever for portcount -- no dark theme support yet There are still bugs with the feature, but here are the label bits anyway --- cSploit/res/layout/target_list_item.xml | 56 ++++++++++++++----- cSploit/res/values/strings.xml | 1 + .../src/org/csploit/android/MainActivity.java | 12 ++-- 3 files changed, 49 insertions(+), 20 deletions(-) diff --git a/cSploit/res/layout/target_list_item.xml b/cSploit/res/layout/target_list_item.xml index f5ff9f8e78..dbf933a2b1 100644 --- a/cSploit/res/layout/target_list_item.xml +++ b/cSploit/res/layout/target_list_item.xml @@ -24,8 +24,8 @@ android:textColor="@color/app_color" android:fontFamily="sans-serif-light" android:textSize="16sp" - android:layout_toLeftOf="@+id/portCount" - android:layout_toStartOf="@+id/portCount" /> + android:layout_toLeftOf="@+id/portCountLayout" + android:layout_toStartOf="@+id/portCountLayout" /> - - + + android:id="@+id/portCountLayout" + android:orientation="vertical" + android:layout_centerInParent="true" + android:background="@drawable/card_background" + android:translationZ="8dp" + android:paddingLeft="6dp" + android:paddingRight="6dp" + android:paddingBottom="10dp" + android:paddingTop="4dp"> + + + + + + + \ No newline at end of file diff --git a/cSploit/res/values/strings.xml b/cSploit/res/values/strings.xml index 1aa3a263a8..e270d2dd48 100644 --- a/cSploit/res/values/strings.xml +++ b/cSploit/res/values/strings.xml @@ -9,6 +9,7 @@ Enter redirection details below: Address Port + Ports Target No information Services diff --git a/cSploit/src/org/csploit/android/MainActivity.java b/cSploit/src/org/csploit/android/MainActivity.java index 0aa94e2dd0..a6df986f75 100644 --- a/cSploit/src/org/csploit/android/MainActivity.java +++ b/cSploit/src/org/csploit/android/MainActivity.java @@ -43,13 +43,13 @@ import android.widget.AdapterView.OnItemLongClickListener; import android.widget.ArrayAdapter; import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.ListView; import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; import org.csploit.android.core.Child; -import org.csploit.android.core.ChildManager; import org.csploit.android.core.Client; import org.csploit.android.core.CrashReporter; import org.csploit.android.core.Logger; @@ -85,7 +85,6 @@ import org.csploit.android.services.UpdateService; import org.csploit.android.services.receivers.MsfRpcdServiceReceiver; import org.csploit.android.services.receivers.NetworkRadarReceiver; -import org.csploit.android.tools.NMap; import org.csploit.android.update.CoreUpdate; import org.csploit.android.update.MsfUpdate; import org.csploit.android.update.RubyUpdate; @@ -845,8 +844,10 @@ public View getView(int position, View convertView, ViewGroup parent) { .findViewById(R.id.itemTitle) : null); holder.itemDescription = (TextView) (row != null ? row .findViewById(R.id.itemDescription) : null); - holder.portCount = (TextView) (row != null ? row - .findViewById(R.id.portCount) : null); + holder.portCount = (TextView) (row != null ? row + .findViewById(R.id.portCount) : null); + holder.portCountLayout = (LinearLayout) (row != null ? row + .findViewById(R.id.portCountLayout) : null); if (row != null) row.setTag(holder); } else @@ -872,7 +873,7 @@ public View getView(int position, View convertView, ViewGroup parent) { int openedPorts = target.getOpenPorts().size(); holder.portCount.setText(String.format("%d", openedPorts)); - holder.portCount.setVisibility(openedPorts < 1 ? View.GONE : View.VISIBLE); + holder.portCountLayout.setVisibility(openedPorts < 1 ? View.GONE : View.VISIBLE); return row; } @@ -927,6 +928,7 @@ class TargetHolder { TextView itemTitle; TextView itemDescription; TextView portCount; + LinearLayout portCountLayout; } } From c6e831be1a680882b21f310b126be72eb25a2b73 Mon Sep 17 00:00:00 2001 From: fattire Date: Sat, 3 Oct 2015 17:52:24 -0700 Subject: [PATCH 07/10] Fix look of ports count + a few other UI tweaks --- cSploit/res/drawable/rounded_square.xml | 5 ++ cSploit/res/layout/actions_layout.xml | 3 +- cSploit/res/layout/plugin_exploit_finder.xml | 67 ++++++++++--------- cSploit/res/layout/target_layout.xml | 4 +- cSploit/res/layout/target_list_item.xml | 64 +++++++++--------- cSploit/res/layout/wifi_scanner.xml | 41 ++++++------ .../android/plugins/ExploitFinder.java | 10 +-- 7 files changed, 104 insertions(+), 90 deletions(-) create mode 100644 cSploit/res/drawable/rounded_square.xml diff --git a/cSploit/res/drawable/rounded_square.xml b/cSploit/res/drawable/rounded_square.xml new file mode 100644 index 0000000000..50a1009bc5 --- /dev/null +++ b/cSploit/res/drawable/rounded_square.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/cSploit/res/layout/actions_layout.xml b/cSploit/res/layout/actions_layout.xml index 346df9944a..98f8cf1167 100644 --- a/cSploit/res/layout/actions_layout.xml +++ b/cSploit/res/layout/actions_layout.xml @@ -27,6 +27,7 @@ android:layout_height="wrap_content" android:showDividers="none" android:dividerHeight="6dp" - android:divider="#00ffffff"/> + android:divider="#00ffffff" + android:animateLayoutChanges="true" /> \ No newline at end of file diff --git a/cSploit/res/layout/plugin_exploit_finder.xml b/cSploit/res/layout/plugin_exploit_finder.xml index 85c00b6648..693f03cd88 100644 --- a/cSploit/res/layout/plugin_exploit_finder.xml +++ b/cSploit/res/layout/plugin_exploit_finder.xml @@ -1,45 +1,46 @@ + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:orientation="vertical" + android:padding="10dp"> + android:id="@+id/searchToggleButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="sans-serif-condensed" + android:paddingLeft="24dp" + android:paddingRight="24dp" + android:text="@string/toggle_button" + android:textAllCaps="true" + android:textOff="Start" + android:textOn="Stop" /> + android:id="@+id/searchActivity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_alignTop="@+id/searchToggleButton" + android:visibility="invisible" /> + android:id="@+id/separator" + android:layout_width="fill_parent" + android:layout_height="1dp" + android:layout_below="@+id/searchToggleButton" + android:layout_marginBottom="8dp" + android:layout_marginTop="8dp" + android:background="@android:color/darker_gray" /> + android:id="@id/android:list" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignRight="@+id/searchActivity" + android:layout_below="@+id/separator" + android:animateLayoutChanges="true" /> \ No newline at end of file diff --git a/cSploit/res/layout/target_layout.xml b/cSploit/res/layout/target_layout.xml index acfb0543ad..0fc2d9e0b2 100644 --- a/cSploit/res/layout/target_layout.xml +++ b/cSploit/res/layout/target_layout.xml @@ -12,7 +12,9 @@ android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" - android:layout_below="@+id/textView" /> + android:layout_below="@+id/textView" + android:animateLayoutChanges="true" + /> + android:textColor="@color/app_color" + android:textSize="16sp" /> + android:layout_alignStart="@+id/itemTitle" + android:layout_below="@+id/itemTitle" + android:layout_toLeftOf="@+id/portCountLayout" + android:fontFamily="sans-serif-condensed" + android:textColor="@color/gray_text" + android:textSize="14sp" /> + + android:paddingTop="4dp" + android:translationZ="6dp"> + android:textStyle="bold" /> + android:gravity="top|center_horizontal" + android:text="22" + android:textColor="@color/background_window" + android:textSize="16dp" /> diff --git a/cSploit/res/layout/wifi_scanner.xml b/cSploit/res/layout/wifi_scanner.xml index cbd92e472a..d1524ed5f1 100644 --- a/cSploit/res/layout/wifi_scanner.xml +++ b/cSploit/res/layout/wifi_scanner.xml @@ -1,28 +1,29 @@ + android:id="@+id/layout" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="8dp"> + android:id="@+id/android:list" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignParentLeft="true" + android:layout_below="@+id/scanStatusText" + android:animateLayoutChanges="true" /> + android:id="@+id/scanStatusText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignLeft="@+id/android:list" + android:layout_alignParentTop="true" + android:layout_alignRight="@+id/android:list" + android:fontFamily="sans-serif-condensed" + android:padding="8dp" + android:text="Status" + android:textAppearance="?android:attr/textAppearanceSmall" /> \ No newline at end of file diff --git a/cSploit/src/org/csploit/android/plugins/ExploitFinder.java b/cSploit/src/org/csploit/android/plugins/ExploitFinder.java index 742fd9519a..89ed40d9e4 100644 --- a/cSploit/src/org/csploit/android/plugins/ExploitFinder.java +++ b/cSploit/src/org/csploit/android/plugins/ExploitFinder.java @@ -123,7 +123,7 @@ public View getView(int position, View convertView, ViewGroup parent) { switch (rank) { case Low: rString+= "Low"; - color = "red"; + color = "#F44336"; // red break; case Average: rString+= "Average"; @@ -135,20 +135,20 @@ public View getView(int position, View convertView, ViewGroup parent) { break; case Good: rString+= "Good"; - color = "blue"; + color = "#3F9FE0"; // blue break; case Great: rString+= "Great"; - color = "green"; + color = "#4CAF50"; // green break; case Excellent: rString+= "Excellent"; - color = "green"; + color = "#4CAF50"; // green break; case Manual: default: rString+= "Manual"; - color = "gray4"; + color = "gray4"; //green break; } From 3e3757dbfe9cb0ce4d85d8b46a0b2b9c9aef7b6b Mon Sep 17 00:00:00 2001 From: fattire Date: Sat, 3 Oct 2015 18:17:45 -0700 Subject: [PATCH 08/10] Replace slides with fades for more coherence (see below) Eventually will want to do complex animations, but for now, I think the dissolves make it feel more like a single program rather than multiple activities sliding in and out. Makes me less dizzy too. --- cSploit/res/anim/fadein.xml | 6 ++++++ cSploit/res/anim/fadeout.xml | 6 ++++++ cSploit/src/org/csploit/android/ActionActivity.java | 4 ++-- cSploit/src/org/csploit/android/MainActivity.java | 5 +++-- .../src/org/csploit/android/SettingsActivity.java | 5 +++++ .../src/org/csploit/android/WifiScannerActivity.java | 3 +-- .../org/csploit/android/plugins/ExploitFinder.java | 3 +-- .../src/org/csploit/android/plugins/Inspector.java | 1 + .../org/csploit/android/plugins/LoginCracker.java | 1 + .../org/csploit/android/plugins/PacketForger.java | 2 +- .../src/org/csploit/android/plugins/PortScanner.java | 2 +- .../src/org/csploit/android/plugins/RouterPwn.java | 7 +++++++ .../src/org/csploit/android/plugins/Sessions.java | 12 +++++++++--- .../src/org/csploit/android/plugins/Traceroute.java | 1 + .../csploit/android/plugins/mitm/DNSSpoofing.java | 2 +- .../src/org/csploit/android/plugins/mitm/MITM.java | 9 +++++---- .../android/plugins/mitm/PasswordSniffer.java | 2 +- .../org/csploit/android/plugins/mitm/Sniffer.java | 2 +- .../android/plugins/mitm/hijacker/Hijacker.java | 2 +- .../plugins/mitm/hijacker/HijackerWebView.java | 3 +-- 20 files changed, 55 insertions(+), 23 deletions(-) create mode 100644 cSploit/res/anim/fadein.xml create mode 100644 cSploit/res/anim/fadeout.xml diff --git a/cSploit/res/anim/fadein.xml b/cSploit/res/anim/fadein.xml new file mode 100644 index 0000000000..4510acb6b1 --- /dev/null +++ b/cSploit/res/anim/fadein.xml @@ -0,0 +1,6 @@ + + diff --git a/cSploit/res/anim/fadeout.xml b/cSploit/res/anim/fadeout.xml new file mode 100644 index 0000000000..4f62cbfbf0 --- /dev/null +++ b/cSploit/res/anim/fadeout.xml @@ -0,0 +1,6 @@ + + diff --git a/cSploit/src/org/csploit/android/ActionActivity.java b/cSploit/src/org/csploit/android/ActionActivity.java index 798f121f1e..1df722f67b 100644 --- a/cSploit/src/org/csploit/android/ActionActivity.java +++ b/cSploit/src/org/csploit/android/ActionActivity.java @@ -79,7 +79,7 @@ public void onItemClick(AdapterView parent, View view, int position, long id) ActionActivity.this, plugin.getClass() )); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } else plugin.onActionClick(getApplicationContext()); } @@ -109,7 +109,7 @@ public boolean onOptionsItemSelected(MenuItem item) { @Override public void onBackPressed() { super.onBackPressed(); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } public class ActionsAdapter extends ArrayAdapter { diff --git a/cSploit/src/org/csploit/android/MainActivity.java b/cSploit/src/org/csploit/android/MainActivity.java index a6df986f75..8070428d4a 100644 --- a/cSploit/src/org/csploit/android/MainActivity.java +++ b/cSploit/src/org/csploit/android/MainActivity.java @@ -322,8 +322,8 @@ public void run() { startActivityForResult(new Intent(MainActivity.this, ActionActivity.class), WIFI_CONNECTION_REQUEST); - overridePendingTransition(R.anim.slide_in_left, - R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); + } }).start(); @@ -735,6 +735,7 @@ public void onItemSelected(int index) { case R.id.settings: startActivity(new Intent(MainActivity.this, SettingsActivity.class)); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); return true; case R.id.ss_monitor: diff --git a/cSploit/src/org/csploit/android/SettingsActivity.java b/cSploit/src/org/csploit/android/SettingsActivity.java index 362174d831..da0e6d81b5 100644 --- a/cSploit/src/org/csploit/android/SettingsActivity.java +++ b/cSploit/src/org/csploit/android/SettingsActivity.java @@ -575,6 +575,11 @@ public void onDestroy() { } super.onDestroy(); } + } + @Override + public void onBackPressed() { + super.onBackPressed(); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } } diff --git a/cSploit/src/org/csploit/android/WifiScannerActivity.java b/cSploit/src/org/csploit/android/WifiScannerActivity.java index 81ce8dd865..ad1fdf3195 100644 --- a/cSploit/src/org/csploit/android/WifiScannerActivity.java +++ b/cSploit/src/org/csploit/android/WifiScannerActivity.java @@ -415,7 +415,6 @@ public boolean onOptionsItemSelected(MenuItem item){ } if(item.getItemId() == android.R.id.home){ onBackPressed(); - return true; } else return super.onOptionsItemSelected(item); @@ -435,7 +434,7 @@ public void onBackPressed(){ setResult(RESULT_OK, intent); super.onBackPressed(); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } public class ScanAdapter extends ArrayAdapter{ diff --git a/cSploit/src/org/csploit/android/plugins/ExploitFinder.java b/cSploit/src/org/csploit/android/plugins/ExploitFinder.java index 89ed40d9e4..6a44e008e5 100644 --- a/cSploit/src/org/csploit/android/plugins/ExploitFinder.java +++ b/cSploit/src/org/csploit/android/plugins/ExploitFinder.java @@ -21,7 +21,6 @@ import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; -import android.graphics.Color; import android.graphics.Typeface; import android.net.Uri; import android.os.Bundle; @@ -415,7 +414,7 @@ public boolean onOptionsItemSelected(MenuItem item) { public void onBackPressed() { setStoppedState(); super.onBackPressed(); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } @Override diff --git a/cSploit/src/org/csploit/android/plugins/Inspector.java b/cSploit/src/org/csploit/android/plugins/Inspector.java index 27c97d64ed..76e07a1ca5 100644 --- a/cSploit/src/org/csploit/android/plugins/Inspector.java +++ b/cSploit/src/org/csploit/android/plugins/Inspector.java @@ -171,6 +171,7 @@ public void onClick(View v){ public void onBackPressed(){ setStoppedState(); super.onBackPressed(); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } @Override diff --git a/cSploit/src/org/csploit/android/plugins/LoginCracker.java b/cSploit/src/org/csploit/android/plugins/LoginCracker.java index 44fa84843d..444e37e4be 100644 --- a/cSploit/src/org/csploit/android/plugins/LoginCracker.java +++ b/cSploit/src/org/csploit/android/plugins/LoginCracker.java @@ -413,6 +413,7 @@ protected void onActivityResult(int request, int result, Intent intent) { public void onBackPressed() { setStoppedState(); super.onBackPressed(); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } public class ProtocolAdapter extends BaseAdapter implements SpinnerAdapter { diff --git a/cSploit/src/org/csploit/android/plugins/PacketForger.java b/cSploit/src/org/csploit/android/plugins/PacketForger.java index 4e4cf51bd2..8051ebc589 100644 --- a/cSploit/src/org/csploit/android/plugins/PacketForger.java +++ b/cSploit/src/org/csploit/android/plugins/PacketForger.java @@ -289,7 +289,7 @@ private void setStoppedState(String errorMessage) { @Override public void onBackPressed() { setStoppedState(null); - super.onBackPressed(); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } } diff --git a/cSploit/src/org/csploit/android/plugins/PortScanner.java b/cSploit/src/org/csploit/android/plugins/PortScanner.java index ca00602ac5..5965694e7a 100644 --- a/cSploit/src/org/csploit/android/plugins/PortScanner.java +++ b/cSploit/src/org/csploit/android/plugins/PortScanner.java @@ -23,7 +23,6 @@ import android.content.SharedPreferences; import android.net.Uri; import android.os.Bundle; -import android.preference.PreferenceManager; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; @@ -363,6 +362,7 @@ public void onInputEntered(String input) { public void onBackPressed() { setStoppedState(); super.onBackPressed(); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } private class Receiver extends NMap.SynScanReceiver { diff --git a/cSploit/src/org/csploit/android/plugins/RouterPwn.java b/cSploit/src/org/csploit/android/plugins/RouterPwn.java index fb3ac41344..b4f000b3d4 100644 --- a/cSploit/src/org/csploit/android/plugins/RouterPwn.java +++ b/cSploit/src/org/csploit/android/plugins/RouterPwn.java @@ -47,6 +47,13 @@ public boolean isAllowedTarget(Target target){ return target.isRouter(); } + + @Override + public void onBackPressed() { + super.onBackPressed(); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); + } + @Override public void onActionClick(Context context){ try{ diff --git a/cSploit/src/org/csploit/android/plugins/Sessions.java b/cSploit/src/org/csploit/android/plugins/Sessions.java index 8c21c3144f..584fab63ee 100644 --- a/cSploit/src/org/csploit/android/plugins/Sessions.java +++ b/cSploit/src/org/csploit/android/plugins/Sessions.java @@ -77,7 +77,7 @@ public void onChoice(int choice) { case R.string.open_shell: System.setCurrentSession(s); startActivity(new Intent(Sessions.this, Console.class)); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); break; case R.string.show_full_description: String message = s.getDescription(); @@ -126,7 +126,7 @@ public void onItemClick(AdapterView parent, View view, int position, long id) if(s.haveShell()) { System.setCurrentSession(s); startActivity(new Intent(Sessions.this,Console.class)); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } else { longClickListener.onItemLongClick(parent, view, position, id); } @@ -179,7 +179,7 @@ public void run() { }).start(); } - @Override + @Override public void onRpcChange(RPCClient currentValue) { if(UIThread==null) return; @@ -188,4 +188,10 @@ public void onRpcChange(RPCClient currentValue) { else if(currentValue == null) new FinishDialog(getString(R.string.error),getString(R.string.msfrpc_disconnected),Sessions.this).show(); } + + @Override + public void onBackPressed() { + super.onBackPressed(); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); + } } \ No newline at end of file diff --git a/cSploit/src/org/csploit/android/plugins/Traceroute.java b/cSploit/src/org/csploit/android/plugins/Traceroute.java index 8edf16c5dc..0ad911884f 100644 --- a/cSploit/src/org/csploit/android/plugins/Traceroute.java +++ b/cSploit/src/org/csploit/android/plugins/Traceroute.java @@ -141,6 +141,7 @@ public boolean onOptionsItemSelected(MenuItem item){ public void onBackPressed() { setStoppedState(); super.onBackPressed(); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } private class Receiver extends NMap.TraceReceiver { diff --git a/cSploit/src/org/csploit/android/plugins/mitm/DNSSpoofing.java b/cSploit/src/org/csploit/android/plugins/mitm/DNSSpoofing.java index 53ac8fc72b..cf0fc832cf 100644 --- a/cSploit/src/org/csploit/android/plugins/mitm/DNSSpoofing.java +++ b/cSploit/src/org/csploit/android/plugins/mitm/DNSSpoofing.java @@ -236,7 +236,7 @@ public void run() { public void onBackPressed() { setStoppedState(); super.onBackPressed(); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } } diff --git a/cSploit/src/org/csploit/android/plugins/mitm/MITM.java b/cSploit/src/org/csploit/android/plugins/mitm/MITM.java index 5773800725..8497d3cd26 100644 --- a/cSploit/src/org/csploit/android/plugins/mitm/MITM.java +++ b/cSploit/src/org/csploit/android/plugins/mitm/MITM.java @@ -440,7 +440,7 @@ public void onClick(View v) { Sniffer.class ) ); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } })); @@ -465,7 +465,7 @@ public void onClick(View v){ PasswordSniffer.class ) ); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } })); @@ -491,7 +491,7 @@ public void onClick(View v) { DNSSpoofing.class ) ); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } })); @@ -516,7 +516,7 @@ public void onClick(View v){ Hijacker.class ) ); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } })); @@ -987,5 +987,6 @@ public void onError(String error, int resId){ public void onBackPressed(){ setStoppedState(); super.onBackPressed(); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } } diff --git a/cSploit/src/org/csploit/android/plugins/mitm/PasswordSniffer.java b/cSploit/src/org/csploit/android/plugins/mitm/PasswordSniffer.java index e2b6ca7804..7fc5552553 100644 --- a/cSploit/src/org/csploit/android/plugins/mitm/PasswordSniffer.java +++ b/cSploit/src/org/csploit/android/plugins/mitm/PasswordSniffer.java @@ -352,6 +352,6 @@ public void run() { public void onBackPressed() { setStoppedState(); super.onBackPressed(); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } } \ No newline at end of file diff --git a/cSploit/src/org/csploit/android/plugins/mitm/Sniffer.java b/cSploit/src/org/csploit/android/plugins/mitm/Sniffer.java index 021e1f3361..9765340502 100644 --- a/cSploit/src/org/csploit/android/plugins/mitm/Sniffer.java +++ b/cSploit/src/org/csploit/android/plugins/mitm/Sniffer.java @@ -463,6 +463,6 @@ public void run() { public void onBackPressed(){ setStoppedState(); super.onBackPressed(); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } } \ No newline at end of file diff --git a/cSploit/src/org/csploit/android/plugins/mitm/hijacker/Hijacker.java b/cSploit/src/org/csploit/android/plugins/mitm/hijacker/Hijacker.java index 00264c37bd..26f24cc2ef 100644 --- a/cSploit/src/org/csploit/android/plugins/mitm/hijacker/Hijacker.java +++ b/cSploit/src/org/csploit/android/plugins/mitm/hijacker/Hijacker.java @@ -622,6 +622,6 @@ public void onItemSelected(int index) { public void onBackPressed() { setStoppedState(); super.onBackPressed(); - overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } } diff --git a/cSploit/src/org/csploit/android/plugins/mitm/hijacker/HijackerWebView.java b/cSploit/src/org/csploit/android/plugins/mitm/hijacker/HijackerWebView.java index d2c565ab6f..4834a14400 100644 --- a/cSploit/src/org/csploit/android/plugins/mitm/hijacker/HijackerWebView.java +++ b/cSploit/src/org/csploit/android/plugins/mitm/hijacker/HijackerWebView.java @@ -190,8 +190,7 @@ public void onBackPressed() { mWebView.stopLoading(); super.onBackPressed(); - overridePendingTransition(R.anim.slide_in_left, - R.anim.slide_out_left); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); } } } From 88d6c52cdde1a3be207fa1da741c5e94b9a4bcd1 Mon Sep 17 00:00:00 2001 From: fattire Date: Sun, 4 Oct 2015 01:30:50 -0700 Subject: [PATCH 09/10] Spelling: It's apparently Metasploit not MetaSploit --- cSploit/res/values/strings.xml | 44 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/cSploit/res/values/strings.xml b/cSploit/res/values/strings.xml index e270d2dd48..a5e99eb000 100644 --- a/cSploit/res/values/strings.xml +++ b/cSploit/res/values/strings.xml @@ -78,8 +78,8 @@ Network discovery started. Start Network Monitor Stop Network Monitor - Start MetaSploit RPCD - Stop MetaSploit RPCD + Start Metasploit RPCD + Stop Metasploit RPCD Exit This will close cSploit, are you sure you want to continue? @@ -239,11 +239,11 @@ RPC error bad settings cannot execute shell - Starting MetaSploit RPCD. Standby… - MetaSploit RPCD started - MetaSploit RPCD stopped - MetaSploit RPCD is already running - MetaSploit RPCD does not respond + Starting Metasploit RPCD. Standby… + Metasploit RPCD started + Metasploit RPCD stopped + Metasploit RPCD is already running + Metasploit RPCD does not respond Simple Sniff @@ -326,7 +326,7 @@ General Modules - MetaSploit Framework + Metasploit Framework Performance Check for Updates Wake Lock @@ -355,20 +355,20 @@ Check for MSF updates Check for MSF updates every time the application is started. RPC username - Username for connect to MetaSploit RPCD. + Username for connect to Metasploit RPCD. RPC password - Password for connect to MetaSploit RPCD. + Password for connect to Metasploit RPCD. RPC host - host where the MetaSploit RPC server is on + host where the Metasploit RPC server is on RPC port - Port for connect to MetaSploit RPCD. + Port for connect to Metasploit RPCD. RPC use SSL - Specify if MetaSploit RPC use SSL + Specify if Metasploit RPC use SSL MSF directory - Directory containing the MetaSploit Framework. + Directory containing the Metasploit Framework. Ruby directory Directory containing the Ruby interpreter. - The MetaSploit Framework branch to use + The Metasploit Framework branch to use MSF branch Search preferences Search for vulnerability using @@ -398,12 +398,12 @@ Advanced Folder Enable MSF - Enable the MetaSploit Framework + Enable the Metasploit Framework MSF status notifications View MSF RPC connection status Delete MSF - Delete the MetaSploit Framework from your device - Do you really want to delete the MetaSploit Framework? + Delete the Metasploit Framework from your device + Do you really want to delete the Metasploit Framework? About %d MB will be freed. does not exists. is not writable. @@ -463,9 +463,9 @@ Target selected Targets selected Multiple attack - Connect to MetaSploit - Disconnect from MetaSploit - Connected to MetaSploit + Connect to Metasploit + Disconnect from Metasploit + Connected to Metasploit Connection FAILED! An update for ruby is available Delete previous location? @@ -514,5 +514,5 @@ App version %s is available, do you want to upgrade ? A new version for ruby is available, do you want to upgrade ? A new msf version is available, do you want to upgrade ? - MetaSploit Status + Metasploit Status From e3ef01b2a1efd42762997f344f93dd6dbd0cce83 Mon Sep 17 00:00:00 2001 From: fattire Date: Sun, 4 Oct 2015 01:39:30 -0700 Subject: [PATCH 10/10] Add more fades between activities + animate listview items --- cSploit/res/layout/plugin_mitm.xml | 3 +- cSploit/res/layout/plugin_mitm_hijacker.xml | 95 +++++++-------- .../layout/plugin_mitm_password_sniffer.xml | 74 ++++++------ cSploit/res/layout/plugin_mitm_sniffer.xml | 109 +++++++++--------- cSploit/res/layout/plugin_portscanner.xml | 93 +++++++-------- cSploit/res/layout/plugin_sessions_layout.xml | 47 ++++---- cSploit/res/layout/plugin_traceroute.xml | 65 ++++++----- .../src/org/csploit/android/MainActivity.java | 1 + 8 files changed, 247 insertions(+), 240 deletions(-) diff --git a/cSploit/res/layout/plugin_mitm.xml b/cSploit/res/layout/plugin_mitm.xml index ccf189e8c9..50b57f17e5 100644 --- a/cSploit/res/layout/plugin_mitm.xml +++ b/cSploit/res/layout/plugin_mitm.xml @@ -11,5 +11,6 @@ android:layout_width="match_parent" android:layout_height="fill_parent" android:dividerHeight="6dp" - android:divider="#00ffffff" /> + android:divider="#00ffffff" + android:animateLayoutChanges="true" /> \ No newline at end of file diff --git a/cSploit/res/layout/plugin_mitm_hijacker.xml b/cSploit/res/layout/plugin_mitm_hijacker.xml index dd302814dd..58ef2fb6bc 100644 --- a/cSploit/res/layout/plugin_mitm_hijacker.xml +++ b/cSploit/res/layout/plugin_mitm_hijacker.xml @@ -1,61 +1,62 @@ + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:orientation="vertical" + android:padding="8dp"> + android:id="@+id/hijackToggleButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="sans-serif-condensed" + android:paddingLeft="24dp" + android:paddingRight="24dp" + android:text="@string/toggle_button" + android:textAllCaps="true" + android:textOff="Start" + android:textOn="Stop" /> + android:id="@+id/hijackActivity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_alignTop="@+id/hijackToggleButton" + android:visibility="invisible" /> + android:id="@+id/separator" + android:layout_width="fill_parent" + android:layout_height="1dp" + android:layout_below="@+id/hijackToggleButton" + android:layout_marginBottom="8dp" + android:layout_marginTop="8dp" + android:background="@android:color/darker_gray" /> + android:id="@+id/textView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignLeft="@+id/separator" + android:layout_alignRight="@+id/separator" + android:layout_below="@+id/separator" + android:gravity="center_horizontal" + android:padding="8dp" + android:text="@string/start_hijack" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="@color/gray_text" /> + android:id="@+id/listView" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignRight="@+id/textView" + android:layout_below="@+id/textView" + android:animateLayoutChanges="true" + android:indicatorLeft="?android:attr/expandableListPreferredItemIndicatorLeft" + android:paddingLeft="8dp" + android:paddingRight="8dp" /> \ No newline at end of file diff --git a/cSploit/res/layout/plugin_mitm_password_sniffer.xml b/cSploit/res/layout/plugin_mitm_password_sniffer.xml index 62bd957df7..a782364237 100644 --- a/cSploit/res/layout/plugin_mitm_password_sniffer.xml +++ b/cSploit/res/layout/plugin_mitm_password_sniffer.xml @@ -1,48 +1,50 @@ + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:orientation="vertical" + android:padding="8dp"> + android:id="@+id/sniffToggleButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="sans-serif-condensed" + android:paddingLeft="24dp" + android:paddingRight="24dp" + android:text="@string/toggle_button" + android:textAllCaps="true" + android:textOff="Start" + android:textOn="Stop" /> + android:id="@+id/sniffActivity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_alignTop="@+id/sniffToggleButton" + android:visibility="invisible" /> + android:id="@+id/separator" + android:layout_width="fill_parent" + android:layout_height="1dp" + android:layout_below="@+id/sniffToggleButton" + android:layout_marginBottom="8dp" + android:layout_marginTop="8dp" + android:background="@android:color/darker_gray" /> + android:id="@+id/listView" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignRight="@+id/sniffActivity" + android:layout_below="@+id/separator" + android:animateLayoutChanges="true" + android:indicatorLeft="?android:attr/expandableListPreferredItemIndicatorLeft" + android:paddingLeft="8dp" + + android:paddingRight="8dp" /> \ No newline at end of file diff --git a/cSploit/res/layout/plugin_mitm_sniffer.xml b/cSploit/res/layout/plugin_mitm_sniffer.xml index 26c0595d54..7a7f06fb58 100644 --- a/cSploit/res/layout/plugin_mitm_sniffer.xml +++ b/cSploit/res/layout/plugin_mitm_sniffer.xml @@ -1,70 +1,71 @@ + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:orientation="vertical" + android:padding="8dp"> + android:id="@+id/sniffToggleButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="sans-serif-condensed" + android:paddingLeft="24dp" + android:paddingRight="24dp" + android:text="@string/toggle_button" + android:textAllCaps="true" + android:textOff="@string/start" + android:textOn="@string/stop" /> + android:id="@+id/sniffActivity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_alignTop="@+id/sniffToggleButton" + android:visibility="invisible" /> + android:id="@+id/separator" + android:layout_width="fill_parent" + android:layout_height="1dp" + android:layout_below="@+id/sniffToggleButton" + android:layout_marginBottom="8dp" + android:layout_marginTop="8dp" + android:background="@android:color/darker_gray" /> + android:id="@+id/listView" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignRight="@+id/sniffActivity" + android:layout_below="@+id/separator" + android:animateLayoutChanges="true" + android:indicatorLeft="?android:attr/expandableListPreferredItemIndicatorLeft" + android:paddingLeft="8dp" + android:paddingRight="8dp" /> + android:id="@+id/sortSpinner" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBottom="@+id/sniffToggleButton" + android:layout_alignTop="@+id/sniffActivity" + android:layout_toLeftOf="@+id/sniffActivity" + android:layout_toRightOf="@+id/textView1" /> + android:id="@+id/textView1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBottom="@+id/sniffToggleButton" + android:layout_alignTop="@+id/sortSpinner" + android:layout_toRightOf="@+id/sniffToggleButton" + android:gravity="center_vertical" + android:paddingLeft="24dp" + android:paddingRight="8dp" + android:text="@string/sort" + android:textAppearance="?android:attr/textAppearanceMedium" /> \ No newline at end of file diff --git a/cSploit/res/layout/plugin_portscanner.xml b/cSploit/res/layout/plugin_portscanner.xml index 1b118f4959..826434bf87 100644 --- a/cSploit/res/layout/plugin_portscanner.xml +++ b/cSploit/res/layout/plugin_portscanner.xml @@ -1,79 +1,80 @@ + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:orientation="vertical" + android:padding="8dp"> + android:id="@+id/scanToggleButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="sans-serif-condensed" + android:paddingLeft="24dp" + android:paddingRight="24dp" + android:text="@string/toggle_button" + android:textAllCaps="true" + android:textOff="@string/start" + android:textOn="Stop" /> + android:background="@android:color/darker_gray" /> + android:id="@+id/scanListView" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_alignParentRight="true" + android:layout_below="@+id/separator" + android:animateLayoutChanges="true" /> + android:id="@+id/scanActivity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignRight="@+id/scanListView" + android:visibility="invisible" /> + android:visibility="gone" /> diff --git a/cSploit/res/layout/plugin_sessions_layout.xml b/cSploit/res/layout/plugin_sessions_layout.xml index 809086d01b..27e1282d9f 100644 --- a/cSploit/res/layout/plugin_sessions_layout.xml +++ b/cSploit/res/layout/plugin_sessions_layout.xml @@ -1,38 +1,37 @@ + android:id="@+id/layout" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="10dp"> - - + android:id="@android:id/list" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignParentLeft="true" + android:layout_below="@+id/textView" + android:animateLayoutChanges="true" /> + android:layout_alignParentLeft="true" + android:background="@android:color/darker_gray" /> + android:id="@+id/textView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_alignParentRight="true" + android:layout_alignParentTop="true" + android:padding="5dp" + android:text="@string/sessions_title" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textColor="#ccc" /> \ No newline at end of file diff --git a/cSploit/res/layout/plugin_traceroute.xml b/cSploit/res/layout/plugin_traceroute.xml index 2a27bdf7a0..7deb81c44b 100644 --- a/cSploit/res/layout/plugin_traceroute.xml +++ b/cSploit/res/layout/plugin_traceroute.xml @@ -1,44 +1,45 @@ + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:orientation="vertical" + android:padding="8dp"> + android:id="@+id/traceToggleButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="sans-serif-condensed" + android:paddingLeft="24dp" + android:paddingRight="24dp" + android:text="@string/toggle_button" + android:textAllCaps="true" + android:textOff="Start" + android:textOn="Stop" /> + android:id="@+id/separator" + android:layout_width="fill_parent" + android:layout_height="1dp" + android:layout_below="@+id/traceToggleButton" + android:layout_marginBottom="8dp" + android:layout_marginTop="8dp" + android:background="@android:color/darker_gray" /> + android:id="@+id/traceListView" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_alignParentRight="true" + android:layout_below="@+id/separator" + android:animateLayoutChanges="true" /> + android:id="@+id/traceActivity" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignRight="@+id/traceListView" + android:visibility="invisible" /> \ No newline at end of file diff --git a/cSploit/src/org/csploit/android/MainActivity.java b/cSploit/src/org/csploit/android/MainActivity.java index 8070428d4a..a9f89d182e 100644 --- a/cSploit/src/org/csploit/android/MainActivity.java +++ b/cSploit/src/org/csploit/android/MainActivity.java @@ -641,6 +641,7 @@ public void run() { startActivityForResult(new Intent(MainActivity.this, WifiScannerActivity.class), WIFI_CONNECTION_REQUEST); + overridePendingTransition(R.anim.fadeout, R.anim.fadein); return true; case R.id.new_session: