带有mySQL注入的JAVA防火墙 [英] JAVA Firewall with mySQL injection

查看:67
本文介绍了带有mySQL注入的JAVA防火墙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名自由职业者,正在防火墙上做一个项目.我已经完成了有关如何扫描端口的任务,现在我需要阻止端口,ServerSocket是否有可用的方法来阻止端口.

谢谢.

I am working as a free lancer and doing a project on firewall. I have done my task on how to scan a port, now i need to block a port, Are there any methods available from ServerSocket to block a port.

Thankyou.

推荐答案

要阻止端口,请打开它并拒绝任何连接.
To block a port, open it and refuse any connections.


找到了解决方案,正确的解决方案是:
不是这样的:
Found the solution, The correct solution is:
Not this:
Socket ServerSok = new Socket(String host,int port);
ServerSok.close();



但这是:



But this:

ServerSocket socket = new ServerSocket(1066);
while (true) {
    Socket connection = socket.accept();
    connection.close();
}


这篇关于带有mySQL注入的JAVA防火墙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆