본문 바로가기
반응형

전체 글65

curl: (6) Could not resolve host: application #ElasticSearch 8.3.3 >curl -X PUT "localhost:9200/user/_doc/1?pretty" -H 'Content-Type: application/json' -d'{"username":"nanglam"}' { "error" : "Content-Type header [application/x-www-form-urlencoded] is not supported", "status" : 406 } curl: (6) Could not resolve host: application -H 'Content-Type: application/json'을 추가하고 실행하면 curl: (6) Could not resolve host: application 오류가 나온다. >curl -X PUT "localhost:9200/user.. 2022. 8. 8.
curl: (60) schannel: SEC_E_UNTRUSTED_ROOT #ElasticSearch 8.3.3 >curl http://localhost:9200 curl: (52) Empty reply from server [@timestamp][WARN ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [USER] received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/127.0.0.1:9200, remoteAddress=/127.0.0.1:59661} 해당 오류는 접속 할 때 HTTP를 사용해서 발생하므로 https를 사용하면 해결 할 줄 알았다. 그런데.. >curl https://localhost:9200 curl: (60) schannel.. 2022. 8. 7.
curl: (52) Empty reply from server #ElasticSearch 8.3.3 Elasticsearch를 윈도우에서 다운로드하고, ElasticSearch 8.3.3을 실행시켰다. 그 후 curl 명령을 날리면 다음과 같은 에러가 나타난다. >curl http://localhost:9200 curl: (52) Empty reply from server [@timestamp][WARN ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [USER] received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/127.0.0.1:9200, remoteAddress=/127.0.0.1:59661} https://stackoverf.. 2022. 8. 6.
Matriochka Step 1~3 Write-Up #Nuit du Hack CTF Quals 2016 #Matriochka Step1 Points : 50 Solves : 432 Description : Can you help me? Recently, I found an executable binary. As I'm a true newbie, Certainly, to solve it, I will have difficulties. Keep in mind, the first step is quite easy. Maybe the last one will be quite tricky. Emulating it could be a good idea. The challenge is available at : http://static.quals.nuitduhack.com/stage1.bin stage1.bin 을 실.. 2022. 8. 5.
ServerfARM Write-Up #Internetwache CTF 2016 Points : 70 Solves : 156 Description: Someone handed me this and told me that to pass the exam, I have to extract a secret string. I know cheating is bad, but once does not count. So are you willing to help me? Attachment: rev70.zip 비밀 문자열을 추출해 달라고 한다.. main 함수 부분이다. 특별한 건 없으니 handle_task부분으로 넘어가자. handle_task 부분이다. case0의 if문을 보면 참일 경우 문자열 "IW{"를 출력하는 것을 볼 수있고, 밑에 putchar(83), printf("%c%c\n", .. 2022. 8. 5.
File Checker Write-Up #Internetwache CTF 2016 Points : 60 Solves : 190 Description: My friend sent me this file. He told that if I manage to reverse it, I'll have access to all his devices. My misfortune that I don't know anything about reversing :/ Attachment: rev60.zip 실행을 해봤는데 Fatal error: File does not exist가 나온다. 특정한 파일을 생성해야 하는 문제 인 것 같다. main 함수다. .password 파일을 열어서 안에 있는 문자열을 꺼내와 sub_40079C에서 연산을 하고 v8과 or 연산을 하여 마지막에 v8이 0이면 Congrat.. 2022. 8. 4.
SPIM Write-Up #Internetwache CTF 2016 Points : 50 Solves : 208 Description : My friend keeps telling me, that real hackers speak assembly fluently. Are you a real hacker? Decode this string: "IVyN5U3X)ZUMYCs" User Text Segment [00400000]..[00440000] [00400000] 8fa40000 lw $4, 0($29) ; 183: lw $a0 0($sp) # argc [00400004] 27a50004 addiu $5, $29, 4 ; 184: addiu $a1 $sp 4 # argv [00400008] 24a60004 addiu $6, $5, 4 ; 185: addiu $a2 $a1 .. 2022. 8. 4.
8장(함수) 연습문제 #C언어 콘서트 1. 다음 중 올바른 함수 원형 정의가 아닌 것은? - double funct(char x) 2. "int func(char x, float v, double t);"와 같은 원형을 가지는 함수 func()의 반환값은? - int 3. 다음 중 올바른 함수 호출은? - func(); 4. 다음 중 함수 전체를 올바르게 구현한 것은? - int func(int x) {return x = x+1;} 5. 왼쪽 박스의 함수 원형 정의에 적합환 return 문을 오른쪽 박스에서 찾아서 서로 연결하시오. - int f(void); return 10+20; void g(int, int); return; double h(double, int); return 'a' + 1.0; 6. 다음 수식의 반환 값의 범위는? r.. 2022. 8. 3.
숫자 문자열과 영단어 #Python 문제 설명 네오와 프로도가 숫자놀이를 하고 있습니다. 네오가 프로도에게 숫자를 건넬 때 일부 자릿수를 영단어로 바꾼 카드를 건네주면 프로도는 원래 숫자를 찾는 게임입니다. 다음은 숫자의 일부 자릿수를 영단어로 바꾸는 예시입니다. 1478 → "one4seveneight" 234567 → "23four5six7" 10203 → "1zerotwozero3" 이렇게 숫자의 일부 자릿수가 영단어로 바뀌어졌거나, 혹은 바뀌지 않고 그대로인 문자열 s가 매개변수로 주어집니다. s가 의미하는 원래 숫자를 return 하도록 solution 함수를 완성해주세요. 참고로 각 숫자에 대응되는 영단어는 다음 표와 같습니다. 숫자 영단어 0 zero 1 one 2 two 3 three 4 four 5 five 6 six 7 .. 2022. 8. 2.
7장(배열) Programming #C언어 콘서트 1. 배열 days[]를 아래와 같이 초기화 하고 배열 원소의 값을 다음과 같이 출력하는 프로그램을 작성하시오. 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 1월은 31월까지 있습니다. 2월은 29월까지 있습니다. 3월은 31월까지 있습니다. 4월은 30월까지 있습니다. 5월은 31월까지 있습니다. 6월은 30월까지 있습니다. 7월은 31월까지 있습니다. 8월은 31월까지 있습니다. 9월은 30월까지 있습니다. 10월은 31월까지 있습니다. 11월은 30월까지 있습니다. 12월은 31월까지 있습니다. #include int main() { int days[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; for(int .. 2022. 8. 2.
'csv-plus' HTML Injection 취약점 #CVE-2022-21241 Target : csv-plus ≤ 0.8.0 https://github.com/plusone-masaki/csv-plus GitHub - plusone-masaki/csv-plus: A completely new CSV editor that gives you a great experience with simple operations. A completely new CSV editor that gives you a great experience with simple operations. - GitHub - plusone-masaki/csv-plus: A completely new CSV editor that gives you a great experience with simple o... github.c.. 2022. 8. 1.
7장(배열) 연습문제 #C언어 콘서트 1. 배열이 10개의 원소를 가진다면 첫 번째 원소의 배열 번호는? - 0 2. 배열 char a[5][6]은 총 몇 개의 원소를 가지는가? - 30 3. 배열 int a[10]의 마지막 요소의 인덱스는? - 9 4. int a[100] = { 10 };으로 선언된 배열에서 a[99]의 초깃값은 무엇인가? - 0 5. int a[2][2] = { 1, 2, 3, 4 }에서 a[1][1]의 값은? - 4 6. 다음 중 잘못 초기화된 배열을 모두 선택하시오. - int a[] = {1, 2, 3, 4, 5}; int a[100] = {x, y, z}; // x, y, z는 변수 7. int a[10]과 같이 선언된 배열을 a[20]과 같이 경계를 넘어가는 인덱스를 사용하면 어떤 일이 발생하는가? - 컴파일은.. 2022. 8. 1.
6장(반복문) Programming #C언어 콘서트 1. 간단한 카운트 다운 프로그램을 작성하여 보자. 60초부터 0초까지 숫자를 출력하고 0초가 되면 "발사"를 출력한다. 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 발사 #include int main() { for(int i=60; i>0; i--) { printf("%d ",i); } printf("\n발사\n"); return 0; } 2. 사용자로부터 반복 횟수를 받아서 그 수만큼 "안녕하세요"를 출력하는 프로그램을 작성해보자. 몇 번이나.. 2022. 7. 31.
없는 숫자 더하기 #Python 문제 설명 0부터 9까지의 숫자 중 일부가 들어있는 정수 배열 numbers가 매개변수로 주어집니다. numbers에서 찾을 수 없는 0부터 9까지의 숫자를 모두 찾아 더한 수를 return 하도록 solution 함수를 완성해주세요. 제한 사항 1 ≤ numbers의 길이 ≤ 9 0 ≤ numbers의 모든 원소 ≤ 9 numbers의 모든 원소는 서로 다릅니다. 입출력 예 number result [1,2,3,4,6,7,8,0] 14 [5,8,4,0,6,7,9] 6 입출력 예 설명 입출력 예 #1 5, 9가 numbers에 없으므로, 5 + 9 = 14를 return 해야 합니다. 입출력 예 #2 1, 2, 3이 numbers에 없으므로, 1 + 2 + 3 = 6을 return 해야 합니다. Pyth.. 2022. 7. 30.
C언어 문자 입력 받을 시 주의사항 #문자 인식 못함, 문자 오류 getchar, scanf("%c")는 흔히 문자를 입력 받을 때 사용한다. 하지만, 처음 사용하는 경우 getchar, scanf("%c")가 정확히 '무엇을 받아오는지' 모르기 때문에 오류가 생기기도 한다. 아래는 흔하게 오류를 발생하는 코드다. #include int main() { char a, b; a = getchar(); b = getchar(); printf("%c %c", a, b); return 0; } 입력 > a 출력 > a 실행을 하고 a에 입력을 하면 바로 printf가 실행되며 종료된다. scanf("%c")도 위와 같이 a 입력 후 printf가 실행된다. #include int main() { char a, b; scanf("%c", &a); scanf("%c", &b); .. 2022. 7. 30.
반응형