목록분류 전체보기 (155)
사자자리

https://www.acmicpc.net/problem/3060 3060번: 욕심쟁이 돼지 입력은 T개의 테스트 데이터로 구성된다. 입력의 첫 번째 줄에는 입력 데이터의 수를 나타내는 정수 T가 주어진다. 각 테스트 데이터는 두 줄로 구성되어 있고, 첫째 줄에는 하루에 배달되는 사 www.acmicpc.net #include int main(){ int n, feed, input, day, sum; scanf("%d", &n); for (int i = 0; i = sum){ d..

https://www.acmicpc.net/problem/8595 8595번: 히든 넘버 첫째 줄에 단어의 길이 n (1 ≤ n ≤ 5,000,000)이 주어진다. 둘째 줄에는 단어가 주어진다. 단어는 알파벳 대/소문자와 숫자(0-9)로 이루어져 있다. www.acmicpc.net #include int main(){ int n; char c; long long int sum = 0, hidden = 0; scanf("%d\n", &n); while ((c = getchar()) != '\n'){ if ('0'
헤더: isdigit int isdigit (int arg); 인자가 숫자가 아니면 0(false) 반환 인자가 숫자이면 1 이상(true) 반환 #include #include int main(){ char test[11] = "hello12345"; for (int i = 0; i < 10; i++){ printf("%d", isdigit(test[i]));//0000011111 출력 } return 0; }
헤더: ASCII string to integer atoi int atoi (char const *str); 문자열을 int로 변환 ASCII string to long atol long atol (char const *str); 문자열을 long으로 변환 ASCII string to long long atoll long long atoll (char const *str); 문자열을 long long으로 변환 ASCII string to float atof double atof (char const *str); 문자열을 double로 변환 atoi #include #include int main(){ char *test = "500"; printf("%d\n", test);//4210688 출력 prin..

XSS game: Level 1 (xss-game.appspot.com) XSS game: Level 1 xss-game.appspot.com Mission Description This level demonstrates a common cause of cross-site scripting where user input is directly included in the page without proper escaping. Interact with the vulnerable application window below and find a way to make it execute JavaScript of your choosing. You can take actions inside the vulnerable ..

[난이도 low] Quest. Change Secret 페이지에서 XSS 공격 후 SQL Injection (Login From/User) 페이지에서 확인할 수 있습니다. 다음 화면을 출력해보세요.(bee/bug) New secret: SQL Injection (Login From/User) 페이지로 이동 Login: bee Password: bug 성공 [난이도 low] Quest. secret을 사용자의 쿠키 정보로 바꿔봅시다. New secret: 위와 마찬가지로 SQL Injection (Login From/User) 페이지로 이동하고 로그인(bee/bug) 성공 [난이도 high] Quest. 공격할 수 없습니다. Secret은 두 개의 함수를 이용해 방어하고 있습니다. 함수의 이름을 적어주세요..

[난이도 low] Quest. 다음 화면과 같이 경고창을 띄워봅시다. 입력 후 Submit 성공 [난이도 low] Quest. 사용자의 쿠키 값을 경고창에 띄워봅시다. 입력 후 Submit alert 창이 먼저 떴다. 성공 [난이도 low] Quest. (게시판에 등록된 내용을 삭제하지 않았다면) XSS 공격을 시도할 때마다 경고창이 여러 개가 뜨는 것을 확인했습니다. 왜 그럴까요? 이유를 작성해주세요. Reflected XSS Stored XSS 1회용 공격 지속적으로 활용될 수 있는 공격 웹 서버 및 데이터베이스에 악성 코드 저장 X 웹 서버 및 데이터베이스에 악성 코드 저장 O # Owner Date Entry 7 bee 2022-08-08 16:42:21 8 bee 2022-08-08 16:42:..