http://www.shiyanbar.com/ctf/1779
js:
小明某天在看js的时候,突然看到了这么一段代码,发现怎么也理不出代码逻辑,你能帮帮他吗?
格式:SimCTF{}
解题链接: http://ctf5.shiyanbar.com/crypto/2.html
eval(function(p,a,c,k,e,d)
{e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};
if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};
c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}
('<1 8="7/a">9(\'\\6\\3\\2\\5\\4\\b\\i\\h\\k\\j\\0\\g\\d\\c\\f\\0\\e\')',21,21,'u0065|script|u006d|u0069|u0054|u0043|u0053|text|type|alert|javascript
|u0046|u006f|u0063|u007d|u0064|u006e|u006a|u007b|u005f|u0073'.split('|'),0,{}))




解:
0x06 Unicode


密文样例:


\u5927\u5bb6\u597d\uff0c\u6211\u662f\u0040\u65e0\u6240\u4e0d\u80fd\u7684\u9b42\u5927\u4eba\uff01\u8bdd\u8bf4\u5
用在线的Unicode解码器    
http://tool.chinaz.com/tools/unicode.aspx  从中找到有用信息如下:




本题:
1.这是JS的一种加密
有一点要注意的,网页里复制下来的是不完整的
不信你看,实验吧真是烂,但是我还是得学。没办法。
js实验吧





2.在链接的界面右击选查看源码:
eval(function(p,a,c,k,e,d){e=function(c)
{return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String))
{while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('<1 8="7/a">9(\'\\6\\3\\2\\5\\4\\b\\i\\h\\k\\j\\0\\g\\d\\c\\f\\0\\e\')</1>',21,21,'u0065|script|u006d|u0069|u0054|u0043|u0053|text|type|alert|javascript|u0046|u006f|u0063|u007d|u0064|u006e|u006a|u007b|u005f|u0073'.split('|'),0,{}))
在chrom浏览器中按F12,点击console.log只会输出到浏览器的控制台我看你还报错C35没有定义,

把eval换成console.log就行,结果是

js实验吧

<script type="text/javascript">alert('\u0053\u0069\u006d\u0043\u0054\u0046\u007b\u006a\u0073\u005f
\u0065\u006e\u0063\u006f\u0064\u0065\u007d')</script>
http://tool.chinaz.com/tools/unicode.aspx  去在线解密unicode

js实验吧js实验吧js实验吧
最后答案falg:SimCTF{js_encode}

相关文章:

  • 2021-12-14
  • 2021-07-18
  • 2021-08-03
  • 2021-05-07
  • 2021-08-29
  • 2022-01-10
  • 2022-12-23
  • 2022-01-10
猜你喜欢
  • 2021-05-08
  • 2021-09-11
  • 2021-04-18
  • 2021-12-08
  • 2021-07-09
  • 2021-07-17
  • 2021-05-20
相关资源
相似解决方案