Give my first (free) Android Play Store app a try: Subnet Scanner

biometrics

Honorary Master
Joined
Aug 7, 2003
Messages
71,856
Reaction score
2,239
I wanted to go through the motions to learn what is involved in creating a free app, creating a Play Store account, submitting the apk/description/screenshots/updates, adding admob to the app and making it phone, tablet, resolution and Android version independent.

So I picked a quick and easy app to write. Took me two days all in all.

It's nothing special but it's still a handy utility to check the security of your network.

Please give it a go and let me know if it runs on your device.

I tested it with:

Samsung Note 2 GT-N7100 (Android 4.3) [note the issue with this later on]
Google Nexus 7 2013 K008 (Android 4.4)
Samsung Galaxy Tab 7.0 Plus GT-P6200 (Android 3.2)
Samsung Galaxy Tab 10.1 GT-P7510 (Android 3.2)

Description:

Subnet and Port Scanner:

Automatically detect your wifi subnet.

Ping each subnet IP address from 0 to 255.

For each IP that is pingable scan for the following open ports:

Port 21: FTP
Port 22: SSH
Port 23: Telnet
Port 25: SMTP
Port 80: HTTP
Port 110: POP3
Port 119: NNTP
Port 143: IMAP
Port 443: HTTPS
Port 445: MS DS
Port 5000: UPnP

Results are displayed in real time in a user friendly grid.

If ping is available the fast scan is used. If ping is unavailable (e.g. Samsung Note 2 with Android 4.3) then the slower full port scan will be used.

Samsung Note 2
View attachment 89930

Google Nexus 7
View attachment 89932

Play Store: Subnet Scanner

Logo:
View attachment 89936
View attachment 89934

Next version:
- Currently it scans in series, the next version will do it in parallel making it substantially faster.
- Cancel button takes a few seconds to respond before stopping. Need to fix that.
 
Last edited:
I tried my app on the local pubs wifi. It found more open ports than the popular Ping Tools. It found an open Telnet port on the router. I downloaded a Telnet client over their wifi. Connected and the router happily identified it's model. A quick Google search gave me the default login for that model. Worked. Full control of said router. Another search gave me detailed command options. Logged off. Test completed, yip scary.

So it's worth checking your network ...
 
OK some feedback, running on Android 4.3 on my SGS4:

  1. You should put a start button. I don't like that it starts scanning as soon as the app is launched.
  2. The app insists on running in landscape mode only. If possible, add support for portrait mode.
  3. It seems to be scanning ports on every IP address, not just those that are pingable. This is in conflict with what you stated above, though you will find IP addresses that don't respond to ICMP ping requests, but do have open ports.
  4. The scan is very slow. You need to create a multi-threaded version that will do X number of scans simultaneously. Allow X to be user-configurable.
  5. Perhaps also set a shorter timeout for scanning each port. It seems to take a lot longer than is necessary. You might want to make the timeout user-configurable.
  6. Would be cool if you could scan for NetBIOS names at the same time, and put them next to the IP address.

Otherwise so far so good. Well done on your first app. What was your motivation?

I've been wanting to write an Android app for very long now, but just cant get down to it.
 
OK some feedback, running on Android 4.3 on my SGS4:

  1. You should put a start button. I don't like that it starts scanning as soon as the app is launched.
  2. The app insists on running in landscape mode only. If possible, add support for portrait mode.
  3. It seems to be scanning ports on every IP address, not just those that are pingable. This is in conflict with what you stated above, though you will find IP addresses that don't respond to ICMP ping requests, but do have open ports.
  4. The scan is very slow. You need to create a multi-threaded version that will do X number of scans simultaneously. Allow X to be user-configurable.
  5. Perhaps also set a shorter timeout for scanning each port. It seems to take a lot longer than is necessary. You might want to make the timeout user-configurable.
  6. Would be cool if you could scan for NetBIOS names at the same time, and put them next to the IP address.

Otherwise so far so good. Well done on your first app. What was your motivation?

I've been wanting to write an Android app for very long now, but just cant get down to it.

All good points, thanks. Give me a day or two ...

I wanted to see what is involved in publishing in the Play Store so I picked something I could do quickly.

Ping does not work on my Samsung Note 2 with Android 4.3. All other versions seem ok so far. If I can't ping I scan all IP's and that's slow. There is a brief popup at the beginning indicating this.
 
Last edited:
gotta try subnet scanner...

])ragon_\/oid;11794858 said:
Tried, crashed. Tried again, not bad actually.

What happened? Screenshot? Which device and Android version?

])ragon_\/oid;11794892 said:
Nexus 7 with Android V4.4.2 - Think it was when I pressed the stop button (which doesn't work) after my WiFi dropped.

The stop button takes a few seconds. It was mentioned at the end of my post that I need to fix that ...

Did it work the 2nd time around?

])ragon_\/oid;11794958 said:
Yes, worked like a charm the second time around. Not bad actually. Great work! Keep it up!

Something to do during the holiday ...
 
Installed Galaxy S2, Android 4.1.2

Screen cut off halfway through 443 column and the fifth row.
Green tick and red X mean nothing to me. Was red X scanned and open? Was green scanned and secure?

Edit: looks interesting and useful, but need clarification on results.
 
Last edited:
Diving into it properly now (Not to scare you off!), I found a few issues the 3rd and 4th time around:

1. The back button doesn't seem to work (Physical Android back button) - Eventually pops up the "not responding" dialog.
2. I did a reboot of the device, and it seems to be broken all of a sudden. It just doesn't ping. It hangs on "Ping 10.0.0.0 ..."
3. After installing it doesn't seem to pick up your subnet immediately (Have to close application in order for it to pick up the Subnet)

When it worked, it was rather nice actually. Well done on publishing your first application!
 
I tried my app on the local pubs wifi. It found more open ports than the popular Ping Tools. It found an open Telnet port on the router. I downloaded a Telnet client over their wifi. Connected and the router happily identified it's model. A quick Google search gave me the default login for that model. Worked. Full control of said router. Another search gave me detailed command options. Logged off. Test completed, yip scary.

So it's worth checking your network ...

Holy crap thats insane :eek:
 
Native app correct? What resources did you use for learning? Default Google help or something else? Been looking for something a bit more helpful haha
 
Thanks guys. I'll work on all the feedback. Changes from v4 to v5 for today below (too hot and sober to go on). Takes the Play Store an hour or two to publish it.

The one problem I have that I can't solve at the moment is that Android does not have a reliable method of ICMP pings (isReachable() does not work). You'll see there is no solution on e.g. StackOverflow. You have to shell to the ping binary and capture it's result. The tool I'm currently usings shell command is blocking/synchronise - that's why the cancel button is not responsive immediately (and in fact may hang on occation).

Version 5:

- Prompts user on startup to confirm that a scan must be started.
- Can rotate device during scan. Devices less then 6 inches are locked to landscape.
- Can pause and resume app.
- If ping is unavailable this status is displayed after the scanning IP address.
- All 11 ports are connected to in parallel. 10x speed improvement.

To Do:

- Non blocking (asynchronise) ping.
- Reponsive cancel button (and back).
- Displays smaller than 5".
- Reliable sub net detection.
- Retrieve device name.
- Variable timeouts.
- Legend (green tick means the app could connect = bad, red x means could not connect = good ... I see the problem here ;) )
- More ...
 
Last edited:
May have to drop the ping. Sure it's nice seeing all your devices even if ports aren't open but it causes issues and aren't supported on all devices e.g. Samsungs with Android 4.3.

Removing it will make it fast, reliable and responsive but will only list devices with open ports, which I guess is the ultimate goal.

Mmm ...
 
Last edited:
Native app correct? What resources did you use for learning? Default Google help or something else? Been looking for something a bit more helpful haha

It compiles to native code. The development tools web site/documentation/samples/forum, StackOverflow ... also helps being chucked into the deep end (three years ago - private apps). There are many tools, frameworks and languages available now - pick what suits you.
 
Last edited:
Ooohhh I think I may have a sneaky solution ... an implied ping.

I notice when I make a connection to an IP with no device it takes the timeout to complete. But if there is a device the connection is refused very quickly. So by measuring the time between my first connection request and the last denial and comparing it to my timeout I can conclude there is a device there ...
 
What's supposed to happen? All I get is this after saying okay to start scan at x.x.x.x

Nexus 4 4.4

uploadfromtaptalk1387995911576.jpg
 
Ooohhh I think I may have a sneaky solution ... an implied ping.

I notice when I make a connection to an IP with no device it takes the timeout to complete. But if there is a device the connection is refused very quickly. So by measuring the time between my first connection request and the last denial and comparing it to my timeout I can conclude there is a device there ...

Hey hey hey, this actually works brilliantly. No wonder the NSA loves metadata ... new version 6 incoming ...
 
Top
Sign up to the MyBroadband newsletter
X