双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

菜鸟!求解!

TKD03072010 TKD03072010 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
这是在论坛里看到大虾写的代码 特感兴趣的 可是我怎么运行不了 会出错!是代码问题 还是我运行的问题!!求大家帮帮忙!!
package net.iegames;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;

public class BanSupport extends JFrame {
private String keyWord;
private JLabel msg;

public BanSupport(String keyWord) {
super("想禁谁,就可以禁谁");
this.setBounds(200, 200, 500, 200);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

msg=new JLabel("所谓监控用户硬盘,只是个笑话.根本就是公开的API。360是SB ");
this.getContentPane().add(msg);

this.keyWord = keyWord.toLowerCase();
this.check();
}

public void check() {
Runtime runtime = Runtime.getRuntime();
Process process = null;
try {
process = runtime.exec("cmd /c Tasklist");

BufferedReader in = new BufferedReader(new InputStreamReader(
process.getInputStream()));
String s = "";
while ((s = in.readLine()) != null) {
s = s.toLowerCase();
if (s.startsWith(keyWord)) {
s = s.substring(0, s.indexOf(".exe") + 4);
JOptionPane.showMessageDialog(this, "您的系统中检测到"+s+",为了保障您的安全,本软件即将退出。请卸载后再使用本检测软件。");
System.exit(-1);
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
}





package net.iegames;
public class Ban360 extends BanSupport {
public Ban360() {
super("360");//这里可以换成QQ
}

public static void main(String[] args) {
Ban360 demo = new Ban360();
demo.setVisible(true);
}
}

...全文

相关推荐

评论 16
收藏 已收藏
分享
返回顶部
TKD03072010
Java SE 62,621 成员 307,251 内容