DINGA DINGA
article thumbnail
[Challenge(OId)] old-29 (40)
WEB/Webhacking.kr 2021. 11. 5. 18:32

https://webhacking.kr/challenge/web-14/ Challenge 29 -------------------------------------------------------------- webhacking.kr 메인 페이지는 위와 같다. 플래그는 다른 테이블에 있다고 한다. 임의의 php 파일을 업로드해보았다. 이렇게 정상적으로 업로드가 되는 것을 볼 수 있다. 이번에는 아무 파일도 선택하지 않은 채로 제출 버튼을 누르고 Burp suite로 잡아보았다. 위와 같이 업로드 형식을 확인했다. 우선 웹페이지와 위의 결과를 토대로 유추해보자면 테이블에는 time, ip, filename이 존재할 것이고, insert into [테이블명] values ('time', 'ip', 'filen..

article thumbnail
[HackerRank] Designer PDF Viewer
C & C++/HackerRank 2021. 11. 5. 17:49

https://www.hackerrank.com/challenges/designer-pdf-viewer/problem Designer PDF Viewer | HackerRank Help finding selection area in PDF Viewer. www.hackerrank.com Algorithms > Implementation 알파벳의 높이가 저장된 배열과 단어가 주어지면 (단어에 포함된 알파벳의 최고 높이) * (단어 길이)를 반환한다. 코드 int designerPdfViewer(int h_count, int* h, char* word) { int max = 0; int word_count = strlen(word); for (int i = 0; i < word_count; i++) { if..

article thumbnail
[HackerRank] Correctness and the Loop Invariant
C & C++/HackerRank 2021. 11. 5. 17:27

https://www.hackerrank.com/challenges/correctness-invariant/problem Correctness and the Loop Invariant | HackerRank How do you demonstrate the correctness of an algorithm? You can use the loop invariant. www.hackerrank.com Algorithms > Sorting 배열을 정렬하는 함수의 잘못된 코드가 주어지면 올바르게 동작하도록 수정한다. 코드 void insertionSort(int N, int arr[]) { int i,j; int value; for(i=1;i=0 && value

article thumbnail
[HackerRank] Birthday Cake Candles
C & C++/HackerRank 2021. 10. 9. 17:58

https://www.hackerrank.com/challenges/birthday-cake-candles/problem Birthday Cake Candles | HackerRank Determine the number of candles that are blown out. www.hackerrank.com Algorithms > Warmup 초의 길이 배열이 주어지면 가장 긴 길이를 가진 초의 개수를 출력한다. 코드 int birthdayCakeCandles(int candles_count, int* candles) { int max = 0, count = 0; for (int i = 0; i max) max = candles[i..

728x90