最近想写个东西:琢磨了一天(构思了一下)
向上效果图:目前才写mysql,架子差不多好了。
主要是设计用途是内网跨平台:虽然py的很简答,但是特定情况下需要依赖。Java打包后有java环境就能运行。
主要是的和谐是多线程模块:
ExecutorService:
public class ExecutorService {
private static ExecutorService es = null;
private Object returnCall = null;
private ExecutorService() {
}
public static ExecutorService newInstance() {
if (es == null) {
es = new ExecutorService();
}
return es;
}
public Future submit(final Callable call) {
final FutureTask future = new FutureTask();
Thread thread = new Thread(new Runnable() {
public void run() {
try {
returnCall = call.call();
future.set(returnCall);
} catch (Exception e) {
e.printStackTrace();
}
}
});
thread.start();
future.setExecuteThread(thread);
return future;
}
}
FutureTask类:
class FutureTask implements Future {
private Object returnObj = null;
private Thread executeThread = null;
public Object get() {
if (returnObj == null) {
try {
executeThread.join();
} catch (Exception e) {
e.printStackTrace();
}
}
return returnObj;
}
public void set(Object obj){
returnObj = obj;
}
/**
* @return the executeThread
*/
public Thread getExecuteThread() {
return executeThread;
}
/**
* @param executeThread the executeThread to set
*/
public void setExecuteThread(Thread executeThread) {
this.executeThread = executeThread;
}
}
核心执行调用:
ExecutorService es = ExecutorService.newInstance();
Callable task = new MyCallableClass();
Future future = es.submit(task);
//数据库连接
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException e) {
System.out.println("找不到驱动程序类 ,加载驱动失败!");
e.printStackTrace();
}
String url = "jdbc:mysql://" + ip + ":3306?useSSL=true";
String username = user;
String password = pass;
try {
DriverManager.setLoginTimeout(3);
if (DriverManager.getConnection(url, username, password) != null) {
return true;
}
return false;
} catch (SQLException se) {
if (se.getErrorCode() != 0) {
return false;
}
弱口令爆破测试:
具体的GUI的详细操作过程:
同时在运行完成后将数据写入成功.txt文件
过程中还是有一些问题:就是数据的转化和展示也查阅相关资料和请教java开发朋友。
预计后期迭代开发,目前先把初级demo完善和整理一下逻辑。还有就是解决mysql-ssl连接异常问题,考虑非SSL和需要SSL的处理。
注意:⚠️
免责声明:本站提供安全工具、程序(方法)可能带有攻击性,仅供安全研究与教学之用,风险自负!
如果本文内容侵权或者对贵公司业务或者其他有影响,请联系作者删除。
转载声明:著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
订阅查看更多复现文章、学习笔记
thelostworld
安全路上,与你并肩前行!!!!
个人知乎:https://www.zhihu.com/people/fu-wei-43-69/columns
个人简书:https://www.jianshu.com/u/bf0e38a8d400
个人CSDN:https://blog.csdn.net/qq_37602797/category_10169006.html
个人博客园:https://www.cnblogs.com/thelostworld/
FREEBUF主页:https://www.freebuf.com/author/thelostworld?type=article
语雀博客主页:https://www.yuque.com/thelostworld
欢迎关注公众号:
原文始发于微信公众号(thelostworld):Java thelostworld DBcrack开发(一)
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论