20220215 º¹½À


URL(Uniform Resource Location)=µµ¸ÞÀÎ

ÇÁ·ÎÅäÄÝ   http
È£½ºÆ®¸í   jslweb.izerone.co.kr
Æ÷Æ®¹øÈ£   :80
°æ·Î¸í   /exam/
ÆÄÀϸí
Äõ¸®
ÂüÁ¶

(3°èÃþ)  ip  +  (4°èÃþ)  Æ÷Æ®  =  ¼ÒÄÏ

Æ÷Æ®¹øÈ£ (0¹ø ~ 65535¹ø)
well known port
¼­ºñ½º

21:   FTP
22:   SSH
23:   Telnet
25:   SMTP
53:   DMS
80:   HTTP
110:   pop
143:   imap
443:   https
1521:   oracle
3306:   mysql
5900:   vnc

¼­ºê³Ý ¸¶½ºÅ© 255 ¼ýÀÚ°¡ Ŭ¼ö·Ï ¼­¹ö Å©±â ÀÛ¾ÆÁü.
(¼­ºê³×ÆÃ)



getAuthority(), getPort(), getPath()

String[] Attack=new String[]{"jslweb.izerone.co.kr",
    "woosuk.izerone.co.kr","virtual.izerone.co.kr",
    "daum.net","naver.com","google.com","gyoon.co.kr"};
    String[] urlArr = new String[]{"http://jslweb.izerone.co.kr:80/exam/java1.jsp?id=1#index1",
    "http://jslweb.izerone.co.kr"};

    InetAddress ip = null;
    InetAddress[] ipArr = null;

    URL url = new URL("http://jslweb.izerone.co.kr:80/exam/java1.jsp?id=1#index1");
       //M1 :80/index.jsp :80/study/0215.html
       //M2 :80/StudyServlet?cm=list
       //Spring :80/study/list
    System.out.println("³×Æ®¿öÅ© ÇÁ·Î±×·¥");
    System.out.println(url.getAuthority());
    System.out.println(url.getPort());
    System.out.println(url.getPath());


InetAddress.getByName(), getHostAddress()


    for (int i=0;i<Attack.length ;i++ )
    {
        ip = InetAddress.getByName(Attack[i]);
        System.out.println(Attack[i]+"ÀÇ ÁÖ¼Ò: ");
        System.out.println(ip.getHostAddress());
        System.out.println("-------------------");
    }