일상치트

싸이월드 백업 프로그램 없이 백업하기

로모유니버스 2020. 6. 10. 22:40
반응형

옛날생각이 나서 싸이월드에 들어갔더니 접속부터 불안한 낌새가 나서

검색해보니 싸이월드 서비스 이용이 오늘내일 한다는 소식을 접하고

마지막 백업 찬스란 생각에 싸이월드 백업으로 검색했다.

본인이 개발자라 그런가 내 정보 빼갈수도 있는 백업 프로그램이 보여서

일단 거르고 다른 방법이 없나 한참 찾다가 가장 그럴듯해보이는 방법을 찾아서 

소개하기로 했다.

 

 

var last_id,last_dt,tag_value,startdate,enddate,forder_id,airepageno,airecase,airelastdate,html="",type="more",search="",allPosts=[],postIdx=0,activateReply=!0;function getBase64Image(s){var t=document.createElement("canvas");return t.width=s.width,t.height=s.height,t.getContext("2d").drawImage(s,0,0),t.toDataURL("image/jpg").replace(/^data:image\/(png|jpg);base64,/,"")}function printImageList(){for(var s="",t=0,a=0;a<allPosts.length;a++)"2"==allPosts[a].type&&(t++,s+="http://nthumb.cyworld.com/thumb?v=0&width=810&url="+allPosts[a].image+" "+allPosts[a].date.replace(/\./gi,"")+"_"+allPosts[a].time.replace(/\:/gi,"")+"00."+t+"."+allPosts[a].image.split(".").pop()+" "+allPosts[a].date.replace(/\./gi,":")+" "+allPosts[a].time+"\n");return s}function saveAs(s,t){var a=document.createElement("a"),e=URL.createObjectURL(t);a.href=e,a.download=s,document.body.appendChild(a),a.click(),setTimeout((function(){document.body.removeChild(a),window.URL.revokeObjectURL(e)}),0)}function collectDiaries(s=!0){activateReply=s,console.log("Start diary backup :)"),$("#diary-backup-status .backup-message").css("display","none"),$("#diary-backup-status .lds-hourglass").css("display","inline-block"),setTimeout((function(){readAllCyPosts("M");var s=new Blob([JSON.stringify(allPosts,null,1)],{type:"text/plain;charset=utf-8"});saveAs("MyCyDiary_"+Date().replace(/\ /gi,"_").split("_GMT")[0]+".txt",s),$("#diary-backup-status .lds-hourglass").css("display","none"),$("#diary-backup-status .backup-message").css("display","inline-block")}),300)}function collectBoards(s=!0){activateReply=s,console.log("Start board backup :)"),$("#board-backup-status .backup-message").css("display","none"),$("#board-backup-status .lds-hourglass").css("display","inline-block"),setTimeout((function(){readAllCyPosts("1");var s=new Blob([JSON.stringify(allPosts,null,1)],{type:"text/plain;charset=utf-8"});saveAs("MyCyBoards_"+Date().replace(/\ /gi,"_").split("_GMT")[0]+".txt",s),$("#board-backup-status .lds-hourglass").css("display","none"),$("#board-backup-status .backup-message").css("display","inline-block")}),300)}function collectBlogs(s=!0){activateReply=s,console.log("Start blog backup :)"),$("#blog-backup-status .backup-message").css("display","none"),$("#blog-backup-status .lds-hourglass").css("display","inline-block"),setTimeout((function(){readAllCyPosts("B");var s=new Blob([JSON.stringify(allPosts,null,1)],{type:"text/plain;charset=utf-8"});saveAs("MyCyBlogs_"+Date().replace(/\ /gi,"_").split("_GMT")[0]+".txt",s),$("#blog-backup-status .lds-hourglass").css("display","none"),$("#blog-backup-status .backup-message").css("display","inline-block")}),300)}function collect2015(s=!0){activateReply=s,console.log("Start new content backup :)"),$("#newcontent-backup-status .backup-message").css("display","none"),$("#newcontent-backup-status .lds-hourglass").css("display","inline-block"),setTimeout((function(){readAllCyPosts("P");var s=new Blob([JSON.stringify(allPosts,null,1)],{type:"text/plain;charset=utf-8"});saveAs("MyCyNewContents_"+Date().replace(/\ /gi,"_").split("_GMT")[0]+".txt",s),$("#newcontent-backup-status .lds-hourglass").css("display","none"),$("#newcontent-backup-status .backup-message").css("display","inline-block")}),300)}function collectStatus(s=!0){activateReply=s,console.log("Start status backup :)"),$("#status-backup-status .backup-message").css("display","none"),$("#status-backup-status .lds-hourglass").css("display","inline-block"),setTimeout((function(){readAllCyPosts("T");var s=new Blob([JSON.stringify(allPosts,null,1)],{type:"text/plain;charset=utf-8"});saveAs("MyCyStatus_"+Date().replace(/\ /gi,"_").split("_GMT")[0]+".txt",s),$("#status-backup-status .lds-hourglass").css("display","none"),$("#status-backup-status .backup-message").css("display","inline-block")}),300)}function collectPhotos(s=!0){activateReply=s,console.log("Start photo backup :)"),$("#photo-backup-status .backup-message").css("display","none"),$("#photo-backup-status .lds-hourglass").css("display","inline-block"),setTimeout((function(){readAllCyPosts("2");var s=new Blob([JSON.stringify(allPosts,null,1)],{type:"text/plain;charset=utf-8"});saveAs("MyCyPhotos_"+Date().replace(/\ /gi,"_").split("_GMT")[0]+".txt",s),$("#photo-backup-status .lds-hourglass").css("display","none"),$("#photo-backup-status .backup-message").css("display","inline-block")}),300)}function readAllCyPosts(s){allPosts=[],postIdx=0,last_dt=null;var t=readCyPost(30,s);if(postIdx=t,t>30){postIdx=30;do{readCyPost(t-postIdx,s),postIdx+=30}while(t-postIdx>0);console.log("Finish")}}function readCyPost(s,t){var a=0;return $.ajax({url:"/home/"+homeTid+"/posts",data:{startdate:startdate,enddate:enddate,folderid:"",tagname:tag_value,lastid:last_id,lastdate:last_dt,listsize:s,homeId:homeTid,airepageno:airepageno,airecase:airecase,airelastdate:airelastdate,searchType:srchType,search:search},cache:!1,dataType:"json",async:!1,success:function(s){last_dt=s.lastdate,a=s.totalCount;var e=postIdx;s.postList.length>0?s.postList.some((function(s,l){if(t&&s.serviceType!=t)return!1;var i={type:s.serviceType,writer:s.writer,viewCount:s.viewCount};switch(i.type){case"2":i.image=s.summaryModel.image,$("#photo-backup-status");break;case"1":$("#board-backup-status");break;case"P":$("#newcontent-backup-status");break;case"T":$("#status-backup-status");break;case"M":$("#diary-backup-status");break;case"B":$("#blog-backup-status");break;case"7":return t?allPosts[e+l]=i:allPosts.push(i),!1}try{$.ajax({url:"/home/"+homeTid+"/post/"+s.identity+"/layer",cache:!1,async:!1,dataType:"html",data:{},success:function(t,a,e){var l=$("<output>").append($.parseHTML(t));if(void 0===$(".textData",l)[0])return!1;"M"!=i.type&&(i.title=$("#cyco-post-title",l)[0].innerText.trim());for(var o="",n=$("section .cyco-imagelet figure img",l),c=0;c<n.length;c++)o+="<img src ='http://nthumb.cyworld.com/thumb?v=0&width=810&url="+decodeURIComponent(n[c].getAttribute("srctext"))+"'/>";var p=$(".textData",l);for(c=0;c<p.length;c++)o+=p[c].innerHTML.trim();(i.content=o,i.date=$(".view1",l)[0].innerText.trim().split(" ")[0].split("\t").pop(),i.time=$(".view1",l)[0].innerText.trim().split(" ")[1],activateReply)?0!=s.commentCount?$.ajax({url:"/home/"+homeTid+"/post/"+s.identity+"/comment",dataType:"json",async:!1,data:{},success:function(s,t,a){for(comment_idx in i.comments=[],s.commentList){var e=s.commentList[comment_idx].contentModel[0];e.name=s.commentList[comment_idx].writer.name,i.comments.push(e)}allPosts.push(i)}}):allPosts.push(i):allPosts.push(i)}})}catch(s){console.error(s)}var o=(e+l)/a*100;console.log("Collecting | "+s.identity+" | "+o.toFixed(2)+"% ["+(e+l)+" / "+a+"] ")})):a=0}}),a}function initializeCy2me(){$('<style>\n.lds-hourglass { display: none;  position: relative;  width: 22px;  height: 22px; }\n .lds-hourglass:after {  content: " ";  display: block;  border-radius: 50%;  width: 0;  height: 0;  margin:6px;  box-sizing: border-box;  border: 10px solid #bbb;  border-color: #bbb transparent #bbb transparent;  animation: lds-hourglass 1.2s infinite;}\n @keyframes lds-hourglass {  0% {    transform: rotate(0);    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);  }  50% {    transform: rotate(900deg); animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);  }  100% {    transform: rotate(1800deg);  }}\n.backup-btn { cursor:pointer; font-size:13px; line-height:25px; color:#777; }\n.backup-status { display:inline-block; font-weight:normal; color:#fe8536;} \n.backup-message { display:inline-block; padding-left:5px; display:none;} \n</style>').appendTo(document.head),$(".profile dfn:first").html("");var s=$("<span class='backup-btn'>").text("다이어리 백업").click(collectDiaries),t=$("<div id='diary-backup-status' class='backup-status'> <div class='lds-hourglass'></div><div class='backup-message'>done</div></span>"),a=$("<span class='backup-btn'>").text("게시판 백업").click(collectBoards),e=$("<div id='board-backup-status' class='backup-status'><div class='lds-hourglass'></div><div class='backup-message'>done</div></span>"),l=$("<span class='backup-btn'>").text("블로그 백업").click(collectBlogs),i=$("<div id='blog-backup-status' class='backup-status'><div class='lds-hourglass'></div><div class='backup-message'>done</div></span>"),o=$("<span class='backup-btn'>").text("사진첩 백업").click(collectPhotos),n=$("<div id='photo-backup-status' class='backup-status'><div class='lds-hourglass'></div><div class='backup-message'>done</div></span>"),c=$("<span class='backup-btn'>").text("2015 이후 백업").click(collect2015),p=$("<div id='newcontent-backup-status' class='backup-status'><div class='lds-hourglass'></div><div class='backup-message'>done</div></span>"),r=$("<span class='backup-btn'>").text("상태 메세지 백업").click(collectStatus),d=$("<div id='status-backup-status' class='backup-status'><div class='lds-hourglass'></div><div class='backup-message'>done</div></span>");$(".profile dfn:first").append(s),$(".profile dfn:first").append(t),$(".profile dfn:first").append($("<em>")),$(".profile dfn:first").append(a),$(".profile dfn:first").append(e),$(".profile dfn:first").append($("<em>")),$(".profile dfn:first").append(l),$(".profile dfn:first").append(i),$(".profile dfn:first").append($("<br>")),$(".profile dfn:first").append(o),$(".profile dfn:first").append(n),$(".profile dfn:first").append($("<em>")),$(".profile dfn:first").append(c),$(".profile dfn:first").append(p),$(".profile dfn:first").append($("<em>")),$(".profile dfn:first").append(r),$(".profile dfn:first").append(d)}"more"==type?(last_id=$(".hiddenId:last").data("id"),last_dt="",airepageno=$("#airepageno").val(),airecase=$("#airecase").val(),airelastdate=$("#airelastdate").val(),srchType=$("#searchType").val(),tag_value=$("#tagname").val(),forder_id=$("#folderid").val()):home_idx=0,initializeCy2me(),console.log("CY2ME : Cyworld 백업 준비 완료 :)");

 위 코드 복사해서 사용하면 된다.

상세내용은 유튜브 참조

그래도 모르겠으면 아래 링크 참조

 

https://github.com/designe/cy2me

'일상치트' 카테고리의 다른 글

비밀글 테스트  (0) 2021.06.21
플래시 소스 파일 추출 프로그램 Sothink SWF Decompiler  (0) 2020.06.28