본문으로 건너뛰기
mokee.
Seoul--:--:--
2026.06.161 min read#etc

2026 CDEC 민방위 사이버 교육 스킵 스크립트

CDEC 사이버교육센터의 교육 이수 스크립트입니다. https://www.cdec.kr에 최적화 된 스크립트로 타 민방위 사이버 교육센터 사이트에서는 작동하지 않습니다. (e.g. CMES)

민방위 사이버교육센터의 교육 이수 스크립트입니다. https://www.cdec.kr 사이트에 최적화 된 스크립트로 타 민방위 사이버 교육센터 사이트에서는 작동하지 않습니다.

수강 화면(동영상 보는 화면)에서 크롬의 개발자 도구를 여신 뒤에 (F12, ⌘+⌥+i) 아래 스크립트를 붙여넣기 하시면 해당 강의가 이수 처리됩니다.

마지막 평가 문제는 난이도가 어려운 편은 아니니 직접 푸시는 것을 권장드립니다~

javascript
(async () => {
    const video = document.querySelector("#player_html5_api");

    if (!video) {
        throw Error('video element 찾을 수 없음');
    }

    const memberNo = document.querySelector("#mem_no")?.value;
    const movOrder = document.querySelector("#mov_order")?.value;
    const profNo = document.querySelector("#prof_no")?.value;
    const currentTime = video.duration;

    if (memberNo === undefined) {
        throw Error('memberNo 찾을 수 없음');
    }

    if (movOrder === undefined) {
        throw Error('movOrder 찾을 수 없음');
    }

    const res = await fetch("https://www.cdec.kr/edu/uptPlayLog", {
        "headers": {
          "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
          "x-requested-with": "XMLHttpRequest"
        },
        "referrer": "https://www.cdec.kr/edu/basic",
        "referrerPolicy": "strict-origin-when-cross-origin",
        "body": `mem_no=${memberNo}&mov_order=${movOrder}&currentTime=${currentTime}&volume=0.5&muted=false&prof_no=${profNo}`,
        "method": "POST",
        "mode": "cors",
        "credentials": "include"
    });

    const json = res.json();
    console.log(json);

    video.currentTime = currentTime;
})();