i8igmac Posted December 26, 2011 Share Posted December 26, 2011 (edited) Install irb on your droid. It's just a quick scanner I use for discovering services on my network... When I need to find my ftp server or rdp... No need to root your device... Example: nmap -p 135,139,445,5900,8080,80,21,22 192.168.1.1-255 require 'socket' Thread.start{ for ip in 1..255 for port in [135,139,445,5900,80,8080,21,22] Thread.start{ begin t = TCPSocket.open("192.168.1.#{ip.to_s}", port) rescue print "e" else t.close puts"" puts "#{ip}:#{port} open ports!!!" end} sleep 0.1 end end } Notes, if it crashes irb, set the sleep to 0.2 or higher. Your phone is limited on threads The ip address must look like this* "192.169.1.#{ip.to_s} " "192.168.#{ip.to_s}.1" "xxx.#{ip.to_s}.x.x" "#{ip.to_s}.66.66.66" You can add more ports, Edited December 26, 2011 by i8igmac Quote Link to comment Share on other sites More sharing options...
jaykruer Posted February 11, 2012 Share Posted February 11, 2012 Neat little script! Thanks for sharing it. It works great on my Thunderbolt running CM7. Install irb on your droid. It's just a quick scanner I use for discovering services on my network... When I need to find my ftp server or rdp... No need to root your device... Example: nmap -p 135,139,445,5900,8080,80,21,22 192.168.1.1-255 require 'socket' Thread.start{ for ip in 1..255 for port in [135,139,445,5900,80,8080,21,22] Thread.start{ begin t = TCPSocket.open("192.168.1.#{ip.to_s}", port) rescue print "e" else t.close puts"" puts "#{ip}:#{port} open ports!!!" end} sleep 0.1 end end } Notes, if it crashes irb, set the sleep to 0.2 or higher. Your phone is limited on threads The ip address must look like this* "192.169.1.#{ip.to_s} " "192.168.#{ip.to_s}.1" "xxx.#{ip.to_s}.x.x" "#{ip.to_s}.66.66.66" You can add more ports, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.