# WaniCTF 2023 [TOC] 大阪大學舉辦的(應該吧 官方網址 : https://wanictf.org/   ## For ### Just_mp4 用 exiftool 檢查發現這一行,base64 後取得 flag  ## Misc ### shuffle_base64 給的 output 長這樣,從 python 中可以知道最後用 base64 加密了  所以 base64 解密後  從頭開始理解 code,最先的 pad function 將字串以二為單位切割,並在後面塞入一個亂數字符,變成三個三個一組  接著這個 function 將剛才三個為一組的總組數作排列組合,共有 8! == 40320種組合  make_str_blocks 這個 function 不重要不想講, order 那一行就是隨機取一個 0 到 40320 中的一個數字,下面的 for 迴圈就以 shuffle_list[order] 這組組合變成字串,也就是 base64 解碼的那個字串  阿下面是固定的順序,剩下的想辦法還原,然後我看到題目叫做 shuffle_base64......,flag 的答案不用我說了吧  ## rev ### Just_Passw0rd --Beginner 將給的檔案用 strings 打開就找到 flag 了  ### javersing --easy 將給的 java.jar 丟上 online rev 後, code 長這樣,主要是 s 是根據 ```i * 7 % 30```的方式打亂順序,所以排序就好  哭啊,我真的不會 python, C++ 萬歲!! ```C++= #include <iostream> #include <string.h> using namespace std; int main(){ string s = "Fcn_yDlvaGpj_Logi}eias{iaeAm_s"; char result[30]; int array[30]; // put the sort of string s in a int array for(int i=0;i<30;i++) array[i] = i * 7 % 30; // return the sort of flag for(int i=0;i<30;i++){ result[array[i]] = s[i]; } // output the flag for(auto i: result) cout << i; cout << endl; } ``` ## 曾經的排名 QQ  
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up