Skip to content

Commit 45b1c72

Browse files
committed
Merge pull request #307 from fat-tire/develop
Cooler console, condensed code cleanup, & corrected colored contexts
2 parents 7c5cce4 + bbf6499 commit 45b1c72

31 files changed

+229
-163
lines changed
188 Bytes
Loading
139 Bytes
Loading
199 Bytes
Loading
255 Bytes
Loading
308 Bytes
Loading
Lines changed: 62 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,83 @@
11
<?xml version="1.0" encoding="utf-8"?>
22

33
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
4-
android:orientation="vertical"
5-
android:layout_width="match_parent"
6-
android:layout_height="match_parent">
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
android:orientation="vertical">
8+
9+
<ScrollView
10+
android:id="@+id/outputscroll"
11+
android:layout_width="fill_parent"
12+
android:layout_height="wrap_content"
13+
android:layout_above="@+id/input"
14+
android:layout_alignParentTop="true"
15+
android:background="@color/black"
16+
android:gravity="top"
17+
android:scrollHorizontally="false"
18+
android:scrollbarAlwaysDrawVerticalTrack="true"
19+
android:scrollbarFadeDuration="0">
20+
21+
<TextView
22+
android:id="@+id/output"
23+
android:layout_width="fill_parent"
24+
android:layout_height="wrap_content"
25+
android:padding="4dp"
26+
android:scrollHorizontally="false"
27+
android:scrollbars="vertical"
28+
android:singleLine="false"
29+
android:textAppearance="?android:attr/textAppearanceMedium"
30+
android:textColor="@color/orange"
31+
android:textIsSelectable="true"
32+
android:textSize="14sp"
33+
android:typeface="monospace" />
34+
</ScrollView>
735

836
<EditText
37+
android:id="@+id/input"
938
android:layout_width="wrap_content"
1039
android:layout_height="wrap_content"
11-
android:textAppearance="?android:attr/textAppearanceMedium"
12-
android:id="@+id/input"
40+
android:layout_alignParentBottom="true"
41+
android:layout_alignParentEnd="true"
42+
android:layout_alignParentLeft="true"
43+
android:layout_alignParentRight="true"
44+
android:layout_alignParentStart="true"
45+
android:layout_alignTop="@android:id/button1"
1346
android:layout_gravity="bottom|left"
14-
android:hint="@string/command"
1547
android:capitalize="none"
1648
android:clickable="true"
1749
android:editable="true"
50+
android:elegantTextHeight="true"
1851
android:enabled="true"
52+
android:focusable="true"
53+
android:focusableInTouchMode="true"
54+
android:hint="@string/command"
1955
android:imeActionId="4"
20-
android:longClickable="true"
56+
android:imeOptions="actionDone"
2157
android:imeActionLabel="@string/run"
22-
android:typeface="monospace"
23-
android:inputType="textMultiLine|textNoSuggestions"
24-
android:layout_alignParentTop="true"
25-
android:layout_alignParentLeft="true"
26-
android:layout_alignBottom="@android:id/button1"
27-
android:layout_toLeftOf="@android:id/button1"/>
58+
android:inputType="textNoSuggestions"
59+
android:longClickable="true"
60+
android:textAppearance="?android:attr/textAppearanceMedium"
61+
android:textSize="14sp"
62+
android:typeface="monospace" />
2863

29-
<Button
30-
style="?android:attr/buttonStyleSmall"
64+
<android.support.design.widget.FloatingActionButton
65+
android:id="@+id/myFAB"
3166
android:layout_width="wrap_content"
3267
android:layout_height="wrap_content"
33-
android:text="@string/run"
34-
android:id="@android:id/button1"
35-
android:layout_alignParentTop="true"
68+
android:layout_alignBottom="@+id/outputscroll"
69+
android:layout_alignParentEnd="true"
3670
android:layout_alignParentRight="true"
37-
android:enabled="true"
38-
android:clickable="true"
39-
android:fontFamily="sans-serif-condensed"/>
71+
android:layout_marginBottom="-20dp"
72+
android:layout_marginEnd="16dp"
73+
android:layout_marginRight="16dp"
74+
android:src="@drawable/ic_done_white_24dp"
75+
android:text="@string/run"
76+
app:elevation="4dp"
77+
app:fabSize="mini"
78+
app:layout_anchor="@id/outputscroll"
79+
app:layout_anchorGravity="bottom|right|end"
80+
app:rippleColor="@color/pink" />
4081

4182
<!-- <TextView
4283
android:layout_width="fill_parent"
@@ -48,16 +89,4 @@
4889
android:typeface="monospace"
4990
android:scrollbars="horizontal|vertical"/> -->
5091

51-
<EditText
52-
android:layout_width="fill_parent"
53-
android:layout_height="wrap_content"
54-
android:textAppearance="?android:attr/textAppearanceMedium"
55-
android:id="@+id/output"
56-
android:layout_below="@+id/input"
57-
android:layout_alignParentBottom="true"
58-
android:typeface="monospace"
59-
android:scrollbars="horizontal|vertical"
60-
android:gravity="top|left"
61-
android:scrollHorizontally="true"
62-
android:inputType="textMultiLine|textNoSuggestions"/>
6392
</RelativeLayout>

cSploit/res/values/colors.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@
1515
<color name="green">#4CAF50</color>
1616
<color name="purple">#3F51B5</color>
1717
<color name="orange">#FFC107</color>
18+
<color name="black">#000000</color>
19+
1820
</resources>

cSploit/res/values/strings.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
3838
See the GNU General Public License for more details.
3939
You should have received a copy of the GNU General Public License along with this program.
40-
If not, see http://www.gnu.org/licenses/.
40+
If not, see http://www.gnu.org/licenses/.\n\nAdditionally, some icons have been distributed under the CC-BY 4.0 license and are copyrighted by Google, Inc.
41+
The full icon set is available at https://www.google.com/design/icons .
4142
</string>
4243
<string name="service">Service</string>
4344
<string name="stopped">Stopped&#8230;</string>
@@ -441,7 +442,7 @@
441442
<string name="sessions_title">Open a shell by clicking on a session, or see more options by long press on it.</string>
442443
<string name="open_shell">Open shell</string>
443444
<string name="clear_event_log">Clear event log</string>
444-
<string name="run">Run</string>
445+
<string name="run">&#9166;</string>
445446
<string name="command">Command</string>
446447
<string name="clear">Clear</string>
447448
<string name="save">Save</string>

cSploit/src/org/csploit/android/SettingsActivity.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ public class SettingsActivity extends PreferenceActivity implements OnSharedPref
7979
@SuppressWarnings("ConstantConditions")
8080
@Override
8181
protected void onCreate(Bundle savedInstanceState) {
82+
SharedPreferences themePrefs = getSharedPreferences("THEME", 0);
83+
if (themePrefs.getBoolean("isDark", false))
84+
setTheme(R.style.DarkTheme);
85+
else
86+
setTheme(R.style.AppTheme);
8287
super.onCreate(savedInstanceState);
8388
// no action bar in PreferenceActivity
8489
// getActionBar().setDisplayHomeAsUpEnabled(true);

cSploit/src/org/csploit/android/core/System.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ else if(name.endsWith(".tiff"))
907907
return type;
908908
}
909909

910-
public static void reset() throws NoRouteToHostException, SocketException{
910+
public static void reset() throws SocketException{
911911
mTargets.clear();
912912

913913
// local network

0 commit comments

Comments
 (0)