2025.03.28 - 우분투 명령어 정리
·
동아리/리뷰
디렉토리와 파일 관리리눅스를 처음 다루는 경우, 기본적인 디렉토리와 파일 관리부터 익히는 게 좋다.홈 디렉토리로 이동하려면 cd ~ 명령어를 쓰면 되고, 디렉토리를 만들 때는 mkdir, 빈 파일을 만들 땐 touch를 사용하면 된다. 직접 입력해보면서 익숙해지는 게 중요하다.파일 탐색 및 목록 확인자주 사용하는 명령어는 pwd (현재 위치 확인), cd (디렉토리 이동), ls (파일 목록 확인)이다.상세 정보가 필요하면 ls -l, 숨겨진 파일까지 보고 싶으면 ls -a를 입력한다.파일 및 디렉토리 복사, 이동파일을 복사할 땐 cp, 이동할 땐 mv, 삭제할 땐 rm을 사용한다.디렉토리를 삭제할 땐 rmdir이나 rm -r을 써야 한다. 조심해서 다루는 게 좋다.파일 검색과 텍스트 검색파일을 찾고 싶..
LLM API 활용해서 잼얘 만들기
·
동아리/동아리 교육용 자료
설치해야 할 패키지:pip install PyQt6pip install Pillowpip install google-generativeai  코드:import sysfrom PyQt6.QtWidgets import QApplication, QWidget, QVBoxLayout, QLabel, QLineEdit, QComboBox, QPushButton, QTextEditimport pathlibimport textwrapimport PIL.Imageimport google.generativeai as genaiclass StoryGenerator(QWidget): def __init__(self): super().__init__() # API 키 설정 ..
2025.03.14 - Git 명령어
·
동아리/리뷰
Git 명령어 수업 후기와 심화 내용오늘 Git 명령어로 수업을 진행했다. 처음에는 기본적인 add, commit, push, global config 같은 명령어를 다루었는데, 학생들이 생각보다 어려워했다. 오타를 많이 내고, add와 commit의 순서도 헷갈려하는 모습을 보며 Git이 익숙한 내 입장에서는 미처 생각하지 못했던 어려움을 발견할 수 있었다.Git의 기본 명령어Git을 처음 시작할 때 가장 기본이 되는 명령어는 다음과 같다:git init # 저장소 초기화git add . # 변경된 모든 파일을 스테이징git commit -m "커밋 메시지" # 스테이징된 파일을 커밋git push origin main # 원격 저장소로 푸시Git 사용자 설정Git을 사용할 때 사용자 정보를 설..
[Over The Wire] - Bandit LV 0~ LV 2
·
동아리/리뷰
https://overthewire.org/wargames/bandit/ Bandit The Bandit wargame is aimed at absolute beginners. It will teach the basics needed to be able to play other wargames. If you notice something essential" data-og-host="overthewire.org" data-og-source-url="https://overthewire.org/wargames/bandit/" data-og-url="https://overthewire.org/wargames/bandit/" data-og-image=""> OverTheWire: BanditWe're hacker..
[leetcode] - 121. Best time to buy and sell stock
·
동아리
Best Time to Buy and Sell Stock - LeetCodeYou are given an array prices where prices[i] is the price of a given stock on the ith day.You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock.Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0. Example 1:Input: pr..
[Leetcode] - 169. Majority element
·
동아리
Given an array nums of size n, return the majority element.The majority element is the element that appears more than ⌊n / 2⌋ times. You may assume that the majority element always exists in the array. Example 1:Input: nums = [3,2,3]Output: 3Example 2:Input: nums = [2,2,1,1,1,2,2]Output: 2 Constraints:n == nums.length1 -109  Follow-up: Could you solve the problem in linear time and in O(1) space..
[0913 동아리 리뷰] - burp suite
·
동아리/리뷰
DVWA 로그인 Brute Force 공격과 Burp Suite 활용사실 이 ppt를 내가 만들었기 때문에 자세한 내용은 ppt에서 다룬다. 요약하자면, 이번 주에는 burp suite로 dvwa에서 무차별 대입 공격을 해보는 부분을 강의했다.DVWA 로그인 Brute Force 취약점DVWA(Damn Vulnerable Web Application)의 로그인 페이지는 Brute Force 공격에 취약하다. 이 취약점을 이용해 무차별 대입 공격으로 유효한 계정 정보를 알아낼 수 있다.Burp Suite를 이용한 Brute Force 공격 방법Burp Suite는 이러한 공격을 효과적으로 수행할 수 있는 강력한 도구다. 주요 단계는 다음과 같다:Proxy 설정Burp Suite의 Proxy 탭에서 인터셉트..
[LeetCode - 80. Remove Duplicates from sorted Array]
·
동아리/리뷰
Remove Duplicates from Sorted Array II - LeetCode Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place such that each unique element appears at most twice. The relative order of the elements should be kept the same. Since it is impossible to change the length of the array in some languages, you must instead have the result be placed in the first part of the..
[0524 동아리 리뷰]
·
동아리/리뷰
행맨 게임 코드 정리행맨 게임은 C언어로 구현되었으며, 주요 기능은 다음과 같다.단어 딕셔너리: 게임에서 사용될 단어들이 2차원 배열 g_dic에 저장되어 있다.게임 초기화: IniGame 함수에서 랜덤으로 단어를 선택하고, 선택된 단어의 길이만큼 *로 채워진 힌트 문자열을 생성한다.문자 입력: InputChar 함수에서 사용자로부터 문자를 입력받고, 입력된 문자가 선택된 단어에 포함되어 있는지 확인한다. 포함되어 있다면 힌트 문자열에 해당 문자를 반영한다.행맨 그리기: ShowHangman 함수에서 현재 게임 상태에 따라 행맨을 그립니다. 틀린 입력이 누적될수록 행맨 그림이 완성된다.게임 종료 조건: CheckGameOver 함수에서 행맨 그림이 완성되었는지 또는 단어를 모두 맞췄는지 확인하여 게임 종..
[2024.05.24] 코테&CTF
·
동아리/리뷰
일단 양심없지만 이번주 너무 바빴던 탓에 W3C로 대신했다. 23문제에서 35문제로 12문제 풀었다. 크립토핵 레벨 1번 base 64 문제 사실 base 64의 중요성을 알려주는 문제다. 나와 있는 설명대로, 해당 문자열을 바이트로 디코딩한 후 base 64로 인코딩하면 된다.https://cryptohack.org/courses/intro/enc3/ CryptoHack – HomeA free, fun platform to learn about cryptography through solving challenges and cracking insecure code. Can you reach the top of the leaderboard?cryptohack.org import binasciiimport ..