403Webshell
Server IP : 119.195.102.159  /  Your IP : 216.73.217.134
Web Server : nginx/1.18.0
System : Linux picell 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64
User : altablue ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home2/rsc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home2/rsc/notion_log.js
const token = "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";
const pageId = "31f52a530dd6802382e0e27883612d56";

const args = process.argv.slice(2);
const message = args.join(" ");

if (!message) {
    console.error("사용법: node notion_log.js <기록할 내용>");
    process.exit(1);
}

// Format date to Korean time
const date = new Date().toLocaleString('ko-KR', { timeZone: 'Asia/Seoul' });

const requestBody = {
    children: [
        {
            object: "block",
            type: "heading_3",
            heading_3: {
                rich_text: [
                    {
                        type: "text",
                        text: {
                            content: `[${date}] 개발 기록`
                        }
                    }
                ]
            }
        },
        {
            object: "block",
            type: "to_do", // 체크리스트(To-Do) 블록으로 변경
            to_do: {
                rich_text: [
                    {
                        type: "text",
                        text: {
                            content: message
                        }
                    }
                ],
                checked: false // 체크박스 기본 상태: 체크 안 됨(false)
            }
        },
        {
            object: "block",
            type: "divider",
            divider: {}
        }
    ]
};

fetch(`https://api.notion.com/v1/blocks/${pageId}/children`, {
    method: 'PATCH',
    headers: {
        'Authorization': `Bearer ${token}`,
        'Content-Type': 'application/json',
        'Notion-Version': '2022-06-28'
    },
    body: JSON.stringify(requestBody)
})
    .then(res => {
        if (!res.ok) {
            throw new Error(`HTTP error! status: ${res.status}`);
        }
        return res.json();
    })
    .then(data => {
        console.log("✅ 성공적으로 노션 페이지에 기록되었습니다!");
    })
    .catch(error => {
        console.error("❌ 노션 기록 실패:", error.message);
    });

Youez - 2016 - github.com/yon3zu
LinuXploit