전체 글
-
우분투에서 서버 로그 확인하는 방법AWS, Infra/linux 2023. 12. 16. 17:29
우분투 서버에서 로그를 보기 위해 다양한 방법이 있습니다. 주로 /var/log 디렉토리에 위치한 여러 로그 파일들을 확인할 수 있습니다. 아래는 몇 가지 로그를 확인하는 방법입니다. 시스템 로그 확인 (/var/log/syslog): 시스템 관련 로그를 확인하려면 다음과 같이 사용할 수 있습니다. bashCopy code cat /var/log/syslog 커널 로그 확인 (/var/log/kern.log): 커널 관련 로그를 확인하려면 다음 명령어를 사용합니다. bashCopy code cat /var/log/kern.log 인증 로그 확인 (/var/log/auth.log): 사용자의 로그인 및 인증과 관련된 로그를 확인하려면 다음 명령어를 사용합니다. bashCopy code cat /var/lo..
-
[Spring] 스케줄러를 활용한 이메일 발송 서버 샘플 코드백엔드/Spring 2023. 11. 15. 02:21
개요 Spring Web에 포함되어 있는 Scheduler를 사용하여, 1분에 1번씩 큐를 발송하는 서비스를 만들었다. 사실 Kafka, RabbitMQ를 사용했으면 좋을 것 같지만,, Webflux를 활용한 MSA 구축이 우선이여서, 사용했다. JPA를 사용하였기에 DDL은 셋팅하면 알아서 올라간다. 추가적인 발송에 대한 로직은 service 패키지를 참고하면 된다. (로직과 메일 내용이 매우 단순하다) 발송 예시 가입완료 메일과 인증 메일이 전부이다. 추후 확장성 생각하면, 더 늘어날 수도 있지만 나도 현생이 바쁘다보니 까먹기 때문에 .. 공유할겸 올린다. 소스코드 가장 중요한 소스코드이다 ㅎㅎ https://github.com/rojae/smtp-mail-server/tree/1a551b580a7c..
-
[WarGame] Bandit, Level 14 → Level 15워게임 2023. 3. 19. 19:31
[WarGame] Bandit, Level 14 → Level 15 Problem localhost 30000에 어떻게 제출하라는거지 싶었는데,, 힌트에 nc(넷켓)이 있다. 너무 간단한거 아닌가..? Solving bandit14@bandit:~$ nc localhost 30000 fGrHPx402xGC7U7rXKDaxiWFTOiF0ENq Correct! jN2kgmIXJ6fShzhT2avhotn4Zcka6tnt 맞았다. Refer https://overthewire.org/wargames/bandit/bandit15.html
-
[WarGame] Bandit, Level 13 → Level 14워게임 2023. 3. 19. 19:31
[WarGame] Bandit, Level 13 → Level 14 Problem 실제 사내에서 운영 경험하면서, 방화벽 확인할때를 생각해보면 쉽다. su가 아니라 ssh localhost로 들어가면 땡 → sshkey를 이래서 보관 잘 해야하는 듯 했다. Solving bandit13@bandit:~$ ls -rtl total 4 -rw-r----- 1 bandit14 bandit13 1679 Feb 21 22:02 sshkey.private # 키파일 확인 bandit13@bandit:~$ cat sshkey.private -----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAKCAQEAxkkOE83W2cOT7IWhFc9aPaaQmQDdgzuXCv+ppZHa++buSkN+ .....
-
[WarGame] Bandit, Level 12 → Level 13워게임 2023. 3. 19. 19:31
[WarGame] Bandit, Level 12 → Level 13 Problem 반복 압축된 파일이, hexdump로 존재한다. xxd로 까면 되는데, 여러번 압축이 되어 있다고 한다. 압축 횟수가 10번이 넘어갈까..? for문으로 sh 짜야하는게 아닐지..? Solving hexdump 풀고, 파일 형식 조회하고 이름 바꾸고 압축 풀고 무한 반복을 했다. 아래 스크립트가 있으니, 참고하세요. (왜 이런 문제를 낸거야) bandit12@bandit:~$ cp data.txt /tmp/rojae bandit12@bandit:~$ cd /tmp/rojae bandit12@bandit:/tmp/rojae$ ls -rtl total 4 -rw-r----- 1 bandit12 bandit12 2573 Mar ..
-
[WarGame] Bandit, Level 11 → Level 12워게임 2023. 3. 19. 19:30
[WarGame] Bandit, Level 11 → Level 12 Problem a-z와 A-Z 문자가 13번 rotate 회전(이동) 되어있다. 아래 사이트 참고해서, rot 시킴 https://rot13.com/ A → N Z → M a → n z → m 알파벳 순서는 아래와 같으니 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 정규식으로 치면 아래와 같다고 할 수 있다. A-Za-z → N-ZA-Mn-za-m Solving bandit11@bandit:~$ cat data.txt | tr 'A-Za-z' 'N-ZA-Mn-za-m' The password is ..
-
[WarGame] Bandit, Level 10 → Level 11워게임 2023. 3. 19. 19:30
[WarGame] Bandit, Level 10 → Level 11 Problem base64 명령어는 써본 적이 있어서, 그냥 풀었다. Solving bandit10@bandit:~$ ls -rtl total 4 -rw-r----- 1 bandit11 bandit10 69 Feb 21 22:02 data.txt bandit10@bandit:~$ base64 --help Usage: base64 [OPTION]... [FILE] Base64 encode or decode FILE, or standard input, to standard output. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long optio..