from pwn import * c = remote("pwnto.fun", 9999) s = c.readline() print(s) s = c.readline() print(s) s = c.readline() print(s) s = c.readline() print(s) s = c.readline() print(s) c.send("l1ve_l0ng_and_pwn") s = c.readline() print(s) s = c.readline() print(s)
四、RE
1. jiang’s fan
strings就可以了。
2. secret
strings看到一坨base16,直接python跑一下出结果。
3. Easy VB
IDA F5是没有灵魂的,所以拖进去就看到了两串长度相等的字符串。 异或直接出结果。
4. 冰菓
拖到IDA里看到了这个 dnspy打开,看到方法EncryptStr 用c写个程序就能跑出来。
1 2 3 4 5 6 7
#include<stdio.h> intmain() { chararray[] = { 119,77,103,79,21,115,133,97,115,87,22,115,103,89,88,93,22,89,119,81 }; char array2[] = { 57,13 }; for (int i = 0; i < 20; ++i) putc((array[i] - array2[1]) ^ array2[0], stdout); }
#include<stdio.h> #include<stdlib.h> typedefstruct { int a; int b; int c; int length; } Monster; Monster *malloc_Monster(int i, int j, int k, int l) { Monster *p = (Monster *)malloc(sizeof(Monster)); p->a = i; p->b = j; p->c = k; p->length = l; return p; } intMonsterCmp(voidconst* left, voidconst* right) { return ((Monster*)left)->length - ((Monster*)right)->length; } intmain() { int arr[3][3]; int i, j, k, data; for (i = 0; i < 3; ++i) for (j = 0; j < 3; ++j) { scanf("%d", &data); arr[i][j] = data; if (data <= 0) { printf("The monster is too weak..."); return0; } } Monster *p = (Monster *)malloc(sizeof(Monster) * 3 * 3 * 3); for (i = 0; i < 3; ++i) for (j = 0; j < 3; ++j) for (k = 0; k < 3; ++k) p[3 * 3 * i + 3 * j + k] = *malloc_Monster(i, j, k, arr[0][i] + arr[1][j] + arr[2][k]); qsort(p, 27, sizeof(Monster), MonsterCmp); for (i = 0; i < 27; ++i) if (p[i].length >= 60) break; if (i == 27) { printf("why don't give the brave a chance to level up..."); return0; } if (p[i].length >= 100) { printf("The brave died on the way to leveling..."); return0; } printf("The brave still has %dHP left to face the BOSS", 100 - p[i].length); }