Skip to content

Commit 9b36514

Browse files
committed
nmap is not available until we connect to the core.
make network-radar trigger a scan of the current hosts when it startup.
1 parent 098a6cb commit 9b36514

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,15 @@ public static void reset() {
943943
mTargets.add(gateway);
944944
mTargets.add(device);
945945

946+
scanThemAll();
947+
}
948+
}
949+
950+
public static void scanThemAll() {
951+
if(!mCoreInitialized) {
952+
return;
953+
}
954+
synchronized (mTargets) {
946955
for(Target t : mTargets) {
947956
Services.getNetworkRadar().onNewTargetFound(t);
948957
}

cSploit/src/org/csploit/android/services/NetworkRadar.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ public void onNewTargetFound(final Target target) {
7272
if(target.getType() == Target.Type.NETWORK)
7373
return;
7474

75+
if(!System.isCoreInitialized()) {
76+
return;
77+
}
78+
7579
ThreadHelper.getSharedExecutor().execute(new Runnable() {
7680
@Override
7781
public void run() {
@@ -143,6 +147,7 @@ public void onHostLost(InetAddress ipAddress) {
143147
@Override
144148
public void onStart(String cmd) {
145149
sendIntent(NRDR_STARTED);
150+
System.scanThemAll();
146151
}
147152

148153
public void onEnd(int exitValue) {

0 commit comments

Comments
 (0)