분류 전체보기 (337) 썸네일형 리스트형 [Study] Interceptor와 Servletfilter Date: 2021년 12월 8일 Status: Completed Task: Develop Spring MVC Request LIFE CYCLE Refer to: https://justforchangesake.wordpress.com/2014/05/07/spring-mvc-request-life-cycle/ Interceptor 언제 사용하나? 특정 EndPoint에 로그인 된 사용자가 접근 시 특정 EndPoint에 접근 시 권한에 따라 접근 처리를 다르게 줄 때 등등 목적 특정 URL 진입 시 어떤 작업을 수행해야 할 때 Tech Servlet Filter, Interceptor, AOP 등등이 있음 Interceptor와 ServletFilter의 차이점 Servlet Filter Dispatche.. [JWT] SpringBoot에서 JWT 발급과 검증처리 JWT 발급과 검증 JWT를 발급 가능 유효하지 않은 JWT에 대한 Request 요청 거부 각각의 API에서 처리하지 말고 DispatcherServlet 레벨에서 헤더를 검증해 처리해보기 Source: https://github.com/jak010/SpringBootWithJava/tree/study/authenticate Dependency # budle.gradle implementation 'io.jsonwebtoken:jjwt-api:0.11.2' runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.2', // Uncomment the next line if you want to use RSASSA-PSS (PS256, PS384, PS512) algorithms: .. [JPA] JpaRepository를 통해 Pagination 처리하기 Date: 2021년 12월 7일 Status: Completed Task: Develop 주의 Entitiy 정의는 본 주제에서 벗어나므로 다루지 않을 것 Test DB: MySQL Employees Layer Controller End Point Service Repository에 의존 Repository JpaRepository에 의존 Entity employees DB와 연결된 테이블의 Entity Package import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; 삽질하다가 다른 패키지의 Pageable을 사용했다 헷갈리지 말고 위의 Pageable 객체를 사용하도록 하자 Contr.. [TryHackMe] IDE Scanning 해당 Machine은 Nmap 기본 옵션으로 Scan 했을 때 공략 가능한 Port을 찾지 못했다. 모든 Port를 Scan해봐야 할 것 같은데 그러려면 시간이 오래걸리기 떄문에 RustScan을 이용해보기로 했다. 물론 Nmap을 이용해도 탐지가 가능하긴 하다 ftp, ssh, http 그리고 62337 포트가 열려있다. 하나씩 접근해보자. FTP Enumeration FTP 부터 살펴보자 anonymous 접근에 대한 제한이 걸려있지 않기 때문에 anonymous 계정으로 접속해 힌트가 될만한 파일이 있는지 살폈을 때 파일 이름이 '-'인 파일이 있다. 무슨 파일인지 식별은 되지 않았는데 파일 실행 결과가 이상한 걸 보니 text를 포함하고 있는 파일이지 않을까 유추할 수 있었다. 확.. [LeetCode] Two Sum Description Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. input 값으로 아래와 같이 list와 target이 주어진다. Input: nums = [2,7,11,15], target = 9 output으로는 list에서 두 개의 원소를 뽑아서 더했을 때 targe.. [Leet Code] longest-palindromic-substring Given a string s, return the longest palindromic substring in s. Solve 입력값이 다음과 같을 때 "babad" 출력 예시는 다음과 같다. "bab" 주어진 문자열에서 가장 긴 팰린드롬의 부분 문자열을 출력하는 문제이다. 필자는 특출 난 알고리즘 기법을 아는 것이 아니기 때문에 무지성으로 정말 모든 부분 문자열을 구한 후 이를 List에 저장하고 가장 긴 문자열을 뽑아내는 방식으로 풀었다. # 필자가 푼 방식 class Solution: def longestPalindrome(self, s: str) -> str: length = len(s) result = [] if s == s[::-1]: return s for x in range(length):.. [Leet Code] Group Anagrams Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. Anagram 문자의 위치를 바꿨을 때 다른 뜻을 가진 단어로 바꾸는 것을 의미한다. Solve 입력값으로 문자열을 담은 배열이 주어진다. Input: strs = ["eat","tea","tan","ate","nat","bat"] 입력값 중에 Anagram이 .. [Vulnhub] DeathNote Description Level - easy don't waste too much time thinking outside the box . It is a Straight forward box . This works better with VirtualBox rather than VMware Scan open Port $ sudo nmap -sC -sV 192.168.0.10 Domain Name Resolve $ curl 192.168.0.10 Please wait..... $ vim /etc/hosts 127.0.0.1localhost 127.0.1.1kali 192.168.0.10deathnote.vuln # append # The following lines are desirable for IPv6 .. 이전 1 ··· 27 28 29 30 31 32 33 ··· 43 다음