| r13 vs r14 | ||
|---|---|---|
| ... | ... | |
| 8 | 8 | |
| 9 | 9 | 신기하게 깃허브에는 DDOS 코드가 존재한다... |
| 10 | 10 | |
| 11 | * python | |
| 11 | 12 | {{{#!syntax python |
| 12 | 13 | import requests |
| 13 | 14 | |
| ... | ... | |
| 20 | 21 | print(a.text) |
| 21 | 22 | }}} |
| 22 | 23 | |
| 24 | * c# | |
| 23 | 25 | {{{#!syntax csharp |
| 24 | 26 | using System; |
| 25 | 27 | using System.Net.Http; |
| ... | ... | |
| 41 | 43 | } |
| 42 | 44 | } |
| 43 | 45 | } }}} |
| 46 | ||
| 47 | * cpp | |
| 44 | 48 | {{{#!syntax cpp |
| 45 | 49 | #include <iostream> |
| 46 | 50 | #include <string> |
| ... | ... | |
| 83 | 87 | } |
| 84 | 88 | }}} |
| 85 | 89 | |
| 90 | * ruby | |
| 86 | 91 | {{{#!syntax ruby |
| 87 | 92 | require 'net/http' |
| 88 | 93 | require 'uri' |
| ... | ... | |
| 99 | 104 | puts response |
| 100 | 105 | puts response.body |
| 101 | 106 | }}} |
| 107 | ||
| 108 | * java | |
| 109 | {{{#!syntax java | |
| 110 | import java.net.URI; | |
| 111 | import java.net.http.HttpClient; | |
| 112 | import java.net.http.HttpRequest; | |
| 113 | import java.net.http.HttpResponse; | |
| 114 | ||
| 115 | public class Main { | |
| 116 | public static void main(String[] args) throws Exception { | |
| 117 | String url = "https://www.google.com"; | |
| 118 | ||
| 119 | HttpClient client = HttpClient.newHttpClient(); | |
| 120 | ||
| 121 | HttpRequest request = HttpRequest.newBuilder() | |
| 122 | .uri(URI.create(url)) | |
| 123 | .POST(HttpRequest.BodyPublishers.noBody()) | |
| 124 | .build(); | |
| 125 | ||
| 126 | HttpResponse<String> response = | |
| 127 | client.send(request, HttpResponse.BodyHandlers.ofString()); | |
| 128 | ||
| 129 | System.out.println(response); | |
| 130 | System.out.println(response.body()); | |
| 131 | } | |
| 132 | } | |
| 133 | }}} | |
| 102 | 134 | == 범죄 == |
| 103 | 135 | 사이버 공격은 엄연한 범죄이다. |