永发信息网

有没有在Android上的IP口的工具,例如从123.123.0.0---123.123.0.25

答案:3  悬赏:10  手机版
解决时间 2021-02-18 15:01
  • 提问者网友:伴风望海
  • 2021-02-18 08:28
有没有在Android上的IP口的工具,例如从123.123.0.0---123.123.0.255上扫描开23端口的?
最佳答案
  • 五星知识达人网友:鸠书
  • 2021-02-18 09:47
自己写个app运行下。这里是Java端口扫描代码,扫描本地127.0.0.1端口8000到8010,你修改下就行了:

public static Future portIsOpen(final ExecutorService es, final String ip, final int port, final int timeout) {
return es.submit(new Callable() {
@Override public Boolean call() {
try {
Socket socket = new Socket();
System. out.println("ip = " + ip + ", port = " + port);
socket.connect( new InetSocketAddress(ip, port), timeout);
socket.close();
return true ;
} catch (Exception ex) {
return false ;
}
}
});
}
final ExecutorService es = Executors.newFixedThreadPool (20);
final String ip = "127.0.0.1" ;
final int timeout = 200;
final List> futures = new ArrayList<>();
for (int port = 8000; port <= 8010; port++) {
futures.add( portIsOpen(es, ip, port, timeout));
}
es.shutdown();
System. out.println("es shutdown" );
int openPorts = 0;
for (final Future f : futures) {
if (f.get()) {
openPorts++;
}
}
System. out.println(“There are " + openPorts + " open ports on host " + ip + " (probed with a timeout of " + timeout + "ms)");
全部回答
  • 1楼网友:迟山
  • 2021-02-18 12:10
你要的是这个么? 192.168.1.1 再看看别人怎么说的。
  • 2楼网友:傲气稳了全场
  • 2021-02-18 11:17
你需要的是类似nmap的工具吧? 好像有nmap for android,手机上nmap的没用过。电脑上的到是蛮好用的。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯