웹해킹 18번 문제
|/|\(|\)|\t|\||&|union|select|from|0x” 문자 들을 찾으려고한다면 no hack의 문자열을 보여주고 종료한다. 필터링 되는 문자열: 공백, /,(,),|,&,union,select,from,0x,tab 핵심 쿼리문: "select id from chall18 where id='guest' and no=$_GET[no]" %20 select id from chall18 where id='guest' and no='1' or where id='admin' and no = '2' select id from chall18 where id='guest' and no='1'%20or%20where%20id='admin'%20and%20no%20=%20'2' select id fr..
드림핵 웰컴!
#include int main(void) { FILE *fp; char buf[0x80] = {}; size_t flag_len = 0; printf("Welcome To DreamHack Wargame!\n"); fp = fopen("/flag", "r"); fseek(fp, 0, SEEK_END); flag_len = ftell(fp); fseek(fp, 0, SEEK_SET); fread(buf, 1, flag_len, fp); fclose(fp); printf("FLAG : "); fwrite(buf, 1, flag_len, stdout); } 그냥 공짜 문제 냠냠