일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- lord of sql injection
- 쿠키
- sql injection point
- 모의해킹
- JWT
- lord of sqli
- cors
- Reflected Xss
- Python
- css
- MySQL
- 세션
- cookie 탈취
- blind sql injection
- union sql injection
- 로그인페이지
- Los
- XSS
- 게시판 만들기
- 과제
- sql injection
- Cross Site Request Forgery
- JS
- php
- Error based sql injection
- csrf
- 로그인
- 웹개발
- CTF
- file upload
- Today
- Total
목록모의해킹/웹 개발 (25)
Almon Dev

게시글 이미지 추가게시글을 입력할 때 글 내부에 이미지를 추가할 수 있는 기능입니다. 사진 추가 UI 만들기 // 이미지 업로드 const uploadContainer = document.createElement('div'); uploadContainer.classList.add('upload-container'); const imgInput = document.createElement('input'); imgInput.classList.add('upload-btn'); imgInput.setAttribute('type', 'file'); imgInput.setAttribute('accept', '.jpg, .jpeg, .png, .gif'); imgInput.addEventListener..

게시글 검색 기능검색어를 입력하면 서버에서 search 쿠키에 검색어를 저장한 뒤에 게시글을 불러올 때 조건문에 포함시킵니다. 쿠키 관리하는 함수 JS에는 setCookie 같은 함수가 따로 없고 document.cookie에 직접 접근해서 설정을 해야 합니다.function setCookie(name, value) { let date = new Date(); date.setTime(date.getTime() + 60 * 60 * 24); document.cookie = name + '=' + encodeURIComponent(value) + '; expires=' + date.toUTCString() + ';path=/forum/';}쿠키의 이름과 값을 입력받아서 ..

추가한 기능 아이디 찾기이름과 이메일을 이용해 아이디를 찾는 기능입니다. forget_id.phpnum_rows == 1) { $id = $result->fetch_array()['user_id']; $find_message = "아이디를 찾았습니다.ID : $id"; }else { $find_message = "아이디를 찾지 못했습니다."; }}?> Almond 아이디 찾기 아이디 찾기 if(isset($_POST['n..
게시판 만들기 게시글 삭제하기 delete_post.jsfunction deletePost(e, postId, categoryId, categoryName) { e.preventDefault(); if (confirm('게시글을 삭제하시겠습니까?')) { url = '/forum/db/delete_post.php'; fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json; charset=utf-8', }, body: JSON.stringify({ post_id: postId, category_id: categoryId, }), ..
게시판 만들기 게시글 수정하기 read_post.js const updateBtn = document.createElement('a'); updateBtn.textContent = '수정'; updateBtn.setAttribute( 'onclick', `updatePost(${categoryId}, '${post.title}', ${JSON.stringify( post.content )}, ${post.post_id})` ); update_post.jsfunction updatePost(categoryId, postTitleTe..
게시판 만들기 게시글 읽기 read_post.jsfunction readPost() { document.querySelectorAll('.td-title').forEach((tdTitle) => { tdTitle.addEventListener('click', (e) => { const post_id = e.target .closest('tr') .querySelector('.td-id').textContent; console.log(post_id); const pageNum = e.target.dataset.page_num; console.log(pageNum); const categoryId = e.target.dataset...
게시판 만들기 게시글 목록 category.jsconst categories = document.querySelectorAll('.category');categories.forEach((category) => { category.addEventListener('click', (e) => { const categoryId = e.target.getAttribute('data-category-id'); const categoryName = e.target.textContent; postList(categoryId, categoryName, 1); });});category 클래스를 가지고 있는 버튼을 누르면 카테고리 아이디와 카테고리 이름을 가지고 postList함수를 실행합니다. pos..

게시판 만들기 게시글 작성기능DB생성포스트를 저장할 posts 테이블을 생성합니다.create table posts ( post_id int auto_increment primary key, title varchar(100) not null, content text not null, writer_id int not null, created_at timestamp DEFAULT CURRENT_TIMESTAMP, updated_at timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, category_id int not null, views int not null DEFAULT 0, FOREIGN ..