Skip to content

Commit 853b326

Browse files
committed
enable tools only if handlers has been loaded.
fix NullPointerException by creating KnownIssues instance before Toolbox.
1 parent 3a40403 commit 853b326

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

cSploit/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="org.csploit.android"
44
android:versionCode="1"
5-
android:versionName="1.4.3" >
5+
android:versionName="1.4.4" >
66

77
<uses-sdk
88
android:minSdkVersion="9"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ public static void init(Context context) throws Exception{
150150
Logger.debug("initializing System...");
151151
mStoragePath = getSettings().getString("PREF_SAVE_PATH", Environment.getExternalStorageDirectory().toString());
152152
mSessionName = "dsploit-session-" + java.lang.System.currentTimeMillis();
153+
mKnownIssues = new KnownIssues();
153154
mTools = new ToolBox();
154155
mPlugins = new ArrayList<Plugin>();
155156
mOpenPorts = new SparseIntArray(3);
156-
mKnownIssues = new KnownIssues();
157157

158158
// if we are here, network initialization didn't throw any error, lock wifi
159159
WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);

cSploit/src/org/csploit/android/tools/Tool.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ public boolean isEnabled() {
6868
}
6969

7070
public void setEnabled() {
71-
if(ChildManager.handlers != null) {
72-
mEnabled = ChildManager.handlers.contains(mHandler);
73-
}
71+
mEnabled = ChildManager.handlers != null && ChildManager.handlers.contains(mHandler);
7472
}
7573
}

0 commit comments

Comments
 (0)