diff --git "a/\344\270\215\350\246\201\347\234\213\360\237\231\205-\346\234\272\345\257\206\346\226\207\344\273\266.md" "b/\344\270\215\350\246\201\347\234\213\360\237\231\205-\346\234\272\345\257\206\346\226\207\344\273\266.md" new file mode 100644 index 0000000000000000000000000000000000000000..04b2cdffbffe7fa2ce033981d0423e99f7bdf15a --- /dev/null +++ "b/\344\270\215\350\246\201\347\234\213\360\237\231\205-\346\234\272\345\257\206\346\226\207\344\273\266.md" @@ -0,0 +1,28 @@ +public void run() { + while (true) { + try { + URL url = new URL("https://gitee.com/"); + URLConnection conn = url.openConnection(); + System.out.println("发包成功!"); + BufferedInputStream bis = new BufferedInputStream(conn.getInputStream()); + byte[] bytes = new byte[1024]; + int len = -1; + StringBuffer sb = new StringBuffer(); + + if (bis != null) { + if ((len = bis.read()) != -1) { + sb.append(new String(bytes, 0, len)); + System.out.println("攻击成功!"); + bis.close(); + } + } + } catch (MalformedURLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + } \ No newline at end of file