admin管理员组文章数量:1570813
简介
闲来无事,手机的无限流量很卡,于是想偷隔壁的wifi,写此程序,仅供娱乐。
Git地址
https://github/FangCheng666/zn_wifi_crack.git
代码如下
1.cmd工具类
package com.znkeji.zn_wifi_carck.utils;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
/**
* Created with IntelliJ IDEA.
* User: fangcheng
* Date: 2019/3/24
* Time: 16:21
* Description: cmd 需要的工具类
*/
public class CmdUtils {
/**
* 该方法封装了执行cmd的方法
*
* @param cmd CMD命令
* @param filePath 需要在哪个目录下执行
*/
public static List<String> execute(String cmd, String filePath) {
Process process = null;
List<String> result = new ArrayList<String>();
try {
if (filePath != null) {
process = Runtime.getRuntime().exec(cmd, null, new File(filePath));
} else {
process = Runtime.getRuntime().exec(cmd);
}
BufferedReader bReader = new BufferedReader(new InputStreamReader(process.getInputStream(), "gbk"));
String line = null;
while ((line = bReader.readLine()) != null) {
result.add(line);
}
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
}
2.字符串工具类
package com.znkeji.zn_wifi_carck.utils;
/**
* Created with IntelliJ IDEA.
* User: fangcheng
* Date: 2019/3/24
* Time: 16:21
* Description:字符串工具类
*/
public class StringUtils {
/**
* 字符串转换成为16进制(无需Unicode编码)
* @param str
* @return
*/
public static String str2HexStr(String str) {
char[] cha
版权声明:本文标题:使用java破解wifi(win10环境) 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1727678982a1125229.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论