最近想写个东西:琢磨了一天(构思了一下)
向上效果图:目前才写mysql,架子差不多好了。
主要是设计用途是内网跨平台:虽然py的很简答,但是特定情况下需要依赖。Java打包后有java环境就能运行。
主要是的和谐是多线程模块:
ExecutorService:
publicclassExecutorService{privatestaticExecutorService es =null;privateObject returnCall =null;privateExecutorService(){ }publicstaticExecutorServicenewInstance(){if(es ==null) {es =newExecutorService(); }returnes; }publicFuturesubmit(finalCallable call){finalFutureTask future =newFutureTask();Thread thread =newThread(newRunnable() {@Overridepublicvoidrun(){try{ returnCall = call.call(); future.set(returnCall);}catch(Exception e) { e.printStackTrace(); } } }); thread.start(); future.setExecuteThread(thread);returnfuture; }}
FutureTask类:
classFutureTaskimplementsFuture{ privateObject returnObj =null;privateThread executeThread =null;@OverridepublicObjectget(){if(returnObj ==null) {try{ executeThread.join();}catch(Exception e) { e.printStackTrace(); } }returnreturnObj; } publicvoidset(Object obj){ returnObj = obj; }/***@returnthe executeThread /publicThreadgetExecuteThread(){returnexecuteThread; }/**@paramexecuteThread the executeThread to set */publicvoidsetExecuteThread(Thread executeThread){this.executeThread = executeThread; }}
核心执行调用:
ExecutorService es = ExecutorService.newInstance();Callable task =newMyCallableClass();Future future = es.submit(task);//数据库连接try{Class.forName(“com.mysql.jdbc.Driver”);}catch(ClassNotFoundException e) {System.out.println(“找不到驱动程序类 ,加载驱动失败!”); e.printStackTrace();}Stringurl =“jdbc:mysql://”+ ip +":3306?useSSL=true";Stringusername = user;Stringpassword = pass;try{DriverManager.setLoginTimeout(3);if(DriverManager.getConnection(url, username, password) !=null) {returntrue; }returnfalse;}catch(SQLException se) {if(se.getErrorCode() !=0) {returnfalse; }
弱口令爆破测试:
具体的GUI的详细操作过程:
同时在运行完成后将数据写入成功.txt文件
过程中还是有一些问题:就是数据的转化和展示也查阅相关资料和请教java开发朋友。
预计后期迭代开发,目前先把初级demo完善和整理一下逻辑。还有就是解决mysql-ssl连接异常问题,考虑非SSL和需要SSL的处理。
参考:
https://blog.csdn.net/guanjungao/article/details/24873215
https://blog.csdn.net/FlyLikeButterfly/article/details/95362798
免责声明:本站提供安全工具、程序(方法)可能带有攻击性,仅供安全研究与教学之用,风险自负!
订阅查看更多复现文章、学习笔记
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://mp.weixin.qq.com/s/IcqBDhILA6b34GOfqzdSvw