[b01lers2020]Welcome to Earth

类似签到题了

一直看js就可以获得最后的混淆

// Run to scramble original flag
//console.log(scramble(flag, action));
function scramble(flag, key) {
  for (var i = 0; i < key.length; i++) {
    let n = key.charCodeAt(i) % flag.length;
    let temp = flag[i];
    flag[i] = flag[n];
    flag[n] = temp;
  }
  return flag;
}

function check_action() {
  var action = document.getElementById("action").value;
  var flag = ["{hey", "_boy", "aaaa", "s_im", "ck!}", "_baa", "aaaa", "pctf"];

  // TODO: unscramble function
}

其实猜一下也可以

或者可以利用排列组合 的 排列来搞

直接利用py代码

itertools        

from itertools import permutations

flag = ["{hey", "_boy", "aaaa", "s_im", "ck!}", "_baa", "aaaa", "pctf"]

item = permutations(flag)

for i in item:
    k=''.join(list(i))
    if k.startswith('pctf{')    and k[-1]=='}':
        print(k)

[b01lers2020]Welcome to Earth_第1张图片

你可能感兴趣的:(BUUctf,javascript)