XCTF-Reverse:game(涉及异或脚本编写)
生活随笔
收集整理的這篇文章主要介紹了
XCTF-Reverse:game(涉及异或脚本编写)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
題目地址:https://adworld.xctf.org.cn/task/answer?type=reverse&number=4&grade=0&id=5074&page=1
工具: ida pro、python環境
知識:簡單的算法分析,簡單的腳本編寫
方法一、
玩游戲,依次按12345678后出現flag
done!!! the flag is zsctf{T9is_tOpic_1s_v5ry_int7resting_b6t_others_are_n0t}
方法二、
用ida打開文件,64位打不開就用32位
打開后shift+F12,alt+T查找flag
點擊確定后,就直接定位到這句話所在的函數
粘貼到word中,用word取出V后面的值 V2~V58,把分號替換為逗號,
若要把這些數字變成一行:
將V2~V58中的值取出
123,32,18,98,119,108,65,41,124,80,125,38,124,111,74,49,83,108,94,108,84,6,96,83,44,121,104,110,32,95,117,101,99,123,127,119,96,48,107,71,92,29,81,107,90,85,64,12,43,76,86,13,114,1,117,126,0將V59~V115中的值取出
18, 64, 98, 5, 2, 4, 6, 3, 6, 48, 49, 65, 32, 12, 48, 65, 31, 78, 62, 32, 49, 32, 1, 57, 96, 3, 21, 9, 4, 62, 3, 5, 4, 1, 2, 3, 44, 65, 78, 32, 16,97,54,16,44,52,32,64,89,45,32,65,15,34,18,16,0tips : word中刪除一列文字
word怎么選中刪除 在word怎樣選中刪去一列文字
按住alt鍵,按住鼠標左鍵拖動選擇要刪除的部分并刪除
寫python腳本,計算異或
a=[123,32,18,98,119,108,65,41,124,80,125,38,124,111,74,49,83,108,94,108,84,6,96,83,44,121,104,110,32,95,117,101,99,123,127,119,96,48,107,71,92,29,81,107,90,85,64,12,43,76,86,13,114,1,117,126,0] b=[ 18, 64, 98, 5, 2, 4, 6, 3, 6, 48, 49, 65, 32, 12, 48, 65, 31, 78, 62, 32, 49, 32, 1, 57, 96, 3, 21, 9, 4, 62, 3, 5, 4, 1, 2, 3, 44, 65, 78, 32, 16,97,54,16,44,52,32,64,89,45,32,65,15,34,18,16,0] for i in range(57): # 57次循環 0~56 前包后不包a[i]=a[i]^b[i]a[i]=a[i]^19print(chr(a[i]),end='') #轉化為字符類型,不想讓他換行后面加end=''
得到flag: zsctf{T9is_tOpic_1s_v5ry_int7resting_b6t_others_are_n0t}
總結
以上是生活随笔為你收集整理的XCTF-Reverse:game(涉及异或脚本编写)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python boolean_如何在Py
- 下一篇: XCTF-Reverse:Hello,C