text: const superagent = require('superagent')
  
  const JSEncrypt = require("node-jsencrypt")
  
  function encrypt (txt) {
    const publicKey = "30820122300d06092a864886f70d01010105000382010f003082010a0282010100f357429c22add0d547ee3e4e876f921a0114d1aaa2e6eeac6177a6a2e2565ce9593b78ea0ec1d8335a9f12356f08e99ea0c3455d849774d85f954ee68d63fc8d6526918210f28dc51aa333b0c4cdc6bf9b029d1c50b5aef5e626c9c8c9c16231c41eef530be91143627205bbbf99c2c261791d2df71e69fbc83cdc7e37c1b3df4ae71244a691c6d2a73eab7617c713e9c193484459f45adc6dd0cba1d54f1abef5b2c34dee43fc0c067ce1c140bc4f81b935c94b116cce404c5b438a0395906ff0133f5b1c6e3b2bb423c6c350376eb4939f44461164195acc51ef44a34d4100f6a837e3473e3ce2e16cedbe67ca48da301f64fc4240b878c9cc6b3d30c316b50203010001";
    const pub = new JSEncrypt();
    pub.setPublicKey(publicKey);
    return pub.encrypt(txt)
  }
  
  function getJsonForFindUser (org, name, birthday) {
    return {
      orgCode: org,
      name: encrypt(name),
      birthday: encrypt(birthday),
      stdntPNo: null,
      loginType: 'school'
    }
  }
  
  function searchSchoolList (loc, name, onFinish) {
    const url = `https://hcs.eduro.go.kr/v2/searchSchool?lctnScCode=${loc}&schulCrseScCode=4&orgName=${name}&loginType=school`
    superagent.get(encodeURI(url), (err, res) => {
      onFinish(res.body)
    })
  }
  
  const localeMap = new Map()
  localeMap.set('대구', "03")
  
  searchSchoolList('03', '고등학교명', (data) => {
    const school = data.schulList[0]
    const schoolId = school.juOrgCode
  
    const name = '이름'
    const year = '05'
    for(let month = 1; month <= 12; month++){
      for(let day = 1; day <= 31; day++){
        const birthday = `${year}${month.toString().padStart(2, '0')}${day.toString().padStart(2, '0')}`
        const request = getJsonForFindUser(schoolId, name, birthday)
        //console.log(request)
  
        const url = 'https://dgehcs.eduro.go.kr/v2/findUser'
        console.log(request)
        /*superagent.post(url).send(request).end((err, res) => {
          console.log(res.body)
        })*/
      }
    }
  
    //console.log(school)
  })